Skip to content

Draft: CSS custom properties/variables

Alice Mikhaylenko requested to merge wip/alice/css-variables into main

TODO:

  • Circular dependency check
  • Animations
  • Tests
    • Printing
      • currently it leaves spaces between all tokens so that 1px solid red doesn't become 1pxsolidred. But this also means rgba( 0 , 0 , 0 , 0 ), probably should be more selective here and e.g. special case commas and opening/closing tokens
      • Sort custom props when printing
  • Address TODOs in the diff
  • Allow variables in @define-color - do we need this at all?
  • Error handling? Currently substituting variables at compute time discards any errors
  • Currently I use modified libadwaita styles for testing (that's the bulk of the diff), should we introduce variables in Default somewhere?
    • This would be difficult without significantly changing the styles themselves
  • Clean up commit history
  • Docs
Edited by Alice Mikhaylenko

Merge request reports