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

https://github.com/eddiemoore/hydrogencss

Atomic CSS for CSS Modules
https://github.com/eddiemoore/hydrogencss

atomic-css atomic-design css css-modules

Last synced: about 1 year ago
JSON representation

Atomic CSS for CSS Modules

Awesome Lists containing this project

README

          

# hydrogen.css
Atomic CSS for CSS Modules

[![npm](https://img.shields.io/npm/v/hydrogencss.svg)](http://npm.im/hydrogencss)

## Installation

#### NPM
```shell
npm i -S hydrogencss
```

#### Yarn
```shell
yarn add hydrogencss
```

## Usage with CSS Modules
There are two ways to compose with each value. The first:

```css
.container {
composes: from 'hydrogencss/.css';
}
```
With this way you will be importing all the classes within `.css`, unless
you are clearing up the unused CSS.

The alternate way to import is
```css
.container {
composes: from 'hydrogencss//.css';
}
```

Example:
```css
.container {
composes: flex from 'hydrogencss/display/flex.css';
}
```

Which will just include:
```css
.flex { display: flex; }
```

To see all the properties and values available please check the [docs](docs/) folder.