Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

fix(select): Ensure disabled styles render correctly #286

Merged
merged 1 commit into from
Feb 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"mkdirp": "^0.5.1",
"node-sass": "^3.7.0",
"npm-run-all": "^2.3.0",
"postcss-loader": "^0.9.1",
"postcss-loader": "^1.2.2",
"raw-loader": "^0.5.1",
"sass-loader": "^4.1.1",
"semver": "^5.3.0",
Expand All @@ -69,7 +69,7 @@
"stylelint": "^7.8.0",
"stylelint-config-standard": "^16.0.0",
"stylelint-order": "^0.2.2",
"stylelint-scss": "^1.2.1",
"stylelint-scss": "^1.4.1",
"stylelint-selector-bem-pattern": "^1.0.0",
"tape": "^4.6.0",
"testdouble": "^1.6.0",
Expand Down Expand Up @@ -105,8 +105,5 @@
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"dependencies": {
"stylelint-scss": "^1.4.1"
}
}
12 changes: 8 additions & 4 deletions packages/mdc-select/mdc-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,16 @@
pointer-events: none;
// Imitate native disabled functionality
user-select: none;
}

@include mdc-theme-dark(".mdc-select", true) {
@include mdc-theme-prop(color, text-disabled-on-dark);
@include mdc-select-dd-arrow-svg-bg_(ffffff, .38);
@each $sel in ("mdc-select--disabled", "mdc-select[disabled]") {
.#{$sel} {
@include mdc-theme-dark(".mdc-select", true) {
@include mdc-theme-prop(color, text-disabled-on-dark);
@include mdc-select-dd-arrow-svg-bg_(ffffff, .38);

border-bottom: 1px dotted rgba(white, .38);
border-bottom: 1px dotted rgba(white, .38);
}
}
}

Expand Down
59 changes: 26 additions & 33 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,28 @@ if (LIFECYCLE_EVENT == 'test' || LIFECYCLE_EVENT == 'test:watch') {
process.env.BABEL_ENV = 'test';
}

const CSS_LOADER_CONFIG = [
{
loader: 'css-loader',
options: {
sourceMap: true,
},
},
{
loader: 'postcss-loader',
options: {
plugins: () =>[require('autoprefixer')({grid: false})],
},
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
includePaths: glob.sync('packages/*/node_modules').map((d) => path.join(__dirname, d)),
},
},
];

module.exports = [{
name: 'js-components',
entry: {
Expand Down Expand Up @@ -145,43 +167,14 @@ module.exports = [{
module: {
rules: [{
test: /\.scss$/,
use: IS_DEV ? [{
loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
sourceMap: true,
},
},
{
loader: 'postcss-loader',
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
},
}] : ExtractTextPlugin.extract('css-loader!postcss-loader!sass-loader'),
use: IS_DEV ? [{loader: 'style-loader'}].concat(CSS_LOADER_CONFIG) : ExtractTextPlugin.extract({
fallback: 'style-loader',
use: CSS_LOADER_CONFIG,
}),
}],
},
plugins: [
new ExtractTextPlugin('[name].' + (IS_PROD ? 'min.' : '') + 'css'),
createBannerPlugin(),
new webpack.LoaderOptionsPlugin({
debug: true,
options: {
context: __dirname,
output: {
path: OUT_PATH,
},
postcss: {
plugins: () =>[require('autoprefixer')({grid: false})],
},
sassLoader: {
includePaths: glob.sync('packages/*/node_modules').map((d) => path.join(__dirname, d)),
},
},
}),
],
}];