Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vinpac/styled-css-loader
Loader that modularize, export and enables easy theming css
https://github.com/vinpac/styled-css-loader
Last synced: 5 days ago
JSON representation
Loader that modularize, export and enables easy theming css
- Host: GitHub
- URL: https://github.com/vinpac/styled-css-loader
- Owner: vinpac
- Created: 2018-04-19T19:39:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-01T04:08:35.000Z (over 6 years ago)
- Last Synced: 2024-04-23T15:02:40.777Z (7 months ago)
- Language: JavaScript
- Size: 71.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Styled css loader
Theme and use css fastly# Getting Started
## Installation
```bash
$ npm install --save styled-css-loader
```or
```
$ yarn add styled-css-loader
```## Usage
```js
/* webpack-config.js */
module.exports = {
module: {
rules: [
{
test: /\.css/,
loader: 'styled-css-loader',
}
]
}
}
``````css
/* home.css */
.page {
background: --colorPrimary;
}.title {
color: white;
}
``````jsx
/* home.js */
import s, { sheet } from './home.css'
import compile from 'styled-css-loader/compile'// You can also use {sheet.css}
const Home = () => (
{compile(sheet, { colorPrimary: '#333' })}
Home
)```