Skip to content

Refactor/variable spacers - #2471

Draft
dr-itz wants to merge 2 commits into
mainfrom
refactor/variable-spacers
Draft

Refactor/variable spacers#2471
dr-itz wants to merge 2 commits into
mainfrom
refactor/variable-spacers

Conversation

@dr-itz

@dr-itz dr-itz commented Jul 31, 2026

Copy link
Copy Markdown
Member

This is a playground for variable spacers, i.e. to try high-density layouts. Spacers are no longer fixed, but driven by CSS:

  • --element-spacer-inline controls spacers in inline direction. Default is 16px, i.e. what we have now
  • --element-spacer-block controls spacers in block direction. Default is 16px, i.e. what we have now

Theme and all components are changed to work with CSS vars instead of hardcoded values. The demo si-theme/spacer-controls allows changing the values easily until next reload.

Note: since spacers are defined in a single place, _spacers.scss it's possible to change to a CSS var per spacer and everything else. The important part here is the changes to the whole code-base so spacers are variable.


Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

@dr-itz

dr-itz commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

@dr-itz
dr-itz force-pushed the refactor/variable-spacers branch 4 times, most recently from fe5a40b to ccd3b77 Compare July 31, 2026 14:38
dr-itz added 2 commits July 31, 2026 17:51
This introduces a single variable and fixes all compile errors caused by
it. In a later step this can be refined.

BREAKING CHANGE: The spacers in `$spacers` are now derived from CSS
variables. This means they cannot be used in simple math expressions
like before but require a `calc()` operation.
@dr-itz
dr-itz force-pushed the refactor/variable-spacers branch from ccd3b77 to 06a62e2 Compare July 31, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant