Some fixes and include extract text webpack plugin

old
Javi Velasco 2015-10-29 13:40:12 +01:00
parent a0df322146
commit be1bde6ef5
8 changed files with 10 additions and 7 deletions

View File

@ -7,7 +7,6 @@
height: $button-height; height: $button-height;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
overflow: hidden;
color: $button-default-text-color; color: $button-default-text-color;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
@ -107,6 +106,7 @@
[data-react-toolbox="ripple"] { [data-react-toolbox="ripple"] {
border-radius: 50%; border-radius: 50%;
overflow: hidden;
} }
} }

View File

@ -55,7 +55,7 @@ class ListItem extends React.Component {
render () { render () {
return ( return (
<li onClick={this.handleClick} onMouseDown={this.handleMouseDown}> <li className={style['list-item']} onClick={this.handleClick} onMouseDown={this.handleMouseDown}>
{ this.props.to ? <a href={this.props.to}>{this.renderContent()}</a> : this.renderContent() } { this.props.to ? <a href={this.props.to}>{this.renderContent()}</a> : this.renderContent() }
</li> </li>
); );

View File

@ -32,7 +32,7 @@
.list + & { .list + & {
margin-top: - $list-vertical-padding; margin-top: - $list-vertical-padding;
} }
.item ~ & { .list-item ~ & {
margin: $list-vertical-padding 0; margin: $list-vertical-padding 0;
} }
} }

View File

@ -20,7 +20,6 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: $z-index-normal; z-index: $z-index-normal;
overflow: hidden;
pointer-events: none; pointer-events: none;
} }

View File

@ -59,6 +59,7 @@
"eslint-plugin-react": "^3.3.1", "eslint-plugin-react": "^3.3.1",
"expect": "^1.8.0", "expect": "^1.8.0",
"express": "^4.13.3", "express": "^4.13.3",
"extract-text-webpack-plugin": "^0.8.2",
"karma": "^0.13.3", "karma": "^0.13.3",
"karma-chrome-launcher": "^0.2.0", "karma-chrome-launcher": "^0.2.0",
"karma-cli": "^0.1.0", "karma-cli": "^0.1.0",

View File

@ -13,6 +13,7 @@
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<meta name="HandheldFriendly" content="True"> <meta name="HandheldFriendly" content="True">
<meta http-equiv="cleartype" content="on"> <meta http-equiv="cleartype" content="on">
<link rel="stylesheet" href="/build/spec.css">
</head> </head>
<body> <body>
<div id="toolbox-test"></div> <div id="toolbox-test"></div>

View File

@ -3,10 +3,10 @@
> h1, > h3 { > h1, > h3 {
line-height: 100%; line-height: 100%;
} }
h5 { section > h5 {
margin-top: 3.2rem; margin-top: 3.2rem;
} }
p { section > p {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
[data-react-toolbox='card'] { [data-react-toolbox='card'] {

View File

@ -1,6 +1,7 @@
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const autoprefixer = require('autoprefixer'); const autoprefixer = require('autoprefixer');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = { module.exports = {
context: __dirname, context: __dirname,
@ -25,12 +26,13 @@ module.exports = {
loader: 'babel' loader: 'babel'
}, { }, {
test: /(\.scss|\.css)$/, test: /(\.scss|\.css)$/,
loader: 'style!css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass' loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass')
} }
] ]
}, },
postcss: [autoprefixer], postcss: [autoprefixer],
plugins: [ plugins: [
new ExtractTextPlugin('spec.css', { allChunks: true }),
new webpack.HotModuleReplacementPlugin(), new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(), new webpack.NoErrorsPlugin(),
new webpack.DefinePlugin({ new webpack.DefinePlugin({