Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* update webpack config to make "Basic usage" work.

I use webpack version 2.6 and new configure syntax rather than 1.x.

When I follow the instruction on `readme.md`. It always failed on *Basic Usage* with the message below.
``` bash
ERROR in ./~/css-loader?{"modules":false,"importLoaders":1,"localIdentName":"[name]--[local]--[hash:base64:8]"}!./~/postcss-loader/lib!./~/react-toolbox/lib/button/theme.css
  Module build failed: Error: composition is only allowed when selector is single :local class name not in ".raised", ".raised" is weird
```

So I figured out what's wrong and update `reame.md` to notify others.

* edit multiple number.

According to docs, the width is larger than 320px and if the device is mobile than 280px. To follow this specification It should be 5, not 4.
  • Loading branch information
the1900 authored and javivelasco committed Aug 2, 2017
1 parent 16ae9bf commit 843b88a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ Declare plugins to be used by postcss (as part of webpack's config object):
},
```

Configure webpack 2.x or 3.x loader for .css files to use postcss:
```js
{
test: /\.css$/,
use: [
"style-loader",
{
loader: "css-loader",
options: {
modules: true, // default is false
sourceMap: true,
importLoaders: 1,
localIdentName: "[name]--[local]--[hash:base64:8]"
}
},
"postcss-loader"
]
}
```

## Basic usage

In this minimal example, we import a `Button` with styles already bundled:
Expand Down
2 changes: 1 addition & 1 deletion components/drawer/config.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
--drawer-border-color: var(--palette-grey-300);
--drawer-text-color: var(--palette-grey-800);
--drawer-width: calc(24 * var(--unit));
--drawer-desktop-width: calc(4 * var(--standard-increment-desktop));
--drawer-desktop-width: calc(5 * var(--standard-increment-desktop));
--drawer-mobile-width: calc(5 * var(--standard-increment-mobile));
}

0 comments on commit 843b88a

Please sign in to comment.