LESS has been implemented in JavaScript. For those who never heard of LESS, it is a css preprocessor which can make your css "programmable".Here’s a basic example of LESS code to give you an idea of what it does:
@brand-color: #3879BD; #header { a { color: @brand-color; &:hover { color: #000; } } }In this example, brand-color is declared globally. In normal css, you have to specify it at every css selector where to make changes of the brand-color, you have to modify it at each css selector which can be tedious if you use it many times. Since this example use LESS, you just have to modify @brand-color at the first line. For more example please visit LESS Official Website or fadeyev.net.
P.S.S. Less.js browser script currently won’t work if you’re using Chrome and the path to your page starts with “file:///” due to a known Chrome issue.
Tuesday, August 31, 2010
Less.js Will Obsolete CSS
Subscribe to:
Post Comments (Atom)
1 comment:
ui-helper-hidden
Post a Comment