23:05 Fri, 20th June 2008

Welcome to MeltedCube - The articles resource center! RSS Feeds - Subscribe now!
ADVERTISEMENT
ADVERTISEMENT
MeltedCube
Hot news, gossips & articles that will melt you down.

CSS Variables: Coming Soon to a Browser Near You

cssvar.jpgEver 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:

Melted From: Wired: Compiler

Tags: , , , , , , , , , , , , , , , , , , ,

Your Ad Here

Leave a Reply