@vtmn/css-loader
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "@vtmn/css-loader", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Decathlon Design System - Vitamin specific CSS styles for loader component", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
"scripts": { | ||
"build": "postcss src/index.css -o dist/index.css && cross-env FONT_SIZE_BASE=10 postcss src/index.css -o dist/index-base10.css" | ||
"build": "sh build.sh" | ||
}, | ||
@@ -42,3 +42,3 @@ "devDependencies": { | ||
], | ||
"gitHead": "9f2b88608262178e8bfdce4c50fca3bd13f00cef" | ||
"gitHead": "315d73a2d785e225efae90c7577f47fafeb8c315" | ||
} |
@@ -72,6 +72,10 @@ # `@vtmn/css-loader` | ||
## Usage | ||
# Usage | ||
Once you have installed this package, you just have to import CSS styles! | ||
### Without theming | ||
If you don't need different themes, you can choose the specific CSS package without CSS variables. | ||
With a bundler that supports CSS imports in JS files: | ||
@@ -86,6 +90,41 @@ | ||
```html | ||
<loader | ||
<link rel="stylesheet" href="./node_modules/@vtmn/css-loader/dist/index.css" /> | ||
``` | ||
### With theming | ||
If you need different themes, you can choose the specific CSS package with CSS variables. For this, be sure to install & import `@vtmn/css-design-tokens` before: | ||
```sh | ||
# with npm | ||
npm i -S @vtmn/css-design-tokens | ||
# with yarn | ||
yarn add @vtmn/css-design-tokens | ||
``` | ||
Or you can also install it with a CDN like `unpkg.com`: | ||
```html | ||
<link rel="stylesheet" href="https://unpkg.com/@vtmn/css-design-tokens" /> | ||
``` | ||
With a bundler that supports CSS imports in JS files: | ||
```javascript | ||
import '@vtmn/css-design-tokens/dist/index.css'; | ||
import '@vtmn/css-loader/dist/index-with-vars.css'; | ||
``` | ||
Otherwise include it in your HTML file: | ||
```html | ||
<link | ||
rel="stylesheet" | ||
href="./node_modules/@vtmn/css-loader/dist/index.css" | ||
href="./node_modules/@vtmn/css-design-tokens/dist/index.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./node_modules/@vtmn/css-loader/dist/index-with-vars.css" | ||
/> | ||
``` | ||
@@ -92,0 +131,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
31361
7
652
157