In the never-ending effort to streamline the production of the site (or just to amuse myself), I’ve added a :first-child pseudo-class to the CSS.
This means that the first <p> in every entry is automatically given a bold style. The code is:
The text for each post is contained within a <div> with a class of ‘entry’ and is made up of a series of <p>s (plus some <div>s at the end which we can ignore in this case). Previously I’ve been adding <strong> tags to the first <p> as a general stylistic thing. :first-child allows me to not have to add these tags and will style the entry appropriately when it hits the site.
Pros: less code. Cons: no preview until it’s live (fix: create a new stylesheet for ecto).
Part of the CCS2 spec, doesn’t work in IE
You must log in to post a comment.