Hacker News new | ask | show | jobs
by hashkb 3681 days ago
This is amazing. I quit a job at a company that did many stupid things, one of which was insist that their home rolled CSS framework did not suck. Said framework was, in all seriousness, exactly this but with shortened, cryptic names. Nightmare.
2 comments

Ideally, in SMACSS, you could classify all components into their composable parts: a grid width, a title style, a button with a primary style, a button with a secondary style, standard body text, emphasized body text, etc.

But most of the time, designers don't know how to stick with a standardized padding and margin, so I find that without exception, an org requires me to develop "cryptic" representations of margin and padding, such as mr1 (margin right to 1 degree, or 5 px) or pl2 (padding left to 2 degrees, or 10px).

I've also rolled entirely new features without writing a single line of CSS. This is a way to mitigate CSS bloat. I take it you've never actually tried to deal with the problem of CSS bloat, or you'd find either 1) you'd have to hold a gun to designers' heads or 2) do exactly what I just showed you.

I've had a very different experience with designers. I would say that ~95% of them something is a couple pixels off, a slightly different font size, or a shade off in color, it was a mistake.

Usually a quick follow-up question will reveal the mistake and the designer is happy to make the correction.

This has been my best weapon against CSS bloat.

This is weird, because designers I've worked with hate CSS bloat even more than I do, and love things like consistent spacing and typography. The movement towards styleguides has been one of the biggest things happening in design in the last year or so, which is exactly what you're talking about with not writing CSS.
To add to this, the addition of a style guide is helpful on two fronts.

* Components and patterns are standardized, allowing for less process in design reviews and quicker iteration

* Engineers can create component libraries that mirror style guide elements and turn frontend work into something a little closer to 'lego' building

Haha... :)