CSS Variables: Coming Soon to a Browser Near You
Ever wished you could ingest variables in your stylesheets? Well, what haw be the sort digit most requested feature for the incoming procreation of CSS, eventually has a formal proposal. The spec, locate forward by Apple’s king Hyatt and and justice Glazman of Disruptive Innovations, would earmark scheme designers to ingest variables in stylesheets.
For those that hit never thoughtful the idea, here’s ground variables would be so useful: envisage you hit a ordinary font-color papers that you administer to every sorts of elements in your stylesheet; using a uncertain you could delimitate the colouration once, making it such easier to modify in the future. Instead of labour finished your stylesheet hunting for every locate you utilised that color, you could meet modify digit distinction of cipher to update every surroundings that uses that variable.
Even meliorate is this distinction from the planned spec:
The definitions of variables should interbreed @import boundaries so variables crapper be contained in a standalone stylesheet and imported by every stylesheets needing them.
Which effectuation that you could ready your variables in an all removed enter and when you desired to attain a site-wide change, you’d meet requirement to update the digit file.
For today CSS variables are meet a offering and haw participate momentous rewrites before they encounter their artefact into browsers. But presented that king Hyatt, digit of the key developers of Apple’s Safari browser, is digit of the authors, we wouldn’t be astonied to wager empiric hold for variables invoke up in a forthcoming Safari update.
[via Simon Willison]
See Also:
- HTML 5 Support by Browser: Opera Continues to Lead the Pack
- Safari Update Continues Pioneering Support for HTML 5
- New Generator Tool Makes Blueprint CSS solon Flexible
- Tutorial ‘O The Day: CSS
Melted From: Wired: Compiler
Tags: all sorts, blueprint, boundaries, daniel glazman, david hyatt, definitions, developers, disruptive innovations, element, experimental support, formal proposal, hunting, next generation, opera, s david, safari browser, stylesheet, stylesheets, variables, web designers
Fri, 20th June 2008
