CSS Variables
- Started
- Last post
- 8 Responses
- section_014
I was just doing some reading on css3.info about the neat fun stuff in store(and currently working) for css.
In regards to variables in css, I am personally 100% for it. I've always wished I could use variables to define colors along with other things. There apparently is some opposition to variables in CSS, but I'm not sure why.
Just wondering what other QBN people thought of variables in CSS.
- Fariska0
Nice feature.
Pretty useless until IE(6,7,8) still holds such a big marketshare.
IE8 will be supporting just very few CSS3 featuyres :-/
Sometimes i wish that MS would just give up and use geko or webkit.- IE6 actually supports JS scripting in CSS but it was politically wrong for the w3c coming from them.rafalski
- fusionpixel0
why not try a group that is less design/artist oriented?
css + php = variables
- BattleAxe0
i have not read into it, but how is a decalring a variable going to be diffrent from a class , I mean you can define a color set in a class , so I wonder what the advantage is
- fusionpixel0
why not try a group that is less design/artist oriented?
css + php = variables
- section_0140
well, instead of writing a hex value for a color that you are going to use many times through a style sheet, and possibly have to change you could use:
$color = "#ff0000";
or whatever naming convention you need. Unless I'm unaware of a way to use classes as variables within CSS, it would make life a bit easier.
// goes and googles a way to use classes as variables
- 7point340
is #f00; really that hard to write?
- TheFatBaron0
Well, it's the same idea as using a variable anywhere else, or a symbol in Flash, or a Smart Object in Photoshop, right? Change it once, change it everywhere.
- section_0140
I change my stance on this subject. After reading this:
http://www.w3.org/People/Bos/CSS…
and realizing how easy it is to parse a css file with php
... I'm against variables in CSS.
carry on