CSS¶
Conventions¶
Organising CSS is hard.
Try this ones: https://rscss.io/ (better than BEM?). Used by Inkline.
Tips¶
https://markodenic.com/css-tips/
https://twitter.com/vponamariov/status/1368851471660421120
Sorting classes¶
- https://github.com/tailwindlabs/prettier-plugin-tailwindcss
- https://tailwindcss.com/blog/automatic-class-sorting-with-prettier#how-classes-are-sorted
- “any classes in the base layer will be sorted first, followed by classes in the components layer, and then finally classes in the utilities layer”
- “The actual order of the different utilities is loosely based on the box model, and tries to put high impact classes that affect the layout at the beginning and decorative classes at the end, while also trying to keep related utilities together:”
Page last modified: 2024-09-25 08:35:47