4 ms·
>This tool seems useful if you buy into the philosophy, but I'm just not sold yet - component based styling leads to a lot of style duplication and makes it ver
by clay_to_n 10y ago
>This tool seems useful if you buy into the philosophy, but I'm just not sold yet - component based styling leads to a lot of style duplication and makes it very easy for a developer to go "off the playbook" when it comes to enforcing a consistent styleguide throughout an app.
You just handle it the same way you handle any shared code. You can keep files in a file scope, in a package / folder scope, or in the top-level global scope (in a small app that's totally fine). But removing globals-by-default removes a lot of "gotcha's" from working with CSS.
- mdahlstrand 10y agoWhat are these gotchas if I may ask? Have you got experience with BEM?
- mistersys 10y agoUhm.. Having to use BEM is a gotcha. Why don't you write all your applications code in a global scope and just use a BEM-like naming scheme for your functions?