Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate total css complexity #218

Closed
13 of 26 tasks
bartveneman opened this issue Feb 26, 2022 · 0 comments · Fixed by #369
Closed
13 of 26 tasks

Calculate total css complexity #218

bartveneman opened this issue Feb 26, 2022 · 0 comments · Fixed by #369
Assignees
Labels
✨ enhancement New feature or request

Comments

@bartveneman
Copy link
Member

bartveneman commented Feb 26, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

1 participant