cms-theme-boilerplate icon indicating copy to clipboard operation
cms-theme-boilerplate copied to clipboard

Map Theme Settings to CSS Custom Properties

Open johnsfuller opened this issue 3 years ago • 0 comments

Since IE is being dropped, I suggest phasing out the theme-overrides.css stylesheet by:

  1. mapping all hubl field styles to css custom properties.
  2. replace current style hubl values with those custom properties
  3. move each section in theme-overrides.css (typography, buttons, form, etc) to its theme partial

See example:

:root {
  --color-body: {{ theme.typography.body_text.color }};
}
body {
  color: var(--color-body);
}

All styles in theme-overrides could be moved back to their relevant partial. This would allow for one main.css file – instead of a main and theme-overrides stylesheet.

Checklist

  • [x] I have read the CONTRIBUTING document.
  • [x] I have checked the issue tracker to make sure there isn’t already an open issue.

johnsfuller avatar Jul 29 '21 01:07 johnsfuller