Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luxzeitlos/ember-css-vars
https://github.com/luxzeitlos/ember-css-vars
Last synced: 3 months 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 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T16:54:16.000Z (almost 2 years ago)
- Last Synced: 2024-05-19T05:37:36.450Z (6 months 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 aboveInstallation
------------------------------------------------------------------------------```
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).