Fixes #1190 - Use Sass variable and Sass mixin to generate is-variable rules #1480
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a improvement | bugfix | documentation fix. (all)
is-variable
docs.Proposed solution
Instead of depending on CSS variable browser support, use a Sass variable and a Sass mixin to generate regular CSS for the is-variable class. This should increase browser compatibility as well as fix #1190, #1355 and #1181 where warnings are emitted when using a CSS variable. It will also make the deprecation warning in #1283 and #1210 completely irrelevant since that only applies to CSS variables.
Tradeoffs
I guess you have to learn how Sass variables and Sass mixins work? But other than that, I can't think of anything.
Testing Done
Injected the generated CSS code into Bulma Docs. Confirmed working: