8 ms·
About comments: your CSS shouldn't need it! About preprocessors: the styleguide was created to be preprocessor-agnostic. Also, I suggest using Postcss instead.
by grvcoelho 11y ago
About comments: your CSS shouldn't need it!
About preprocessors: the styleguide was created to be preprocessor-agnostic. Also, I suggest using Postcss instead.
- CM30 11y agoThanks for the explanation about preprocessors and such. But CSS not needing comments? That's a nice thought, but it kind of becomes awkward in a large organisation with a massive development team. Like the kind you need to develop the large applications mentioned in the post title. I mean sure, it would be ideal if your CSS was so easy to read that any future developer could figure out what everything referred to in an instant. But for something like say, Facebook, or Google, or Amazon, it seems rather unlikely that someone new to the team can figure out why every single CSS rule was implemented in the way it was or where each class refers to without some sort of help. Strip out comments, and what's left? Someone walking them through the entire CSS structure of the site? A couple of days in the web inspector? An actual manual?
- grvcoelho 11y agoThe only case I think it's okay to use comments is for browser-specific hacks or a set of rules that is hard to understand. But I would avoid these cases if I could!