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

https://github.com/nx-js/style-middleware

An NX middleware, responsible for dynamic styling.
https://github.com/nx-js/style-middleware

Last synced: 4 months ago
JSON representation

An NX middleware, responsible for dynamic styling.

Awesome Lists containing this project

README

        

# The style middleware

The `style` middleware is responsible for dynamic styling.

- name: style
- middleware dependencies: [attributes](https://github.com/nx-js/attributes-middleware)
- all middleware dependencies: [observe](https://github.com/nx-js/observe-middleware), [attributes](https://github.com/nx-js/attributes-middleware)
- type: component or content middleware
- ignores: text nodes
- [docs](http://nx-framework.com/docs/middlewares/style)

## Installation

`npm install @nx-js/style-middleware`

## Usage

```js
const component = require('@nx-js/core')
const observe = require('@nx-js/observe-middleware')
const attributes = require('@nx-js/attributes-middleware')
const style = require('@nx-js/style-middleware')

component()
.useOnContent(observe)
.useOnContent(attributes)
.useOnContent(style)
.register('stylish-comp')
```

```html

```