2019-02-12 03:05:07 -07:00
|
|
|
# Client-side modules
|
|
|
|
|
|
|
|
## CSS
|
|
|
|
|
|
|
|
|
|
|
|
```
|
2019-02-12 21:42:23 -07:00
|
|
|
cd ui/
|
2019-02-13 01:40:37 -07:00
|
|
|
yarn install # only the first time
|
2019-02-12 03:05:07 -07:00
|
|
|
gulp css
|
|
|
|
```
|
|
|
|
|
2019-02-12 21:42:23 -07:00
|
|
|
This incrementally rebuilds the sass for all ui/ modules on file change.
|
2019-02-12 03:05:07 -07:00
|
|
|
|
|
|
|
### Hack
|
|
|
|
|
|
|
|
The structure of a CSS module is as follows:
|
|
|
|
|
|
|
|
```
|
|
|
|
- css/
|
|
|
|
- forum/
|
|
|
|
- _forum.scss # imports the files below
|
|
|
|
- _post.scss
|
|
|
|
- _search.scss
|
|
|
|
- ...
|
|
|
|
- build/
|
|
|
|
- _forum.scss # imports dependencies and `../forum/forum`.
|
|
|
|
- forum.light.scss # generated
|
|
|
|
- forum.dark.scss # generated
|
|
|
|
- forum.transp.scss # generated
|
|
|
|
```
|