Do we need to resolve custom properties?
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 138
- Forks
- 26
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 3
Description
With https://github.com/mapbox/assembly/pull/970 - our browser support targets all support [css custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/--*). Should we revise our build system to convert the `variables` option to a set of `:root` CSS properties? Would save us from needing to resolve every variable in our CSS at build time.
Are there costs to doing this? Likely compressed file size would not be impacted but could time to first paint take a hit? Here's an article on CSS variable performance, but it exclusively discusses the performance of _changing_ variables at runtime: https://lisilinhart.info/posts/css-variables-performance/ and after some quick looking, couldn't find any existing documentation of the performance cost of using variables.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by reviewing how the build system handles the `variables` option and the browser support targets referenced in pull request #970; compare resolving variables at build time with emitting `:root` custom properties, including first-paint and compressed-size effects. Done means reaching a documented decision on whether to change the build behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- build-system, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100