@shortfuse/materialdesignweb 0.2.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +2 -1
- package/.eslintrc.json +188 -30
- package/.stylelintrc.json +643 -2
- package/.vscode/launch.json +20 -5
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +36 -0
- package/README.md +82 -2
- package/adapters/datatable/column.js +176 -0
- package/adapters/datatable/index.js +253 -437
- package/adapters/dom/index.js +586 -0
- package/adapters/list/index.js +36 -113
- package/adapters/search/index.js +153 -180
- package/components/appbar/_spec.scss +165 -0
- package/components/appbar/_theme.scss +0 -0
- package/components/appbar/index.scss +2 -0
- package/components/banner/_spec.scss +83 -0
- package/components/banner/_theme.scss +0 -0
- package/components/banner/index.scss +2 -0
- package/components/bottomnav/README.md +4 -4
- package/components/bottomnav/_spec.scss +149 -0
- package/components/bottomnav/_theme.scss +0 -0
- package/components/bottomnav/index.js +100 -120
- package/components/bottomnav/index.scss +2 -0
- package/components/bottomnav/item.js +88 -0
- package/components/button/README.md +16 -22
- package/components/button/_spec.scss +162 -0
- package/components/button/_theme.scss +42 -0
- package/components/button/index.eta +32 -0
- package/components/button/index.js +37 -48
- package/components/button/index.pug +18 -0
- package/components/button/index.scss +2 -0
- package/components/card/_spec.scss +241 -0
- package/components/card/_theme.scss +0 -0
- package/components/card/index.scss +2 -0
- package/components/chip/_spec.scss +111 -0
- package/components/chip/_theme.scss +105 -0
- package/components/chip/index.js +23 -0
- package/components/chip/index.scss +2 -0
- package/components/chip/item.js +20 -0
- package/components/datatable/_spec.scss +225 -0
- package/components/datatable/_theme.scss +128 -0
- package/components/datatable/cell.js +44 -0
- package/components/datatable/columnheader.js +46 -0
- package/components/datatable/index.js +339 -443
- package/components/datatable/index.scss +2 -0
- package/components/datatable/row.js +48 -0
- package/components/datatable/rowheader.js +18 -0
- package/components/dialog/_spec.scss +203 -0
- package/components/dialog/_theme.scss +7 -0
- package/components/dialog/index.js +512 -437
- package/components/dialog/index.scss +2 -0
- package/components/divider/_spec.scss +11 -0
- package/components/divider/_theme.scss +0 -0
- package/components/divider/index.scss +2 -0
- package/components/elevation/_spec.scss +9 -0
- package/components/elevation/_theme.scss +0 -0
- package/components/elevation/index.scss +2 -0
- package/components/fab/{style.scss → _spec.scss} +104 -79
- package/components/fab/_theme.scss +0 -0
- package/components/fab/index.js +85 -79
- package/components/fab/index.scss +2 -0
- package/components/grid/_spec.scss +169 -0
- package/components/grid/_theme.scss +0 -0
- package/components/grid/index.scss +2 -0
- package/components/layout/_mixins.scss +11 -0
- package/components/layout/_spec.scss +916 -0
- package/components/layout/_theme.scss +19 -0
- package/components/layout/index.js +454 -0
- package/components/layout/index.scss +2 -0
- package/components/list/_spec.scss +363 -0
- package/components/list/_theme.scss +102 -0
- package/components/list/content.js +106 -0
- package/components/list/index.js +234 -79
- package/components/list/index.scss +2 -0
- package/components/list/item.js +167 -0
- package/components/list/secondary.js +45 -0
- package/components/menu/_spec.scss +329 -0
- package/components/menu/_theme.scss +0 -0
- package/components/menu/index.js +636 -651
- package/components/menu/index.scss +2 -0
- package/components/menu/item.js +231 -0
- package/components/progress/_spec.scss +156 -0
- package/components/progress/_theme.scss +0 -0
- package/components/progress/index.js +29 -13
- package/components/progress/index.scss +2 -0
- package/components/selection/_spec.scss +376 -0
- package/components/selection/_theme.scss +134 -0
- package/components/selection/index.eta +60 -0
- package/components/selection/index.js +70 -0
- package/components/selection/index.pug +30 -0
- package/components/selection/index.scss +2 -0
- package/components/selection/input.js +54 -0
- package/components/selection/radiogroup.js +40 -0
- package/components/slider/{style.scss → _spec.scss} +31 -34
- package/components/slider/_theme.scss +0 -0
- package/components/slider/index.scss +2 -0
- package/components/snackbar/_spec.scss +150 -0
- package/components/snackbar/_theme.scss +0 -0
- package/components/snackbar/index.js +293 -206
- package/components/snackbar/index.scss +2 -0
- package/components/tab/_spec.scss +220 -0
- package/components/tab/_theme.scss +0 -0
- package/components/tab/content.js +210 -0
- package/components/tab/index.js +229 -213
- package/components/tab/index.scss +2 -0
- package/components/tab/item.js +88 -0
- package/components/tab/list.js +196 -0
- package/components/tab/panel.js +54 -0
- package/components/textfield/README.md +4 -4
- package/components/textfield/_spec.scss +763 -0
- package/components/textfield/_theme.scss +264 -0
- package/components/textfield/index.eta +74 -0
- package/components/textfield/index.js +132 -138
- package/components/textfield/index.pug +30 -0
- package/components/textfield/index.scss +2 -0
- package/components/tooltip/_spec.scss +185 -0
- package/components/tooltip/_theme.scss +0 -0
- package/components/tooltip/index.scss +2 -0
- package/components/type/_spec.scss +227 -0
- package/components/type/_theme.scss +0 -0
- package/components/type/index.scss +2 -0
- package/core/_breakpoint.scss +189 -0
- package/core/_elevation.scss +78 -0
- package/core/_length.scss +8 -0
- package/core/_motion.scss +31 -0
- package/core/_platform.scss +12 -0
- package/core/_type.scss +128 -0
- package/core/aria/attributes.js +141 -0
- package/core/aria/button.js +49 -0
- package/core/aria/keyboard.js +92 -0
- package/core/aria/rovingtabindex.js +175 -0
- package/core/aria/tab.js +59 -0
- package/core/document/index.js +39 -0
- package/core/dom.js +180 -0
- package/core/overlay/_spec.scss +28 -0
- package/core/overlay/_theme.scss +147 -0
- package/core/overlay/index.js +95 -0
- package/core/overlay/index.scss +2 -0
- package/core/ripple/_spec.scss +196 -0
- package/core/ripple/_theme.scss +20 -0
- package/core/ripple/index.js +286 -0
- package/core/ripple/index.scss +2 -0
- package/core/theme/_aliases.scss +15 -0
- package/core/theme/_config.scss +8 -0
- package/core/theme/_functions.scss +22 -0
- package/{components/theming/palettes.scss → core/theme/_palettes.scss} +173 -151
- package/core/theme/_spec.scss +0 -0
- package/core/theme/_theme.scss +268 -0
- package/core/theme/index.js +50 -0
- package/core/theme/index.scss +4 -0
- package/core/throttler.js +42 -0
- package/core/transition/index.js +465 -0
- package/docs/_flex.scss +28 -0
- package/docs/_menuoptions.js +183 -0
- package/docs/_partials/_androidnavbar.eta +5 -0
- package/docs/_partials/_androidstatusbar.eta +13 -0
- package/docs/_partials/_appbar.eta +27 -0
- package/docs/_partials/_buttontest.eta +31 -0
- package/docs/_partials/_header.eta +146 -0
- package/docs/_partials/_navlistitem.eta +16 -0
- package/docs/_partials/_target.eta +1 -0
- package/docs/_sample-utils.js +88 -0
- package/docs/{src/storage.js → _storage.js} +0 -0
- package/docs/docs.scss +331 -0
- package/docs/framework.scss +26 -0
- package/docs/index.eta +12 -0
- package/docs/index.js +7 -0
- package/docs/pages/appbar.eta +108 -0
- package/docs/pages/appbar.js +0 -0
- package/docs/pages/bottomnav.eta +188 -0
- package/docs/pages/bottomnav.js +118 -0
- package/docs/pages/button.eta +124 -0
- package/docs/pages/button.js +224 -0
- package/docs/pages/card.eta +90 -0
- package/docs/pages/card.js +175 -0
- package/docs/pages/chip.eta +122 -0
- package/docs/pages/chip.js +80 -0
- package/docs/pages/color.eta +143 -0
- package/docs/pages/color.js +261 -0
- package/docs/pages/datatable.eta +323 -0
- package/docs/pages/datatable.js +160 -0
- package/docs/pages/dialog.eta +184 -0
- package/docs/{src/components → pages}/dialog.js +35 -48
- package/docs/pages/dom.eta +26 -0
- package/docs/pages/dom.js +140 -0
- package/docs/pages/elevation.eta +35 -0
- package/docs/pages/elevation.js +0 -0
- package/docs/pages/fab.eta +99 -0
- package/docs/{src/components → pages}/fab.js +6 -13
- package/docs/pages/grid.eta +135 -0
- package/docs/pages/grid.js +128 -0
- package/docs/pages/layout.eta +8 -0
- package/docs/pages/layout.js +0 -0
- package/docs/pages/list.eta +465 -0
- package/docs/pages/list.js +8 -0
- package/docs/pages/menu.eta +274 -0
- package/docs/{src/components → pages}/menu.js +26 -42
- package/docs/pages/overlay.eta +69 -0
- package/docs/pages/overlay.js +3 -0
- package/docs/pages/progress.eta +23 -0
- package/docs/{src/components → pages}/progress.js +2 -4
- package/docs/pages/ripple.eta +27 -0
- package/docs/pages/ripple.js +3 -0
- package/docs/pages/search.eta +242 -0
- package/docs/pages/search.js +226 -0
- package/docs/pages/selection.eta +107 -0
- package/docs/pages/selection.js +12 -0
- package/docs/pages/slider.eta +23 -0
- package/docs/pages/slider.js +0 -0
- package/docs/pages/snackbar.eta +83 -0
- package/docs/{src/components → pages}/snackbar.js +31 -36
- package/docs/pages/tab.eta +407 -0
- package/docs/pages/tab.js +152 -0
- package/docs/pages/textfield.eta +487 -0
- package/docs/{src/components → pages}/textfield.js +41 -45
- package/docs/pages/tooltip.eta +92 -0
- package/docs/pages/tooltip.js +0 -0
- package/docs/pages/transition.eta +117 -0
- package/docs/pages/transition.js +52 -0
- package/docs/pages/type.eta +31 -0
- package/docs/pages/type.js +0 -0
- package/docs/postrender.js +41 -0
- package/docs/prerender.js +16 -0
- package/docs/pwa/_dialogs.eta +143 -0
- package/docs/pwa/_menus.eta +16 -0
- package/docs/pwa/pwa-prerender.js +3 -0
- package/docs/pwa/pwa.eta +478 -0
- package/docs/pwa/pwa.js +298 -0
- package/docs/pwa/pwa.scss +31 -0
- package/docs/themes/theme-colored.scss +15 -0
- package/docs/themes/theme-default.scss +3 -0
- package/index.scss +27 -0
- package/jsconfig.json +8 -2
- package/package.json +54 -27
- package/scripts/deploy-docs.sh +9 -0
- package/templates/index.eta +2 -0
- package/templates/index.pug +3 -0
- package/tsconfig.json +16 -0
- package/utils/function.js +3 -0
- package/webpack.config.js +224 -68
- package/_index.scss +0 -4
- package/components/all-components.scss +0 -21
- package/components/bottomnav/style.scss +0 -190
- package/components/bottomnav/theming.scss +0 -76
- package/components/button/style.scss +0 -315
- package/components/button/theming.scss +0 -134
- package/components/card/style.scss +0 -175
- package/components/card/theming.scss +0 -43
- package/components/common/dom.js +0 -51
- package/components/common/functions.scss +0 -174
- package/components/common/mixins.scss +0 -122
- package/components/common/motion.scss +0 -36
- package/components/common/type.scss +0 -104
- package/components/common/variables.scss +0 -46
- package/components/datatable/style.scss +0 -257
- package/components/datatable/theming.scss +0 -119
- package/components/dialog/style.scss +0 -159
- package/components/dialog/theming.scss +0 -29
- package/components/divider/style.scss +0 -7
- package/components/divider/theming.scss +0 -20
- package/components/elevation/style.scss +0 -32
- package/components/layout/style.scss +0 -223
- package/components/list/style.scss +0 -358
- package/components/list/theming.scss +0 -83
- package/components/menu/style.scss +0 -280
- package/components/menu/theming.scss +0 -80
- package/components/navdrawer/index.js +0 -200
- package/components/navdrawer/style.scss +0 -595
- package/components/navdrawer/theming.scss +0 -62
- package/components/progress/style.scss +0 -136
- package/components/ripple/index.js +0 -63
- package/components/ripple/ripple.scss +0 -122
- package/components/selection/style.scss +0 -320
- package/components/selection/theming.scss +0 -98
- package/components/snackbar/style.scss +0 -212
- package/components/switch/style.scss +0 -3
- package/components/tab/style.scss +0 -275
- package/components/tab/theming.scss +0 -34
- package/components/template/theming.scss +0 -31
- package/components/textfield/style.scss +0 -795
- package/components/textfield/theming.scss +0 -256
- package/components/theming/globals.scss +0 -25
- package/components/theming/theming.scss +0 -559
- package/components/toolbar/style.scss +0 -190
- package/components/toolbar/theming.scss +0 -32
- package/components/tooltip/style.scss +0 -135
- package/components/type/style.scss +0 -167
- package/components/type/theming.scss +0 -25
- package/docs/bottomnav.html +0 -1
- package/docs/bottomnav.min.js +0 -2
- package/docs/bottomnav.min.js.map +0 -1
- package/docs/button.html +0 -1
- package/docs/button.min.js +0 -2
- package/docs/button.min.js.map +0 -1
- package/docs/card.html +0 -1
- package/docs/card.min.js +0 -2
- package/docs/card.min.js.map +0 -1
- package/docs/components.min.css +0 -1
- package/docs/components.min.js +0 -2
- package/docs/components.min.js.map +0 -1
- package/docs/datatable.html +0 -1
- package/docs/datatable.min.js +0 -2
- package/docs/datatable.min.js.map +0 -1
- package/docs/dialog.html +0 -1
- package/docs/dialog.min.js +0 -2
- package/docs/dialog.min.js.map +0 -1
- package/docs/docs.min.css +0 -1
- package/docs/docs.min.js +0 -2
- package/docs/docs.min.js.map +0 -1
- package/docs/elevation.html +0 -1
- package/docs/elevation.min.js +0 -2
- package/docs/elevation.min.js.map +0 -1
- package/docs/fab.html +0 -1
- package/docs/fab.min.js +0 -2
- package/docs/fab.min.js.map +0 -1
- package/docs/index.html +0 -1
- package/docs/index.min.js +0 -2
- package/docs/index.min.js.map +0 -1
- package/docs/layout.html +0 -1
- package/docs/layout.min.js +0 -2
- package/docs/layout.min.js.map +0 -1
- package/docs/list.html +0 -1
- package/docs/list.min.js +0 -2
- package/docs/list.min.js.map +0 -1
- package/docs/menu.html +0 -1
- package/docs/menu.min.js +0 -2
- package/docs/menu.min.js.map +0 -1
- package/docs/navdrawer.html +0 -1
- package/docs/navdrawer.min.js +0 -2
- package/docs/navdrawer.min.js.map +0 -1
- package/docs/prerender.min.js +0 -2
- package/docs/prerender.min.js.map +0 -1
- package/docs/progress.html +0 -1
- package/docs/progress.min.js +0 -2
- package/docs/progress.min.js.map +0 -1
- package/docs/search.html +0 -1
- package/docs/search.min.js +0 -2
- package/docs/search.min.js.map +0 -1
- package/docs/selection.html +0 -1
- package/docs/selection.min.js +0 -2
- package/docs/selection.min.js.map +0 -1
- package/docs/slider.html +0 -1
- package/docs/slider.min.js +0 -2
- package/docs/slider.min.js.map +0 -1
- package/docs/snackbar.html +0 -1
- package/docs/snackbar.min.js +0 -2
- package/docs/snackbar.min.js.map +0 -1
- package/docs/src/components/bottomnav.js +0 -16
- package/docs/src/components/bottomnav.pug +0 -112
- package/docs/src/components/button.js +0 -156
- package/docs/src/components/button.pug +0 -194
- package/docs/src/components/card.js +0 -136
- package/docs/src/components/card.pug +0 -133
- package/docs/src/components/datatable.js +0 -183
- package/docs/src/components/datatable.pug +0 -324
- package/docs/src/components/dialog.pug +0 -138
- package/docs/src/components/elevation.js +0 -3
- package/docs/src/components/elevation.pug +0 -17
- package/docs/src/components/fab.pug +0 -84
- package/docs/src/components/layout.js +0 -116
- package/docs/src/components/layout.pug +0 -104
- package/docs/src/components/list.js +0 -15
- package/docs/src/components/list.pug +0 -293
- package/docs/src/components/menu.pug +0 -292
- package/docs/src/components/navdrawer.js +0 -112
- package/docs/src/components/navdrawer.pug +0 -113
- package/docs/src/components/progress.pug +0 -17
- package/docs/src/components/search.js +0 -206
- package/docs/src/components/search.pug +0 -149
- package/docs/src/components/selection.js +0 -6
- package/docs/src/components/selection.pug +0 -116
- package/docs/src/components/slider.js +0 -3
- package/docs/src/components/slider.pug +0 -19
- package/docs/src/components/snackbar.pug +0 -145
- package/docs/src/components/tab.js +0 -137
- package/docs/src/components/tab.pug +0 -329
- package/docs/src/components/textfield.pug +0 -416
- package/docs/src/components/toolbar.js +0 -6
- package/docs/src/components/toolbar.pug +0 -86
- package/docs/src/components/tooltip.js +0 -6
- package/docs/src/components/tooltip.pug +0 -76
- package/docs/src/components/type.js +0 -6
- package/docs/src/components/type.pug +0 -34
- package/docs/src/components.scss +0 -1
- package/docs/src/docs.scss +0 -284
- package/docs/src/index.js +0 -3
- package/docs/src/index.pug +0 -6
- package/docs/src/menuoptions.js +0 -136
- package/docs/src/mixins.pug +0 -139
- package/docs/src/prerender.js +0 -26
- package/docs/src/sample-utils.js +0 -108
- package/docs/src/targetHandler.js +0 -50
- package/docs/src/theming.ie11.scss +0 -18
- package/docs/src/theming.scss +0 -18
- package/docs/tab.html +0 -1
- package/docs/tab.min.js +0 -2
- package/docs/tab.min.js.map +0 -1
- package/docs/textfield.html +0 -2
- package/docs/textfield.min.js +0 -2
- package/docs/textfield.min.js.map +0 -1
- package/docs/theming.ie11.min.css +0 -1
- package/docs/theming.ie11.min.js +0 -2
- package/docs/theming.ie11.min.js.map +0 -1
- package/docs/theming.min.css +0 -1
- package/docs/theming.min.js +0 -2
- package/docs/theming.min.js.map +0 -1
- package/docs/toolbar.html +0 -1
- package/docs/toolbar.min.js +0 -2
- package/docs/toolbar.min.js.map +0 -1
- package/docs/tooltip.html +0 -1
- package/docs/tooltip.min.js +0 -2
- package/docs/tooltip.min.js.map +0 -1
- package/docs/type.html +0 -1
- package/docs/type.min.js +0 -2
- package/docs/type.min.js.map +0 -1
- package/index.js +0 -16
|
@@ -1,559 +0,0 @@
|
|
|
1
|
-
@import 'palettes.scss';
|
|
2
|
-
@import '../common/functions.scss';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@import './globals.scss';
|
|
6
|
-
|
|
7
|
-
@import '../bottomnav/theming.scss';
|
|
8
|
-
@import '../button/theming.scss';
|
|
9
|
-
@import '../card/theming.scss';
|
|
10
|
-
@import '../datatable/theming.scss';
|
|
11
|
-
@import '../dialog/theming.scss';
|
|
12
|
-
@import '../divider/theming.scss';
|
|
13
|
-
@import '../list/theming.scss';
|
|
14
|
-
@import '../menu/theming.scss';
|
|
15
|
-
@import '../navdrawer/theming.scss';
|
|
16
|
-
@import '../selection/theming.scss';
|
|
17
|
-
@import '../tab/theming.scss';
|
|
18
|
-
@import '../textfield/theming.scss';
|
|
19
|
-
@import '../toolbar/theming.scss';
|
|
20
|
-
@import '../type/theming.scss';
|
|
21
|
-
|
|
22
|
-
$tone-list: ("50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "A100", "A200", "A400", "A700");
|
|
23
|
-
$added-palettes-list: ();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@mixin buildMDWThemes($config-map: ()) {
|
|
27
|
-
$theme-components: (
|
|
28
|
-
'bottomnav',
|
|
29
|
-
'button',
|
|
30
|
-
'card',
|
|
31
|
-
'datatable',
|
|
32
|
-
'dialog',
|
|
33
|
-
'divider',
|
|
34
|
-
'list',
|
|
35
|
-
'menu',
|
|
36
|
-
'navdrawer',
|
|
37
|
-
'selection',
|
|
38
|
-
'tab',
|
|
39
|
-
'textfield',
|
|
40
|
-
'toolbar'
|
|
41
|
-
);
|
|
42
|
-
$themes: (
|
|
43
|
-
"default": ('indigo', 'pink', 'red'),
|
|
44
|
-
);
|
|
45
|
-
$explicit-colors: ();
|
|
46
|
-
$automatic-contrast: 'no';
|
|
47
|
-
$ie11-support: 'only';
|
|
48
|
-
$ie11-media-wrap: 'no';
|
|
49
|
-
@if (map-has-key($config-map, $key: "theme-components")) {
|
|
50
|
-
$theme-components: map-get($config-map, "theme-components");
|
|
51
|
-
}
|
|
52
|
-
@if (map-has-key($config-map, $key: "themes")) {
|
|
53
|
-
$themes: map-get($config-map, "themes");
|
|
54
|
-
}
|
|
55
|
-
@if (map-has-key($map: $config-map, $key: "explicit-colors")) {
|
|
56
|
-
$explicit-colors: map-get($config-map, "explicit-colors");
|
|
57
|
-
}
|
|
58
|
-
@if (map-has-key($map: $config-map, $key: "automatic-contrast")) {
|
|
59
|
-
$automatic-contrast: map-get($config-map, "automatic-contrast");
|
|
60
|
-
}
|
|
61
|
-
@if (map-has-key($map: $config-map, $key: "ie11-support")) {
|
|
62
|
-
$ie11-support: map-get($config-map, "ie11-support");
|
|
63
|
-
}
|
|
64
|
-
@if (map-has-key($map: $config-map, $key: "ie11-media-wrap")) {
|
|
65
|
-
$ie11-media-wrap: map-get($config-map, "ie11-media-wrap");
|
|
66
|
-
}
|
|
67
|
-
$mdw-theme__components: $theme-components !global;
|
|
68
|
-
$mdw-theme__explicit-colors: $explicit-colors !global;
|
|
69
|
-
$mdw-theme__automatic-contrast: $automatic-contrast !global;
|
|
70
|
-
$mdw-theme__ie11-support: $ie11-support !global;
|
|
71
|
-
$mdw-theme__themes: $themes !global;
|
|
72
|
-
$mdw-theme__ie11-media-wrap: $ie11-media-wrap !global;
|
|
73
|
-
@include buildThemes();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@mixin lightVariables($color:"background") {
|
|
77
|
-
@include globalThemeVariables($color, 'light');
|
|
78
|
-
|
|
79
|
-
@if (index($mdw-theme__components, 'bottomnav')) {
|
|
80
|
-
@include bottomnavThemeVariables($color, 'light');
|
|
81
|
-
}
|
|
82
|
-
@if (index($mdw-theme__components, 'button')) {
|
|
83
|
-
@include buttonThemeVariables($color, 'light');
|
|
84
|
-
}
|
|
85
|
-
@if (index($mdw-theme__components, 'card')) {
|
|
86
|
-
@include cardThemeVariables($color, 'light');
|
|
87
|
-
}
|
|
88
|
-
@if (index($mdw-theme__components, 'datatable')) {
|
|
89
|
-
@include datatableThemeVariables($color, 'light');
|
|
90
|
-
}
|
|
91
|
-
@if (index($mdw-theme__components, 'dialog')) {
|
|
92
|
-
@include dialogThemeVariables($color, 'light');
|
|
93
|
-
}
|
|
94
|
-
@if (index($mdw-theme__components, 'divider')) {
|
|
95
|
-
@include dividerThemeVariables($color, 'light');
|
|
96
|
-
}
|
|
97
|
-
@if (index($mdw-theme__components, 'list')) {
|
|
98
|
-
@include listThemeVariables($color, 'light');
|
|
99
|
-
}
|
|
100
|
-
@if (index($mdw-theme__components, 'menu')) {
|
|
101
|
-
@include menuThemeVariables($color, 'light');
|
|
102
|
-
}
|
|
103
|
-
@if (index($mdw-theme__components, 'navdrawer')) {
|
|
104
|
-
@include navdrawerThemeVariables($color, 'light');
|
|
105
|
-
}
|
|
106
|
-
@if (index($mdw-theme__components, 'selection')) {
|
|
107
|
-
@include selectionThemeVariables($color, 'light');
|
|
108
|
-
}
|
|
109
|
-
@if (index($mdw-theme__components, 'tab')) {
|
|
110
|
-
@include tabThemeVariables($color, 'light');
|
|
111
|
-
}
|
|
112
|
-
@if (index($mdw-theme__components, 'textfield')) {
|
|
113
|
-
@include textfieldThemeVariables($color, 'light');
|
|
114
|
-
}
|
|
115
|
-
@if (index($mdw-theme__components, 'toolbar')) {
|
|
116
|
-
@include toolbarThemeVariables($color, 'light');
|
|
117
|
-
}
|
|
118
|
-
@if (index($mdw-theme__components, 'type')) {
|
|
119
|
-
@include typeThemeVariables($color, 'light');
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
@mixin darkVariables($color:"background") {
|
|
124
|
-
@include globalThemeVariables($color, 'dark');
|
|
125
|
-
|
|
126
|
-
@if (index($mdw-theme__components, 'bottomnav')) {
|
|
127
|
-
@include bottomnavThemeVariables($color, 'dark');
|
|
128
|
-
}
|
|
129
|
-
@if (index($mdw-theme__components, 'button')) {
|
|
130
|
-
@include buttonThemeVariables($color, 'dark');
|
|
131
|
-
}
|
|
132
|
-
@if (index($mdw-theme__components, 'card')) {
|
|
133
|
-
@include cardThemeVariables($color, 'dark');
|
|
134
|
-
}
|
|
135
|
-
@if (index($mdw-theme__components, 'datatable')) {
|
|
136
|
-
@include datatableThemeVariables($color, 'dark');
|
|
137
|
-
}
|
|
138
|
-
@if (index($mdw-theme__components, 'dialog')) {
|
|
139
|
-
@include dialogThemeVariables($color, 'dark');
|
|
140
|
-
}
|
|
141
|
-
@if (index($mdw-theme__components, 'divider')) {
|
|
142
|
-
@include dividerThemeVariables($color, 'dark');
|
|
143
|
-
}
|
|
144
|
-
@if (index($mdw-theme__components, 'list')) {
|
|
145
|
-
@include listThemeVariables($color, 'dark');
|
|
146
|
-
}
|
|
147
|
-
@if (index($mdw-theme__components, 'menu')) {
|
|
148
|
-
@include menuThemeVariables($color, 'dark');
|
|
149
|
-
}
|
|
150
|
-
@if (index($mdw-theme__components, 'navdrawer')) {
|
|
151
|
-
@include navdrawerThemeVariables($color, 'dark');
|
|
152
|
-
}
|
|
153
|
-
@if (index($mdw-theme__components, 'selection')) {
|
|
154
|
-
@include selectionThemeVariables($color, 'dark');
|
|
155
|
-
}
|
|
156
|
-
@if (index($mdw-theme__components, 'tab')) {
|
|
157
|
-
@include tabThemeVariables($color, 'dark');
|
|
158
|
-
}
|
|
159
|
-
@if (index($mdw-theme__components, 'textfield')) {
|
|
160
|
-
@include textfieldThemeVariables($color, 'dark');
|
|
161
|
-
}
|
|
162
|
-
@if (index($mdw-theme__components, 'toolbar')) {
|
|
163
|
-
@include toolbarThemeVariables($color, 'dark');
|
|
164
|
-
}
|
|
165
|
-
@if (index($mdw-theme__components, 'type')) {
|
|
166
|
-
@include typeThemeVariables($color, 'dark');
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
@mixin componentContrastAndThemeRules($type: 'var', $theme: null) {
|
|
171
|
-
@if (index($mdw-theme__components, 'datatable')) {
|
|
172
|
-
@include datatableContrastAndThemeRules($type, $theme);
|
|
173
|
-
}
|
|
174
|
-
@if (index($mdw-theme__components, 'textfield')) {
|
|
175
|
-
@include textfieldContrastAndThemeRules($type, $theme);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
@mixin componentContrastRules($type: 'var', $theme: null) {
|
|
180
|
-
@include globalContrastRules($type, $theme);
|
|
181
|
-
@if (index($mdw-theme__components, 'bottomnav')) {
|
|
182
|
-
@include bottomnavContrastRules($type, $theme);
|
|
183
|
-
}
|
|
184
|
-
@if (index($mdw-theme__components, 'button')) {
|
|
185
|
-
@include buttonContrastRules($type, $theme);
|
|
186
|
-
}
|
|
187
|
-
@if (index($mdw-theme__components, 'card')) {
|
|
188
|
-
@include cardContrastRules($type, $theme);
|
|
189
|
-
}
|
|
190
|
-
@if (index($mdw-theme__components, 'datatable')) {
|
|
191
|
-
@include datatableContrastRules($type, $theme);
|
|
192
|
-
}
|
|
193
|
-
@if (index($mdw-theme__components, 'dialog')) {
|
|
194
|
-
@include dialogContrastRules($type, $theme);
|
|
195
|
-
}
|
|
196
|
-
@if (index($mdw-theme__components, 'divider')) {
|
|
197
|
-
@include dividerContrastRules($type, $theme);
|
|
198
|
-
}
|
|
199
|
-
@if (index($mdw-theme__components, 'list')) {
|
|
200
|
-
@include listContrastRules($type, $theme);
|
|
201
|
-
}
|
|
202
|
-
@if (index($mdw-theme__components, 'menu')) {
|
|
203
|
-
@include menuContrastRules($type, $theme);
|
|
204
|
-
}
|
|
205
|
-
@if (index($mdw-theme__components, 'navdrawer')) {
|
|
206
|
-
@include navdrawerContrastRules($type, $theme);
|
|
207
|
-
}
|
|
208
|
-
@if (index($mdw-theme__components, 'selection')) {
|
|
209
|
-
@include selectionContrastRules($type, $theme);
|
|
210
|
-
}
|
|
211
|
-
@if (index($mdw-theme__components, 'tab')) {
|
|
212
|
-
@include tabContrastRules($type, $theme);
|
|
213
|
-
}
|
|
214
|
-
@if (index($mdw-theme__components, 'textfield')) {
|
|
215
|
-
@include textfieldContrastRules($type, $theme);
|
|
216
|
-
}
|
|
217
|
-
@if (index($mdw-theme__components, 'toolbar')) {
|
|
218
|
-
@include toolbarContrastRules($type, $theme);
|
|
219
|
-
}
|
|
220
|
-
@if (index($mdw-theme__components, 'type')) {
|
|
221
|
-
@include typeContrastRules($type, $theme);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
@mixin componentThemeRules($theme: null) {
|
|
226
|
-
@if (index($mdw-theme__components, 'button')) {
|
|
227
|
-
@include buttonThemeRules($theme);
|
|
228
|
-
}
|
|
229
|
-
@if (index($mdw-theme__components, 'bottomnav')) {
|
|
230
|
-
@include bottomnavThemeRules($theme);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
@mixin buildThemes() {
|
|
236
|
-
@if ($mdw-theme__ie11-support and $mdw-theme__ie11-support != 'no' and $mdw-theme__ie11-support != false) {
|
|
237
|
-
@if ($mdw-theme__ie11-media-wrap and $mdw-theme__ie11-media-wrap != 'no' and $mdw-theme__ie11-media-wrap != false) {
|
|
238
|
-
@include IEOnly() {
|
|
239
|
-
@include buildFallbackThemes();
|
|
240
|
-
}
|
|
241
|
-
} @else {
|
|
242
|
-
@include buildFallbackThemes();
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
@if ($mdw-theme__ie11-support != 'only') {
|
|
246
|
-
@include buildVariableThemes();
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
@mixin buildFallbackThemes() {
|
|
251
|
-
@if (map-has-key($mdw-theme__themes, "default")) {
|
|
252
|
-
[mdw-theme-fill~="white"] {
|
|
253
|
-
background-color: white;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
[mdw-theme-fill~="light"] {
|
|
257
|
-
@include componentContrastRules('light');
|
|
258
|
-
}
|
|
259
|
-
[mdw-theme-color~="white"] {
|
|
260
|
-
color: white;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
@each $name in map-keys($mdw-theme__themes) {
|
|
265
|
-
// $name: map-get($theme, "name");
|
|
266
|
-
$theme: map-get($mdw-theme__themes, $name);
|
|
267
|
-
$namespace: if($name == 'default', null, ".mdw-theme-#{$name}");
|
|
268
|
-
@each $color in ('primary', 'accent', 'warn', 'background') {
|
|
269
|
-
$palette: getThemePalette($color, $theme);
|
|
270
|
-
@each $tone in $tone-list {
|
|
271
|
-
$value: map-get($palette, $tone);
|
|
272
|
-
$rgbValue: red($value), green($value), blue($value);
|
|
273
|
-
@if ($tone == '500') {
|
|
274
|
-
@if ($color != 'background') {
|
|
275
|
-
#{$namespace} [mdw-theme-fill~="#{$color}"] {
|
|
276
|
-
background-color: #{$value};
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
#{$namespace} [mdw-theme-color~="#{$color}"] {
|
|
280
|
-
color: #{$value};
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
#{$namespace} [mdw-theme-fill~="#{$color}-#{$tone}"] {
|
|
284
|
-
background-color: #{$value};
|
|
285
|
-
}
|
|
286
|
-
#{$namespace} [mdw-theme-color~="#{$color}-#{$tone}"] {
|
|
287
|
-
color: #{$value};
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
@if ($namespace) {
|
|
292
|
-
#{$namespace} {
|
|
293
|
-
@include componentThemeRules($theme);
|
|
294
|
-
}
|
|
295
|
-
} @else {
|
|
296
|
-
@include componentThemeRules($theme);
|
|
297
|
-
}
|
|
298
|
-
#{$namespace} [mdw-theme-fill~="light"] {
|
|
299
|
-
@include componentContrastAndThemeRules('light', $theme);
|
|
300
|
-
}
|
|
301
|
-
#{$namespace} [mdw-theme-fill~="dark"] {
|
|
302
|
-
@include componentContrastAndThemeRules('dark', $theme);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
@if (map-has-key($mdw-theme__themes, "default")) {
|
|
306
|
-
[mdw-theme-fill~="black"] {
|
|
307
|
-
background-color: black;
|
|
308
|
-
}
|
|
309
|
-
[mdw-theme-color~="black"] {
|
|
310
|
-
color: black;
|
|
311
|
-
}
|
|
312
|
-
[mdw-theme-fill~="dark"] {
|
|
313
|
-
@include componentContrastRules('dark');
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
@each $color in $mdw-theme__explicit-colors {
|
|
318
|
-
$palette: map-get($palettes, $color);
|
|
319
|
-
@each $tone in $tone-list {
|
|
320
|
-
$value: map-get($palette, $tone);
|
|
321
|
-
@if ($tone == '500') {
|
|
322
|
-
[mdw-theme-fill~="#{$color}"] {
|
|
323
|
-
background-color: #{$value};
|
|
324
|
-
}
|
|
325
|
-
[mdw-theme-color~="#{$color}"] {
|
|
326
|
-
color: #{$value};
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
[mdw-theme-fill~="#{$color}-#{$tone}"] {
|
|
330
|
-
background-color: #{$value};
|
|
331
|
-
}
|
|
332
|
-
[mdw-theme-color~="#{$color}-#{$tone}"] {
|
|
333
|
-
color: #{$value};
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
@mixin buildVariableThemes() {
|
|
340
|
-
@each $color in $mdw-theme__explicit-colors {
|
|
341
|
-
@include addSinglePaletteColorVariables($color);
|
|
342
|
-
}
|
|
343
|
-
@each $theme in map-values($mdw-theme__themes) {
|
|
344
|
-
@each $color in $theme {
|
|
345
|
-
@if (length($theme) < 4) {
|
|
346
|
-
@if (index($mdw-theme__explicit-colors, 'grey') == null) {
|
|
347
|
-
@include addSinglePaletteColorVariables('grey');
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
@if (index($mdw-theme__explicit-colors, $color) == null) {
|
|
351
|
-
@include addSinglePaletteColorVariables($color);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
@each $name in map-keys($mdw-theme__themes) {
|
|
357
|
-
// $name: map-get($theme, "name");
|
|
358
|
-
$theme: map-get($mdw-theme__themes, $name);
|
|
359
|
-
$namespace: if($name == 'default', null, ".mdw-theme-#{$name}");
|
|
360
|
-
$primary: nth($theme, 1);
|
|
361
|
-
$accent: nth($theme, 2);
|
|
362
|
-
$warn: nth($theme, 3);
|
|
363
|
-
$background: 'grey';
|
|
364
|
-
@if (length($theme) > 3) {
|
|
365
|
-
$background: nth($theme, 4);
|
|
366
|
-
}
|
|
367
|
-
@include buildPalettes($namespace, $primary, $accent, $warn, $background);
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
[mdw-theme-fill~="white"] {
|
|
371
|
-
--background-color: 255,255,255;
|
|
372
|
-
}
|
|
373
|
-
[mdw-theme-color~="white"] {
|
|
374
|
-
--color: 255,255,255;
|
|
375
|
-
}
|
|
376
|
-
@each $color in ('primary', 'accent', 'warn', 'background') {
|
|
377
|
-
@each $tone in $tone-list {
|
|
378
|
-
@if ($tone == '500') {
|
|
379
|
-
@if ($color != 'background') {
|
|
380
|
-
[mdw-theme-fill~="#{$color}"] {
|
|
381
|
-
--background-color: var(--#{$color}-color);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
[mdw-theme-color~="#{$color}"] {
|
|
385
|
-
--color: var(--#{$color}-color);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
[mdw-theme-fill~="#{$color}-#{$tone}"] {
|
|
389
|
-
--background-color: var(--#{$color}-#{$tone}-color);
|
|
390
|
-
}
|
|
391
|
-
[mdw-theme-color~="#{$color}-#{$tone}"] {
|
|
392
|
-
--color: var(--#{$color}-#{$tone}-color);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
[mdw-theme-fill~="black"] {
|
|
397
|
-
--background-color: 0,0,0;
|
|
398
|
-
}
|
|
399
|
-
[mdw-theme-color~="black"] {
|
|
400
|
-
--color: 0,0,0;
|
|
401
|
-
}
|
|
402
|
-
@each $color in $mdw-theme__explicit-colors {
|
|
403
|
-
@each $tone in $tone-list {
|
|
404
|
-
@if ($tone == '500') {
|
|
405
|
-
[mdw-theme-fill~="#{$color}"] {
|
|
406
|
-
--background-color: var(--#{$color}-color);
|
|
407
|
-
}
|
|
408
|
-
[mdw-theme-color~="#{$color}"] {
|
|
409
|
-
--color: var(--#{$color}-color);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
[mdw-theme-fill~="#{$color}-#{$tone}"] {
|
|
413
|
-
--background-color: var(--#{$color}-#{$tone}-color);
|
|
414
|
-
}
|
|
415
|
-
[mdw-theme-color~="#{$color}-#{$tone}"] {
|
|
416
|
-
--color: var(--#{$color}-#{$tone}-color);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
[mdw-theme-fill] {
|
|
422
|
-
background-color: unquote("rgb(var(--background-color))");
|
|
423
|
-
}
|
|
424
|
-
[mdw-theme-color] {
|
|
425
|
-
color: unquote("rgb(var(--color))");
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
// Light rules
|
|
430
|
-
[mdw-theme-fill~="white"],
|
|
431
|
-
[mdw-theme-fill~="light"],
|
|
432
|
-
:root {
|
|
433
|
-
@include lightVariables();
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
@if ($mdw-theme__automatic-contrast != 'no' and $mdw-theme__automatic-contrast != false) {
|
|
437
|
-
@each $name in map-keys($mdw-theme__themes) {
|
|
438
|
-
$theme: map-get($mdw-theme__themes, $name);
|
|
439
|
-
$namespace: if($name == 'default', null, ".mdw-theme-#{$name}");
|
|
440
|
-
@each $color in ('primary', 'accent', 'warn', 'background') {
|
|
441
|
-
$palette: getThemePalette($color, $theme);
|
|
442
|
-
$lightTones: map-get($palette, 'light');
|
|
443
|
-
|
|
444
|
-
@each $tone in $lightTones {
|
|
445
|
-
@if ($tone == '500' and $color != 'background') {
|
|
446
|
-
#{$namespace} [mdw-theme-fill~="#{$color}"] {
|
|
447
|
-
@include lightVariables($color);
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
#{$namespace} [mdw-theme-fill~="#{$color}-#{$tone}"] {
|
|
451
|
-
@include lightVariables($color);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
@each $color in ('primary', 'accent', 'warn') {
|
|
457
|
-
[mdw-theme-fill~="#{$color}"][mdw-theme-fill~="light"],
|
|
458
|
-
[mdw-theme-fill|="#{$color}"][mdw-theme-fill~="light"] {
|
|
459
|
-
@include lightVariables($color);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
// Dark Variables
|
|
465
|
-
@each $name in map-keys($mdw-theme__themes) {
|
|
466
|
-
$theme: map-get($mdw-theme__themes, $name);
|
|
467
|
-
$namespace: if($name == 'default', null, ".mdw-theme-#{$name}");
|
|
468
|
-
@each $color in ('primary', 'accent', 'warn') {
|
|
469
|
-
$palette: getThemePalette($color, $theme);
|
|
470
|
-
$darkTones: map-get($palette, 'dark');
|
|
471
|
-
|
|
472
|
-
@each $tone in $darkTones {
|
|
473
|
-
$value: map-get($palette, $tone);
|
|
474
|
-
@if ($tone == '500' and $color != 'background') {
|
|
475
|
-
#{$namespace} [mdw-theme-fill~="#{$color}"] {
|
|
476
|
-
@include darkVariables($color);
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
#{$namespace} [mdw-theme-fill~="#{$color}-#{$tone}"] {
|
|
480
|
-
@include darkVariables($color);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
}
|
|
485
|
-
@each $color in ('primary', 'accent', 'warn') {
|
|
486
|
-
[mdw-theme-fill~="#{$color}"][mdw-theme-fill~="dark"],
|
|
487
|
-
[mdw-theme-fill|="#{$color}"][mdw-theme-fill~="dark"] {
|
|
488
|
-
@include darkVariables($color);
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
// Dark Background Variables
|
|
494
|
-
@each $name in map-keys($mdw-theme__themes) {
|
|
495
|
-
$theme: map-get($mdw-theme__themes, $name);
|
|
496
|
-
$namespace: if($name == 'default', null, ".mdw-theme-#{$name}");
|
|
497
|
-
$color: 'background';
|
|
498
|
-
$palette: getThemePalette('background', $theme);
|
|
499
|
-
$darkTones: map-get($palette, 'dark');
|
|
500
|
-
@each $tone in $darkTones {
|
|
501
|
-
$value: map-get($palette, $tone);
|
|
502
|
-
@if ($tone == '500' and $color != 'background') {
|
|
503
|
-
#{$namespace} [mdw-theme-fill~="#{$color}"] {
|
|
504
|
-
@include darkVariables($color);
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
#{$namespace} [mdw-theme-fill~="#{$color}-#{$tone}"] {
|
|
508
|
-
@include darkVariables($color);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
[mdw-theme-fill~="black"],
|
|
516
|
-
[mdw-theme-fill~="dark"] {
|
|
517
|
-
@include darkVariables('background');
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
@include componentContrastAndThemeRules();
|
|
521
|
-
@include componentContrastRules();
|
|
522
|
-
@include componentThemeRules();
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
@mixin addSinglePaletteColorVariables($name) {
|
|
526
|
-
$palette: map-get($palettes, $name);
|
|
527
|
-
@if (index($added-palettes-list, $name) == null) {
|
|
528
|
-
@each $tone in map-keys(map-remove($palette, "light", "dark")) {
|
|
529
|
-
$value: map-get($palette, $tone);
|
|
530
|
-
:root {
|
|
531
|
-
--#{$name}-#{$tone}-color: #{red($value),green($value),blue($value)};
|
|
532
|
-
@if ($tone == "500") {
|
|
533
|
-
--#{$name}-color: #{red($value),green($value),blue($value)};
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
$added-palettes-list: append($added-palettes-list, $name) !global;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
@mixin buildPalettes($namespace, $primary, $accent, $warn, $background) {
|
|
542
|
-
@include buildPalette($namespace, 'primary', $primary);
|
|
543
|
-
@include buildPalette($namespace, 'accent', $accent);
|
|
544
|
-
@include buildPalette($namespace, 'warn', $warn);
|
|
545
|
-
@include buildPalette($namespace, 'background', $background);
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
@mixin buildPalette($namespace, $color, $name) {
|
|
549
|
-
$palette: map-get($palettes, $name);
|
|
550
|
-
@each $tone in map-keys(map-remove($palette, "light", "dark")) {
|
|
551
|
-
$value: map-get($palette, $tone);
|
|
552
|
-
#{if($namespace, #{$namespace}, ":root, .mdw-theme-default")} {
|
|
553
|
-
--#{$color}-#{$tone}-color: var(--#{$name}-#{$tone}-color);
|
|
554
|
-
@if ($tone == "500" and $color != 'background') {
|
|
555
|
-
--#{$color}-color: var(--#{$name}-color);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|