Variables in CSS.

Have you ever thought to create dynamic designs or CSS code, then you must have searched for the variables in CSS, how to declare some static variables in CSS which we can modify later and can implement our design. 
 
So the wait is about to over, with CSS 3.0, we will get a new concept of variable declaration in our CSS code. 
 
@variables 
{ 
backcolor: #aaa; 
} 
 
Now use this variable, anywhere in your CSS code: 
 
body 
{ 
background-color: var(backcolor); 
}  
 
Now anytime you can modify this single variable and that will surely help you to modify the themes very easily. 
 
Lets see what we will get with CSS3. 
To achieve this functionality now, use PHP by setting the content type in header. 

Leave a Reply

Your email address will not be published.