https://github.com/luxzeitlos/ember-css-vars
https://github.com/luxzeitlos/ember-css-vars
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/luxzeitlos/ember-css-vars
- Owner: luxzeitlos
- License: mit
- Created: 2019-02-14T20:54:53.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T16:54:16.000Z (over 3 years ago)
- Last Synced: 2024-12-21T09:25:24.663Z (over 1 year ago)
- Language: JavaScript
- Size: 2.27 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ember - ember-css-vars - A ember modifier to apply css variables. This gives a save way to expose data from JavaScript to css. (Packages / Modifiers)
README
ember-css-vars
==============================================================================
A [ember modifier](https://emberjs.github.io/rfcs/0373-Element-Modifier-Managers.html) to apply [css variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables).
This gives a save way to expose data from javascript to css.
Compatibility
------------------------------------------------------------------------------
* Ember.js v3.13 or above
* Ember CLI v3.13 or above
* Node.js v10 or above
Installation
------------------------------------------------------------------------------
```
ember install ember-css-vars
```
Usage
------------------------------------------------------------------------------
**css**
```
#myElement {
background: var(--my-color);
}
```
**hbs**
```
This will have a blue background
```
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](LICENSE.md).