diff --git a/package.json b/package.json index 491ca1168..4664a8bf5 100644 --- a/package.json +++ b/package.json @@ -86,15 +86,15 @@ "postcss-custom-properties": "^5.0.2", "postcss-custom-selectors": "^3.0.0", "postcss-flexbugs-fixes": "^2.1.0", + "postcss-global-import": "^1.0.0", + "postcss-import": "^9.1.0", "postcss-loader": "^1.2.2", "postcss-media-minmax": "^2.1.2", "postcss-nested": "^1.0.0", "postcss-nesting": "^2.3.1", - "postcss-partial-import": "^3.1.0", "postcss-pseudoelements": "^3.0.0", "postcss-selector-matches": "^2.0.5", "postcss-selector-not": "^2.0.0", - "postcss-url": "^5.1.2", "pre-commit": "^1.2.2", "raw-loader": "^0.5.1", "react-addons-test-utils": "^15.4.2", diff --git a/src/components/Layout/Layout.css b/src/components/Layout/Layout.css index 0721f7a4a..11f5ebd09 100644 --- a/src/components/Layout/Layout.css +++ b/src/components/Layout/Layout.css @@ -7,12 +7,10 @@ * LICENSE.txt file in the root directory of this source tree. */ -@import '../../../node_modules/normalize.css/normalize.css'; - -/*! React Starter Kit | MIT License | https://www.reactstarterkit.com/ */ - @import '../variables.css'; +@global-import 'normalize.css' ; + /* * Base styles * ========================================================================== */ diff --git a/tools/postcss.config.js b/tools/postcss.config.js index 75eb477ea..13e1ed044 100644 --- a/tools/postcss.config.js +++ b/tools/postcss.config.js @@ -11,12 +11,13 @@ module.exports = () => ({ // The list of plugins for PostCSS // https://github.com/postcss/postcss plugins: [ + // Transfer @global-import rule by inlining content with :global CSS Modules scope + // e.g. @global-import 'draft-js/dist/Draft.css' + // https://github.com/scherebedov/postcss-global-import + require('postcss-global-import')(), // Transfer @import rule by inlining content, e.g. @import 'normalize.css' - // https://github.com/jonathantneal/postcss-partial-import - require('postcss-partial-import')(), - // Allow you to fix url() according to postcss to and/or from options - // https://github.com/postcss/postcss-url - require('postcss-url')(), + // https://github.com/postcss/postcss-import + require('postcss-import')(), // W3C variables, e.g. :root { --color: red; } div { background: var(--color); } // https://github.com/postcss/postcss-custom-properties require('postcss-custom-properties')(), diff --git a/yarn.lock b/yarn.lock index 51d838e17..c01bed45b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2018,14 +2018,6 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" -directory-encoder@^0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/directory-encoder/-/directory-encoder-0.7.2.tgz#59b4e2aa4f25422f6c63b527b462f5e2d0dd2c58" - dependencies: - fs-extra "^0.23.1" - handlebars "^1.3.0" - img-stats "^0.5.2" - doctrine@1.5.0, doctrine@^1.2.2: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -2850,15 +2842,6 @@ fs-extra@1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" -fs-extra@^0.23.1: - version "0.23.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.23.1.tgz#6611dba6adf2ab8dc9c69fab37cddf8818157e3d" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - fs-readdir-recursive@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" @@ -3064,14 +3047,6 @@ gzip-size@^3.0.0: dependencies: duplexer "^0.1.1" -handlebars@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-1.3.0.tgz#9e9b130a93e389491322d975cf3ec1818c37ce34" - dependencies: - optimist "~0.3" - optionalDependencies: - uglify-js "~2.3" - har-validator@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" @@ -3236,12 +3211,6 @@ ignore@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.2.tgz#1c51e1ef53bab6ddc15db4d9ac4ec139eceb3410" -img-stats@^0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/img-stats/-/img-stats-0.5.2.tgz#c203496c42f2d9eb2e5ab8232fa756bab32c9e2b" - dependencies: - xmldom "^0.1.19" - immutable@3.8.1, immutable@^3.7.6: version "3.8.1" resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.1.tgz#200807f11ab0f72710ea485542de088075f68cd2" @@ -3565,7 +3534,7 @@ joi@^6.10.1, joi@~6.10.1: moment "2.x.x" topo "1.x.x" -js-base64@^2.1.5, js-base64@^2.1.9: +js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" @@ -4227,7 +4196,7 @@ mime@1.2.x: version "1.2.11" resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.11.tgz#58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10" -mime@1.3.4, "mime@>= 0.0.1", mime@^1.2.11, mime@^1.3.4: +mime@1.3.4, "mime@>= 0.0.1", mime@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" @@ -4586,12 +4555,6 @@ opn@4.0.2: object-assign "^4.0.1" pinkie-promise "^2.0.0" -optimist@~0.3, optimist@~0.3.5: - version "0.3.7" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9" - dependencies: - wordwrap "~0.0.2" - optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" @@ -4939,7 +4902,14 @@ postcss-flexbugs-fixes@^2.1.0: dependencies: postcss "^5.0.0" -postcss-import@^9.0.0: +postcss-global-import@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/postcss-global-import/-/postcss-global-import-1.0.0.tgz#763bc16e3d78a30c82f44fd2129be8d08419809d" + dependencies: + postcss "^5.2.4" + resolve "^1.1.7" + +postcss-import@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-9.1.0.tgz#95fe9876a1e79af49fbdc3589f01fe5aa7cc1e80" dependencies: @@ -5120,13 +5090,6 @@ postcss-ordered-values@^2.1.0: postcss "^5.0.4" postcss-value-parser "^3.0.1" -postcss-partial-import@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/postcss-partial-import/-/postcss-partial-import-3.1.0.tgz#170e8203880475974ac0bf56039bc68c43539987" - dependencies: - glob "^7.1.1" - postcss-import "^9.0.0" - postcss-pseudoelements@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/postcss-pseudoelements/-/postcss-pseudoelements-3.0.0.tgz#6c682177c7900ba053b6df17f8c590284c7b8bbc" @@ -5228,18 +5191,6 @@ postcss-unique-selectors@^2.0.2: postcss "^5.0.4" uniqs "^2.0.0" -postcss-url@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/postcss-url/-/postcss-url-5.1.2.tgz#98b3165be8d592471cb0caadde2c0d1f832f133e" - dependencies: - directory-encoder "^0.7.2" - js-base64 "^2.1.5" - mime "^1.2.11" - minimatch "^3.0.0" - mkdirp "^0.5.0" - path-is-absolute "^1.0.0" - postcss "^5.0.0" - postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" @@ -6080,12 +6031,6 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, sour version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" -source-map@~0.1.7: - version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - dependencies: - amdefine ">=0.0.4" - spawn-sync@^1.0.15: version "1.0.15" resolved "https://registry.yarnpkg.com/spawn-sync/-/spawn-sync-1.0.15.tgz#b00799557eb7fb0c8376c29d44e8a1ea67e57476" @@ -6566,14 +6511,6 @@ uglify-js@^2.7.5: uglify-to-browserify "~1.0.0" yargs "~3.10.0" -uglify-js@~2.3: - version "2.3.6" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.3.6.tgz#fa0984770b428b7a9b2a8058f46355d14fef211a" - dependencies: - async "~0.2.6" - optimist "~0.3.5" - source-map "~0.1.7" - uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" @@ -6853,7 +6790,7 @@ wkx@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.2.0.tgz#76c24f16acd0cd8f93cd34aa331e0f7961256e84" -wordwrap@0.0.2, wordwrap@~0.0.2: +wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" @@ -6903,10 +6840,6 @@ wtf-8@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" -xmldom@^0.1.19: - version "0.1.27" - resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9" - xmlhttprequest-ssl@1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d"