CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
CSS Combat
Less: not compiling shorthand hex colors?
freese
Permalink to comment
#
April 2012
I have a simple question regarding less. I pretty excited about it but I noticed something that I don't like about the less compiler. I'm actually using Codekit but using the less.js too, I got the same "issue".
If I declare a variable like:
@white
: #fff;
less compiles the shorthand hex notation to the long "normal" one:
#ffffff
I know this is not a very mig issue but it's good practice to use short hand notation where possible (
Efficient CSS with shorthand properties
)
Is there some way to tweak the compiler to generate colors with the short hand notation?
Thank you!
Add a Comment
If I declare a variable like:
less compiles the shorthand hex notation to the long "normal" one:
I know this is not a very mig issue but it's good practice to use short hand notation where possible (Efficient CSS with shorthand properties)
Is there some way to tweak the compiler to generate colors with the short hand notation?
Thank you!