Category: css
How Cascading Style Sheets are implemented in current browsers, what we can do with the language, and what to look forward to.
How Cascading Style Sheets are implemented in current browsers, what we can do with the language, and what to look forward to.
It was announced on the HTML Working Group mailing list this morning that the font element will be absent from the next draft of the HTML5 specification. The inclusion of font in the spec was controversial, as many (including myself) thought it was a purely decorative element that had no place in semantic code.
Of course, browsers will still have to support the element because of the many legacy sites on the web; but as of now any software that generates mark-up should use the style attribute instead. It’s a small increment better.
Anyone not reading this in an RSS feed will notice that I’ve installed a new theme. I was never really happy with the previous one, as it was based on a design that had been rejected from another project and was called into action before it was ready.
I’ve given this one a version number of 0.5, as I still have a lot I want to do with it, notably: embedding more microformats in the code; adding more progressive enhancement to the CSS; making more use of WordPress’ tagging system; and testing more thoroughly in IE.
However, I’m pretty pleased with the more typographic direction in this design, and am excited to be using a theme I genuinely care about.
If any readers have any constructive criticism to give, please go ahead and do so in the comments. However, do please be gentle with me!
I mentioned CSS Variables previously, and now the proposal has been published and I agree with authors Daniel Glazman and David Hyatt when they say:
We expect CSS Variables to receive a very positive feedback from both the Web authors’ community and browser vendors.
The syntax will be to declare the variables using the @variables at-rule, then calling them with the var() function:
@variables { keyColor: #f00; }
h1 { color: var(keyColor); }
That’s it. Beautifully simple, and I really, really look forward to seeing it implemented.
The W3C came under a lot of heavy flak last year for being slow, cumbersome, bureaucratic, etc; there were calls for a CSS2.2 (which I seconded) which rounded up all the existing implemented features, and for the CSS Working Group to be disbanded – a lighter, alternative task force, the CSS Eleven, was set up to try and make sense of it all. But as we’ve heard nothing from them in the six months since they were set up, I think the Eleven have found it’s not as easy as it looks.
The CSS WG has a new chair now, including the passionate Daniel Glazman, and it seems to be refocused and refreshed, which is good news; in his latest blog post, he says that the WG is aiming for RECs, RECs, RECs
. If that’s the case, maybe we can start to get excited.
It’s an exciting time to be a web developer, as all four major browsers have released / are releasing new versions with extended CSS & HTML support. However, as Opera and Webkit race to be the first to score 100% on the Acid3 test, a lot of people are getting caught up in the excitement and turning this into some kind of pissing contest.
Honestly, it doesn’t matter who passes the test first. Does it matter who passed the Acid2 test first? Do you remember? Do you care? What matters is that this year we’re going to have much better standards support and less proprietary bugs, and that’s the best and most important thing.
As with operating systems and video games consoles, everyone feels the need to take a side and defend it vigorously. But it’s not important. If you like Safari, then all power to you; I prefer Firefox. What we can agree on is that we want our websites to work equally well on both of them. I congratulate Opera and Webkit equally for working towards making better browsers, and couldn’t care less who passes the arbitrary test first.
That said, it should be judged by whichever one makes a production release, of course, not a nightly or an Alpha. You don’t win a race by having the fastest trainers, you win it by crossing the finishing line!
On a related note, today’s Wired has a good summary of HTML5 support in current and forthcoming browsers.
Apple have released Safari 3.1 for Windows and OS X (and Linux using Wine) today, and the feature that really stood out for me was the introduction of web fonts. Website makers have been bound to the same core fonts for years now, so suddenly having a huge palette to choose from is going to make an enormous difference!
Using them is pretty easy. First you have to declare the fonts using the @font-face rule – and, importantly, you have to declare each variant (weight, style, etc) individually by linking to the font file involved. You can’t just link to the directory and let the browser work out the variants. To see what I mean, take a look at this example (using Safari 3.1, of course!) and view the source to see the CSS involved.