https://github.com/aliemir/css-stylez
A Tiny helper package to use css modules with ease
https://github.com/aliemir/css-stylez
Last synced: 2 months ago
JSON representation
A Tiny helper package to use css modules with ease
- Host: GitHub
- URL: https://github.com/aliemir/css-stylez
- Owner: aliemir
- Created: 2019-12-31T13:33:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T13:33:16.000Z (over 2 years ago)
- Last Synced: 2025-03-19T21:06:50.595Z (2 months ago)
- Language: JavaScript
- Size: 916 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# css-stylez
A tiny js module to make it easier to use css modules.
## Installation
```bash
npm install css-stylez
```## How to use
First, import the package and a transformer function (or you can create one for yourself, camelToKebab function is basically some match regex and replace)
```js
import cssStylez, {camelToKebab} from 'css-stylez'
```Let's say we import our css module styles like
```js
import styles from './MyComponent.module.scss'
```We need to initialize cssStylez as,
```js
const stylez = cssStylez(styles,camelToKebab)
```Finally,we can start using it. I created this package because I love css modules but hated using it with bulma. You basically end up with classnames hell, ugly af.
```html
stuff here
stuff here
```