Closed
Description
We already support complexity for selectors, but could extend this to add value, property, declaration and atrule complexities. This could also clear the way for having a 'total complexity' for the whole stylesheet.
This would be awesome to graph out as well on projectwallace.com/analyze-css.
Some notes about edge cases and possible scenarios: https://astexplorer.net/#/gist/2d7b3b49ebc7094c0d0b7f29c023b757/ccf6dda1764a26a39098a90842a485916ce3fd4d
Checklist
- Selectors
- Vendor prefixes
- Nesting:
& .element
- Declarations (basically whether
!important
is used or not) - Values
- Vendor prefixes
- Browserhacks
- Properties
- Vendor prefixes
- Browserhacks
- Custom properties with and without default values
-
@media
- Browserhacks
-
@import
- media queries
- layers
- supports-queries
-
@supports
- Complexity of 'declaration'
- Vendor prefixes
- browser hacks
-
@container
- Complexity of 'declaration'
-
@keyframes
(whether it's vendor prefixed) -
@nest
-
@nest & > .bar
-> complexity of& > .bar
-