by codingthebeach on 10/13/12, 6:49 AM with 20 comments
by dsego on 10/13/12, 1:06 PM
A much better rant on CSS general sulkiness: http://www.raizlabs.com/blog/2006/09/25/ten-reasons-why-css-...
by bbx on 10/13/12, 12:27 PM
When learning CSS, we're told to use id's whenever we're targeting a unique element that isn't meant to repeat itself, hence the #header. So we apply this rule without looking too much into it, thinking it's wrong to use a class for unique elements like that, when it's actually not.
You just lose some readability in distinguishing unique elements from repeated ones, and you need to avoid using the same unique element twice. But ultimately your styling works the way you expect it to, and leave id's for anchors and JavaScript.
by jimworm on 10/13/12, 8:40 AM
by acabal on 10/13/12, 10:13 AM
by dalys on 10/13/12, 8:36 AM
by egypturnash on 10/13/12, 5:56 PM
…I've never seen this notation. I've always seen pseudos with just one colon.
Some quick testing in Textmate reveals that this does, indeed, work, as does the single colon I've always been using. Triple colons don't work.
And this only works for pseudo elements; pseudo classes only work with single colons.
At least in Webkit; I didn't bother checking my simple test-case in Firefox, Opera, or IE.
Huh.
by octagonal on 10/13/12, 10:56 AM
by juddlyon on 10/13/12, 6:36 PM
Recently I've run into WordPress themes where the author doesn't grasp the cascade and resorts to using !important. Widgets embedded on third-party sites are about the only good use I've seen.
by ipince on 10/13/12, 7:11 PM
Uhh.. what about classes? Can you pile classes on to beat ids?
Can you pile ids to beat inline? (Well that kinda doesn't make sense).