News for hackers. Stuff that matters.
Re:Sass Guidelines by anonova on Tuesday January 06, 2015 @04:09PM (#8847146)
No leading zeros?! [1] I'm pretty sure most math/engineering fields recommend leading zeros for readability, e.g, NIST: "For numbers less than one, a zero is written before the decimal marker. For example, 0.25 s is the correct form, not .25 s." [2]

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

Re:Sass Guidelines by HugoGiraudel on Tuesday January 06, 2015 @04:24PM (#8847228)
Actually I am thinking of changing this. Someone brought the issue on GitHub: https://github.com/HugoGiraudel/sass-guidelines/issues/32. It is currently being discussed.
Re:Sass Guidelines by wldcordeiro on Wednesday January 07, 2015 @01:10AM (#8849162)
In a similar vein why do you prefer hex colors in shortened lowercase format? I've been partial to uppercase long form.
Re:Sass Guidelines by pc86 on Wednesday January 07, 2015 @03:34PM (#8853125)
This is not in a similar vein. Leading zero's for values less than 1 is the correct way to write values less than 1.

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.

Re:Sass Guidelines by paulojreis on Wednesday January 07, 2015 @04:27AM (#8849590)
I agree. Even within the relevant field (front-end development), explicit leading zeros are encouraged. JavaScript code quality tools such as JSHint and JSLint will complain when the leading zero isn't explicit. E.g:

JSHint var foo = .1; // Unexpected '.'.

JSLint var foo = .1; // A leading decimal point can be confused with a dot: '.1'.

Re:Sass Guidelines by kendallpark on Tuesday January 06, 2015 @05:42PM (#8847599)
+1

The scientist in me... skin crawls when I see a lack of leading zeros.

Re:Sass Guidelines by kolev on Tuesday January 06, 2015 @09:54PM (#8848616)
The non-American, too - as far as I know only in America people are too lazy to put a zero where it makes sense.
Re:Sass Guidelines by kolev on Thursday January 08, 2015 @01:50AM (#8855289)
Lazy to use zeroes, yet, pretty active downvoting.
Re:Sass Guidelines by Bognar on Tuesday January 06, 2015 @04:35PM (#8847289)
Seconding this. Leading zeros are important for decimals because it is extremely easy to miss a single dot. This is less of an issue in the world of fixed width fonts, but I don't really think that's a valid excuse to buck the trend of every other engineering field.
Re:Sass Guidelines by HugoGiraudel on Tuesday January 06, 2015 @05:27PM (#8847528)
It has been updated.
Re:Sass Guidelines by kolev on Tuesday January 06, 2015 @09:51PM (#8848604)
You still have it here:

    // 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% );
    }
Re:Sass Guidelines by HugoGiraudel on Wednesday January 07, 2015 @03:15AM (#8849402)
Fixed, thank you very much. :)
Re:Sass Guidelines by kendallpark on Tuesday January 06, 2015 @05:42PM (#8847603)
Well done!