Home

Awesome

ember-css-vars

A ember modifier to apply css variables. This gives a save way to expose data from javascript to css.

Compatibility

Installation

ember install ember-css-vars

Usage

css

#myElement {
  background: var(--my-color);
}

hbs

<div id="myElement" {{css-vars my-color="blue"}}>
  This will have a blue background
</div>

Limitations

Because element modifiers do not run in FastBoot mode {{css-vars}} has no effect when run in FastBoot mode.

License

This project is licensed under the MIT License.