From d7e4a477d538811b46f79554e59bad430fc524ac Mon Sep 17 00:00:00 2001 From: Tobias Date: Tue, 23 Apr 2019 21:08:50 +0200 Subject: [PATCH] fix: process every css custom property on builds. This fixes IE11 issues as we use this as a polyfill --- .../dnb-ui-lib/scripts/prepub/config/postcssConfig.js | 8 +------- packages/dnb-ui-lib/src/style/index.js | 4 +--- packages/dnb-ui-lib/src/style/index.scss | 9 +++++++++ 3 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 packages/dnb-ui-lib/src/style/index.scss diff --git a/packages/dnb-ui-lib/scripts/prepub/config/postcssConfig.js b/packages/dnb-ui-lib/scripts/prepub/config/postcssConfig.js index 7094d72e1d1..72f58150a06 100644 --- a/packages/dnb-ui-lib/scripts/prepub/config/postcssConfig.js +++ b/packages/dnb-ui-lib/scripts/prepub/config/postcssConfig.js @@ -17,13 +17,7 @@ module.exports = ({ IE11 = false, ...options } = {}) => { browsers: ['last 2 versions', IE11 ? 'explorer >= 11' : null].filter( i => i ), - importFrom: [ - extractCSSProperties('./src/style/core/properties.scss', { - // includePaths: [ - // path.resolve(__dirname, '../../../src/style/core/') - // ] - }) - ], + importFrom: [extractCSSProperties('./src/style/index.scss')], ...options }), diff --git a/packages/dnb-ui-lib/src/style/index.js b/packages/dnb-ui-lib/src/style/index.js index 27675f58bbe..403ccd7b90d 100644 --- a/packages/dnb-ui-lib/src/style/index.js +++ b/packages/dnb-ui-lib/src/style/index.js @@ -3,6 +3,4 @@ * */ -import './dnb-ui-core.scss' -import './dnb-ui-components.scss' -import './themes/theme-ui/dnb-theme-ui.scss' +import './index.scss' diff --git a/packages/dnb-ui-lib/src/style/index.scss b/packages/dnb-ui-lib/src/style/index.scss new file mode 100644 index 00000000000..a70211c9a20 --- /dev/null +++ b/packages/dnb-ui-lib/src/style/index.scss @@ -0,0 +1,9 @@ +/* +* This package includes the DNB core styles +* +*/ + +// default packages import +@import './dnb-ui-core.scss'; +@import './dnb-ui-components.scss'; +@import './themes/theme-ui/dnb-theme-ui.scss';