A ember modifier to apply css variables. This gives a save way to expose data from javascript to css.
- Ember.js v3.13 or above
- Ember CLI v3.13 or above
- Node.js v10 or above
ember install ember-css-vars
css
#myElement {
background: var(--my-color);
}
hbs
<div id="myElement" {{css-vars my-color="blue"}}>
This will have a blue background
</div>
Because element modifiers do not run in FastBoot mode {{css-vars}}
has no
effect when run in FastBoot mode.
This project is licensed under the MIT License.