20080218
Fun with CSS3


I haven't been following CSS3 much, didn't even realize some of the functionality is already implemented in a few of the current browsers. Heck, I have my hands full just trying to figure how to get things working correctly in IE.

Came across the 'Fun with highlights' experiment earlier in the day. Go ahead, try selecting the text up above in FireFox or Safari (blech). Cool huh? Erik used CSS3's ::selection pseudo-element and PHP to get the effect. For more information about CSS3, check this blog out.

Update: Guess Blogger does some weird things with the HTML when I publish. Had to dump the generated code in a separate text file and use a PHP include. Stop stripping the includes damnit! Thundercats GOOOOOOOOO!

Update 2: Took a longer look at the CSS3-Selectors document, check out 6.6.5. Structural pseudo-classes, don't have to alternate the color of the table rows via PHP and CSS anymore, you can do it just within CSS!

Newspapers (Khoi Vinh, Design Director for NYTimes.com, I'm looking at you) are going to go crazy over the ::first-line pseudo-element and the ::first-letter pseudo-element. Rather than having to enclose each first line or letter with the CSS tag, the first line or letter will automatically adopt the styles!

Labels: ,