Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/luxzeitlos/ember-css-vars


https://github.com/luxzeitlos/ember-css-vars

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

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).