Wednesday, June 16, 2010

We Are The Waiting...

Seriously, W3C...  When will CSS3 be finalized?  It's got a ton of extremely awesome stuff that I can't wait to play around with in a standardized manner.

Most browsers have implementations of the proposed CSS3 selectors already, hidden away with selector names beginning with a hyphen and a browser or renderer-specfic string.  Firefox uses -moz, the webkit renderer uses -webkit, and Opera being weird like usual uses -o for some things but not others.

I've only ever used the border-radius ones (see the header above if you're not using IE (and why the hell would anyone ever use IE)).  Rounded borders used to only be possible with images (eats up memory) or Javascript hacks (which eat up CPU time and memory), so having a standard way of doing rounded borders that the renderer can do with native code will be faster and less resource-intensive.

One of the biggest and best things is CSS fonts.  It will be (and technically is already in most browsers) possible to provide the font you want your page to be viewed in, and define things like the default size and family name so forth so you can just use it in font-family like any other font already installed on the user's system.  In before web pages that use all sorts of crazy hard to read fonts.  In all seriousness, it's a nice feature and real web developers who actually have the viewing experience in mind will use it properly.  I can't say as much for your average 13 year old who just discovered HTML and CSS.

One of the neatest things I see is the proposed border-image-slice selector.  This lets you make an image to be used for the border of an element, and define where the corners are, where the middle is (which would get cut out by the renderer if you allow it to) and stretch the middle edges vertically and horizontally to fit the rendered width and height.  Previously you needed eight separate images to do this, and with CSS3 you'll be able to do it with one.

There's also better control of using images with the regular border selectors.  You'll be able to control whether it's stretched or tiled and so forth.

There's more than just borders and fonts, you'll be able to do shadows, two-dimensional transformations such as rotate and skew (blogger uses rotate in its post preview, it's pretty neat and would have required an image without this), and gradients.

The aim of CSS3 seems to be reducing page load times and resource usage on the user's computer while providing better control over what they see.  And I like that.

No comments:

Post a Comment

I moderate comments because when Blogger originally implemented a spam filter it wouldn't work without comment moderation enabled. So if your comment doesn't show up right away, that would be why.