Skip to content

Calculate total css complexity #218

Closed
@bartveneman

Description

@bartveneman

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions