Categories
Featured Geeky Web Development

SCSS style gripes

This past year I’ve been doing a lot of work with and in SCSS (aka SASS). Having rewritten several frameworks now, I feel I should point out what I see as faux pas of too many SCSS authors. Remember, these are my peeves, feel free to comment.

  1. If you’re gonna write a novel…
    Don’t clutter up your SCSS files with loads of inline docs. If you have something to say, do it properly and put your docs in an MD or similar docs format.
  2. Don’t be facetious
    CSS noobs should not be using SCSS (i.e. learn to walk before…), so please spare me the superfluous comments. Everybody ought to know ‘a’ is for links (yes, some authors are that thick).
  3. Don’t waste space, ever
    I have been able to reduce the line numbers of some SCSS files by almost 50% by just deleting extraneous spacing. Readability is good, but don’t insinuate that I need double blank lines and loads of comment blocks to understand the code. It’s annoying.
  4. Don’t include ASCII drawings
    If you like ASCII art, great, but don’t include it in SCSS files. No sane developer needs lines wasted on lines formed by loads of ==s or whatever nonsense some come up with. If you wanna draw, do it on deviantart.com, please!
  5. Use SCSS
    As surprising as this may be, some frameworks or ports thereof advertised as SASS aren’t actually SASS really. My rule is simple: If you’re not even gonna use nesting, don’t call it SASS, please!
  6. Really use SASS
    You’d be surprised how much you can get out of the meta language’s concepts. Really use all of its features (nesting, mixins, CSS3 helpers, etc.).

So, in short, if the title or readme says SASS, there’d better be SASS inside. Don’t make me run your code through my BS filter!

Edited to highlight the ASCII art point.