Skip to content

Commit

Permalink
Using new EUI globals files and importing Charts themes via SASS (#76821
Browse files Browse the repository at this point in the history
)
  • Loading branch information
cchaos authored Sep 8, 2020
1 parent a9adf10 commit b149a60
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 42 deletions.
20 changes: 4 additions & 16 deletions packages/kbn-ui-shared-deps/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,10 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({
mode: dev ? 'development' : 'production',
entry: {
'kbn-ui-shared-deps': './entry.js',
'kbn-ui-shared-deps.v7.dark': [
'@elastic/eui/dist/eui_theme_dark.css',
'@elastic/charts/dist/theme_only_dark.css',
],
'kbn-ui-shared-deps.v7.light': [
'@elastic/eui/dist/eui_theme_light.css',
'@elastic/charts/dist/theme_only_light.css',
],
'kbn-ui-shared-deps.v8.dark': [
'@elastic/eui/dist/eui_theme_amsterdam_dark.css',
'@elastic/charts/dist/theme_only_dark.css',
],
'kbn-ui-shared-deps.v8.light': [
'@elastic/eui/dist/eui_theme_amsterdam_light.css',
'@elastic/charts/dist/theme_only_light.css',
],
'kbn-ui-shared-deps.v7.dark': ['@elastic/eui/dist/eui_theme_dark.css'],
'kbn-ui-shared-deps.v7.light': ['@elastic/eui/dist/eui_theme_light.css'],
'kbn-ui-shared-deps.v8.dark': ['@elastic/eui/dist/eui_theme_amsterdam_dark.css'],
'kbn-ui-shared-deps.v8.light': ['@elastic/eui/dist/eui_theme_amsterdam_light.css'],
},
context: __dirname,
devtool: dev ? '#cheap-source-map' : false,
Expand Down
5 changes: 1 addition & 4 deletions src/core/public/core_app/styles/_globals_v7dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// prepended to all .scss imports (from JS, when v7dark theme selected)

@import '@elastic/eui/src/themes/eui/eui_colors_dark';

@import '@elastic/eui/src/global_styling/functions/index';
@import '@elastic/eui/src/global_styling/variables/index';
@import '@elastic/eui/src/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui/eui_globals';

@import './mixins';
5 changes: 1 addition & 4 deletions src/core/public/core_app/styles/_globals_v7light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// prepended to all .scss imports (from JS, when v7light theme selected)

@import '@elastic/eui/src/themes/eui/eui_colors_light';

@import '@elastic/eui/src/global_styling/functions/index';
@import '@elastic/eui/src/global_styling/variables/index';
@import '@elastic/eui/src/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui/eui_globals';

@import './mixins';
10 changes: 1 addition & 9 deletions src/core/public/core_app/styles/_globals_v8dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
// prepended to all .scss imports (from JS, when v8dark theme selected)

@import '@elastic/eui/src/themes/eui-amsterdam/eui_amsterdam_colors_dark';

@import '@elastic/eui/src/global_styling/functions/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/functions/index';

@import '@elastic/eui/src/global_styling/variables/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/variables/index';

@import '@elastic/eui/src/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui-amsterdam/eui_amsterdam_globals';

@import './mixins';
10 changes: 1 addition & 9 deletions src/core/public/core_app/styles/_globals_v8light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
// prepended to all .scss imports (from JS, when v8light theme selected)

@import '@elastic/eui/src/themes/eui-amsterdam/eui_amsterdam_colors_light';

@import '@elastic/eui/src/global_styling/functions/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/functions/index';

@import '@elastic/eui/src/global_styling/variables/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/variables/index';

@import '@elastic/eui/src/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui-amsterdam/global_styling/mixins/index';
@import '@elastic/eui/src/themes/eui-amsterdam/eui_amsterdam_globals';

@import './mixins';
6 changes: 6 additions & 0 deletions src/core/public/styles/_base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
// Charts themes available app-wide
@import '@elastic/charts/dist/theme';
@import '@elastic/eui/src/themes/charts/theme';

// Grab some nav-specific EUI vars
@import '@elastic/eui/src/components/collapsible_nav/variables';

// Application Layout

// chrome-context
Expand Down

0 comments on commit b149a60

Please sign in to comment.