by anonova · 11y ago · 0 comments
If it's to make the resulting css file a byte smaller, shouldn't be the preprocessor be able to strip it out?
[1]: http://sass-guidelin.es/#zeros [2]: http://physics.nist.gov/cuu/pdf/sp811.pdf
3-character or 6-character hex values is only a matter of optimization (fewer characters, which the compiler should be able to handle), and consistency (having both the 3- and 6-character versions in the same file or definition). Case is personal preference and nothing more.
JSHint var foo = .1; // Unexpected '.'.
JSLint var foo = .1; // A leading decimal point can be confused with a dot: '.1'.
// Yep
.element {
color: rgba(0, 0, 0, .1);
background: hsl(300, 100%, 100%);
}
// Nope
.element {
color: rgba(0,0,0,.1);
background: hsl( 300, 100%, 100% );
}