When CSS works beautifully

There are times when CSS is so elegant and logical that you smile. Take this example:

.Pingback .commentmetadata li a:before {
        content: '(This is a pingback or a trackback) 2014 ';
        font-weight: bold;
        color: #444;
}

And it works — it prepends styled content to links that reside in lists that are descended from two parents (the content has grandparents, in effect).

Not in IE, of course.

Sidenote: HTML entities can be added to CSS–generated content, but only using hexadecimal values.

Filed under: Notes

Tags: ,

Next post:

← Previous post:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>