braidchat / planning

2 stars 0 forks source link

use CSS modules / scoped CSS #342

Open braid-sync opened 7 years ago

braid-sync commented 7 years ago

The Cascade really sucks. CSS Modules is a proven way to escape the global scoping of CSS. I got caught out due to nested child selectors when trying to show the avatar on users page. Was an easy fix however being new to Om, Cursors, Database etc I never even thought to check CSS for some time.

This is the official article on CSS Modules http://glenmaddern.com/articles/css-modules. There is currently two implementations going on in the Clojure ecosystem that is similar to CSS modules. Definitely not worth making any decisions right now but I think all options should be watched and assessed to get away from global CSS scoping as quickly and safely as possible.

Boot specific library: https://github.com/CommonCreative/forest Om specific library: https://github.com/ladderlife/om-css

braid-sync commented 7 years ago

➤ Braid Sync Bot commented: Sounds good to me. I am already trying to organize component-related code into corresponding namespaces,

I'm a little wary of how new forest seems to be, but I'm open to trying it.

[--- Commented from GitHub.com

commenter rafd

---[gh]

braid-sync commented 7 years ago

➤ Braid Sync Bot commented: Yea the om-css and forest were just examples of new projects in the ecosystem working to address this. Hence why I said safely when getting away as quickly as possible as they are so new and not worth betting on right now or possibly even the immediate future. But they and anything else that pops up are worth watching

[--- Commented from GitHub.com

commenter CommonCreative

---[gh]