2012-10-03 20:14, Markus Ernst wrote:
Trying to change the color of list markers, I came across the ::marker
pseudo element.
The CSS 2.0 specification (now virtually wiped off from the table and of
historical value only) had a section on list markers, but it was never
implemented and it was dropped from CSS 2.1. Now, CSS3 drafts have a new
approach to controlling markers (better than old CSS constructs have to
offer), but they seem to remain unimplemented.
Is this the right way to go for the future?
Who knows? In any case, at present, it doesn't work, whereas an
alternative approach works in all modern browsers: when using list
markup, suppress the normal browser-generated markers by setting
list-style-type: none, and create your own markers using :before
pseudo-elements with generated content. This lets to set their color
conveniently by styling the pseudo-elements. At the simplest:
ul {
list-style-type: none;
}
ul li:before {
content: "\2022 ";
color: red;
}
Yucca
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/