Skip to content

Skip to main navigation

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.