Skip to content

Commit 508d88e

Browse files
committed
add some ideas to CSS doc how to document css classes
1 parent 3735e44 commit 508d88e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/CSS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ We could do top to bottom gradients in default avatars to make them look a bit c
66

77
Can take ideas/adopt from OOCSS and SMACSS.
88

9+
## Documentation
10+
11+
Whether we use OOCSS, SMACSS or BEM, we should write a tool that uses a JS parser (acorn?) to find all css classes used in the view code by looking for a `{className: "..."}` pattern. E.g. if using BEM, use all the found classes to construct a doc with a section for every block, with therein all elements and modifiers.
12+
913
### Root
1014
- maybe we should not assume `body` is the root, but rather a `.brawl` class. The root is where we'd set root level css variables, fonts?, etc. Should we scope all css to this root class? That could get painful with just vanilla css. We could use something like https://github.com/domwashburn/postcss-parent-selector to only do this at build time. Other useful plugin for postcss: https://github.com/postcss/postcss-selector-parser
1115

0 commit comments

Comments
 (0)