@shortfuse/materialdesignweb 0.3.0 → 0.4.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/.eslintrc.json +136 -30
- package/.stylelintrc.json +6 -40
- package/.vscode/launch.json +20 -5
- package/CHANGELOG.md +24 -0
- package/README.md +12 -9
- package/adapters/datatable/column.js +82 -74
- package/adapters/datatable/index.js +173 -131
- package/adapters/dom/index.js +529 -75
- package/adapters/list/index.js +25 -12
- package/adapters/search/index.js +13 -13
- package/components/appbar/_spec.scss +87 -64
- package/components/appbar/index.scss +2 -2
- package/components/banner/_spec.scss +8 -8
- package/components/banner/index.scss +2 -2
- package/components/bottomnav/_spec.scss +22 -17
- package/components/bottomnav/index.js +61 -52
- package/components/bottomnav/index.scss +2 -2
- package/components/bottomnav/item.js +44 -25
- package/components/button/README.md +14 -14
- package/components/button/_spec.scss +23 -22
- package/components/button/_theme.scss +37 -21
- package/components/button/index.eta +32 -0
- package/components/button/index.js +12 -12
- package/components/button/index.scss +2 -2
- package/components/card/_spec.scss +40 -36
- package/components/card/index.scss +2 -2
- package/components/chip/_spec.scss +7 -8
- package/components/chip/_theme.scss +31 -31
- package/components/chip/index.js +3 -2
- package/components/chip/index.scss +2 -2
- package/components/chip/item.js +1 -16
- package/components/datatable/_spec.scss +71 -85
- package/components/datatable/_theme.scss +61 -156
- package/components/datatable/cell.js +45 -0
- package/components/datatable/columnheader.js +47 -0
- package/components/datatable/index.js +279 -366
- package/components/datatable/index.scss +2 -2
- package/components/datatable/row.js +49 -0
- package/components/datatable/rowheader.js +18 -0
- package/components/dialog/_spec.scss +61 -41
- package/components/dialog/index.js +325 -297
- package/components/dialog/index.scss +2 -2
- package/components/divider/_spec.scss +8 -6
- package/components/divider/index.scss +2 -2
- package/components/elevation/_spec.scss +2 -2
- package/components/elevation/index.scss +2 -2
- package/components/fab/_spec.scss +23 -24
- package/components/fab/index.js +50 -50
- package/components/fab/index.scss +2 -2
- package/components/grid/_spec.scss +33 -31
- package/components/grid/index.scss +2 -2
- package/components/layout/_mixins.scss +5 -5
- package/components/layout/_spec.scss +206 -176
- package/components/layout/_theme.scss +14 -16
- package/components/layout/index.js +181 -153
- package/components/layout/index.scss +2 -2
- package/components/list/_spec.scss +117 -104
- package/components/list/_theme.scss +31 -34
- package/components/list/content.js +68 -52
- package/components/list/index.js +194 -61
- package/components/list/index.scss +2 -2
- package/components/list/item.js +136 -12
- package/components/list/secondary.js +46 -0
- package/components/menu/_spec.scss +32 -19
- package/components/menu/index.js +242 -229
- package/components/menu/index.scss +2 -2
- package/components/menu/item.js +95 -110
- package/components/progress/_spec.scss +35 -27
- package/components/progress/index.js +21 -0
- package/components/progress/index.scss +2 -1
- package/components/selection/_spec.scss +242 -224
- package/components/selection/_theme.scss +100 -95
- package/components/selection/index.eta +60 -0
- package/components/selection/index.js +76 -0
- package/components/selection/index.pug +15 -8
- package/components/selection/index.scss +2 -2
- package/components/selection/input.js +56 -0
- package/components/selection/radiogroup.js +47 -0
- package/components/slider/_spec.scss +10 -8
- package/components/slider/index.scss +2 -2
- package/components/snackbar/_spec.scss +22 -21
- package/components/snackbar/index.js +102 -111
- package/components/snackbar/index.scss +2 -2
- package/components/tab/_spec.scss +20 -19
- package/components/tab/content.js +41 -40
- package/components/tab/index.js +192 -99
- package/components/tab/index.scss +2 -2
- package/components/tab/item.js +38 -55
- package/components/tab/list.js +96 -72
- package/components/tab/panel.js +12 -13
- package/components/template/_theme.scss +11 -11
- package/components/textfield/_mixins.scss +52 -0
- package/components/textfield/_spec.scss +215 -266
- package/components/textfield/_theme.scss +95 -72
- package/components/textfield/index.eta +74 -0
- package/components/textfield/index.js +63 -57
- package/components/textfield/index.scss +2 -2
- package/components/tooltip/_spec.scss +27 -25
- package/components/tooltip/index.scss +2 -2
- package/components/type/_spec.scss +51 -38
- package/components/type/index.scss +2 -2
- package/core/_breakpoint.scss +75 -91
- package/core/_elevation.scss +10 -10
- package/core/_length.scss +9 -0
- package/core/_motion.scss +14 -14
- package/core/_platform.scss +9 -15
- package/core/_type.scss +33 -32
- package/core/aria/attributes.js +125 -25
- package/core/aria/button.js +23 -23
- package/core/aria/keyboard.js +93 -0
- package/core/aria/rovingtabindex.js +69 -154
- package/core/aria/tab.js +31 -28
- package/core/color/_theme.scss +240 -280
- package/core/color/index.scss +2 -2
- package/core/document/index.js +39 -0
- package/core/dom.js +12 -12
- package/core/overlay/_spec.scss +0 -3
- package/core/overlay/_theme.scss +56 -74
- package/core/overlay/index.js +49 -18
- package/core/overlay/index.scss +2 -2
- package/core/ripple/_spec.scss +22 -39
- package/core/ripple/_theme.scss +13 -13
- package/core/ripple/index.js +137 -134
- package/core/ripple/index.scss +2 -2
- package/core/theme/_config.scss +2 -0
- package/core/theme/_mixins.scss +172 -0
- package/core/theme/_palettes.scss +155 -135
- package/core/theme/_variables.scss +24 -15
- package/core/theme/index.js +50 -0
- package/core/throttler.js +1 -1
- package/core/transition/index.js +36 -20
- package/{docs-src → docs}/_flex.scss +0 -0
- package/{docs-src → docs}/_menuoptions.js +21 -34
- package/{docs-src → docs}/_mixins.pug +39 -26
- package/docs/_partials/_androidnavbar.eta +5 -0
- package/docs/_partials/_androidstatusbar.eta +13 -0
- package/docs/_partials/_appbar.eta +29 -0
- package/docs/_partials/_buttontest.eta +31 -0
- package/docs/_partials/_header.eta +149 -0
- package/docs/_partials/_navlistitem.eta +16 -0
- package/docs/_partials/_target.eta +1 -0
- package/{docs-src → docs}/_sample-utils.js +8 -6
- package/{docs-src → docs}/_storage.js +0 -0
- package/{docs-src → docs}/docs.scss +5 -2
- package/docs/index.eta +16 -0
- package/{docs-src → docs}/index.js +0 -0
- package/docs/pages/appbar.eta +114 -0
- package/{docs-src/components → docs/pages}/appbar.js +0 -0
- package/{docs-src/components → docs/pages}/appbar.pug +15 -18
- package/docs/pages/bottomnav.eta +188 -0
- package/{docs-src/components → docs/pages}/bottomnav.js +23 -24
- package/{docs-src/components → docs/pages}/bottomnav.pug +4 -4
- package/docs/pages/button.eta +124 -0
- package/{docs-src/components → docs/pages}/button.js +19 -19
- package/{docs-src/components → docs/pages}/button.pug +15 -15
- package/docs/pages/card.eta +90 -0
- package/{docs-src/components → docs/pages}/card.js +3 -3
- package/{docs-src/components → docs/pages}/card.pug +7 -7
- package/docs/pages/chip.eta +122 -0
- package/{docs-src/components → docs/pages}/chip.js +3 -6
- package/{docs-src/components → docs/pages}/chip.pug +2 -2
- package/docs/pages/color.eta +143 -0
- package/{docs-src/core → docs/pages}/color.js +95 -20
- package/docs/pages/color.pug +121 -0
- package/docs/pages/datatable.eta +323 -0
- package/{docs-src/components → docs/pages}/datatable.js +26 -13
- package/docs/pages/datatable.pug +283 -0
- package/docs/pages/dialog.eta +186 -0
- package/{docs-src/components → docs/pages}/dialog.js +26 -13
- package/{docs-src/components → docs/pages}/dialog.pug +46 -28
- package/docs/pages/dom.eta +26 -0
- package/docs/pages/dom.js +143 -0
- package/docs/pages/dom.pug +22 -0
- package/docs/pages/elevation.eta +35 -0
- package/{docs-src/components → docs/pages}/elevation.js +0 -0
- package/{docs-src/components → docs/pages}/elevation.pug +0 -0
- package/docs/pages/fab.eta +99 -0
- package/{docs-src/components → docs/pages}/fab.js +3 -3
- package/{docs-src/components → docs/pages}/fab.pug +2 -2
- package/docs/pages/grid.eta +135 -0
- package/{docs-src/components → docs/pages}/grid.js +1 -1
- package/{docs-src/components → docs/pages}/grid.pug +3 -3
- package/docs/pages/layout.eta +8 -0
- package/{docs-src/components → docs/pages}/layout.js +0 -0
- package/{docs-src/components → docs/pages}/layout.pug +0 -0
- package/docs/pages/list.eta +465 -0
- package/{docs-src/components → docs/pages}/list.js +2 -2
- package/{docs-src/components → docs/pages}/list.pug +7 -14
- package/docs/pages/menu.eta +276 -0
- package/{docs-src/components → docs/pages}/menu.js +14 -10
- package/{docs-src/components → docs/pages}/menu.pug +0 -0
- package/docs/pages/overlay.eta +69 -0
- package/docs/pages/overlay.js +4 -0
- package/{docs-src/core → docs/pages}/overlay.pug +14 -11
- package/docs/pages/progress.eta +23 -0
- package/{docs-src/components → docs/pages}/progress.js +1 -1
- package/{docs-src/components → docs/pages}/progress.pug +1 -1
- package/docs/pages/ripple.eta +27 -0
- package/docs/pages/ripple.js +4 -0
- package/{docs-src/core → docs/pages}/ripple.pug +4 -4
- package/docs/pages/search.eta +246 -0
- package/{docs-src/components → docs/pages}/search.js +59 -42
- package/{docs-src/components → docs/pages}/search.pug +50 -51
- package/docs/pages/selection.eta +111 -0
- package/docs/pages/selection.js +13 -0
- package/docs/pages/selection.pug +74 -0
- package/docs/pages/slider.eta +23 -0
- package/{docs-src/components → docs/pages}/slider.js +0 -0
- package/{docs-src/components → docs/pages}/slider.pug +0 -0
- package/docs/pages/snackbar.eta +83 -0
- package/{docs-src/components → docs/pages}/snackbar.js +3 -3
- package/{docs-src/components → docs/pages}/snackbar.pug +0 -0
- package/docs/pages/tab.eta +421 -0
- package/{docs-src/components → docs/pages}/tab.js +18 -35
- package/{docs-src/components → docs/pages}/tab.pug +4 -4
- package/docs/pages/textfield.eta +486 -0
- package/{docs-src/components → docs/pages}/textfield.js +3 -4
- package/{docs-src/components → docs/pages}/textfield.pug +87 -35
- package/docs/pages/tooltip.eta +94 -0
- package/{docs-src/components → docs/pages}/tooltip.js +0 -0
- package/{docs-src/components → docs/pages}/tooltip.pug +0 -1
- package/docs/pages/transition.eta +117 -0
- package/{docs-src/core → docs/pages}/transition.js +7 -8
- package/{docs-src/core → docs/pages}/transition.pug +0 -0
- package/docs/pages/type.eta +31 -0
- package/{docs-src/components → docs/pages}/type.js +0 -0
- package/{docs-src/components → docs/pages}/type.pug +0 -1
- package/docs/postrender.js +39 -0
- package/{docs-src → docs}/prerender.js +3 -9
- package/docs/pwa/_dialogs.eta +143 -0
- package/docs/pwa/_dialogs.pug +96 -0
- package/docs/pwa/_menus.eta +16 -0
- package/{docs-src → docs}/pwa/_menus.pug +0 -0
- package/docs/pwa/pwa-prerender.js +3 -0
- package/docs/pwa/pwa.eta +480 -0
- package/docs/pwa/pwa.js +306 -0
- package/{docs-src → docs}/pwa/pwa.pug +166 -263
- package/docs/pwa/pwa.scss +26 -0
- package/docs/spec.scss +26 -0
- package/docs/themes/_component-themes.scss +26 -0
- package/docs/themes/theme-colored-fallbacks.scss +17 -0
- package/docs/themes/theme-colored.scss +17 -0
- package/docs/themes/theme-default-fallbacks.scss +17 -0
- package/docs/themes/theme-default.scss +17 -0
- package/jsconfig.json +4 -2
- package/package.json +40 -27
- package/scripts/deploy-docs.sh +9 -0
- package/templates/index.eta +2 -0
- package/utils/function.js +3 -0
- package/webpack.config.cjs +257 -0
- package/_spec.scss +0 -27
- package/_theme.scss +0 -27
- package/components/list/expander.js +0 -142
- package/components/list/itemgroup.js +0 -22
- package/core/theme/_builder.scss +0 -116
- package/core/theme/index.scss +0 -68
- package/docs/appbar.html +0 -1
- package/docs/appbar.min.js +0 -2
- package/docs/appbar.min.js.map +0 -1
- 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/chip.html +0 -1
- package/docs/chip.min.js +0 -2
- package/docs/chip.min.js.map +0 -1
- package/docs/color.html +0 -1
- package/docs/color.min.js +0 -2
- package/docs/color.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/default.common.min.js +0 -2
- package/docs/default.common.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/grid.html +0 -1
- package/docs/grid.min.js +0 -2
- package/docs/grid.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/ink.html +0 -1
- package/docs/ink.min.js +0 -2
- package/docs/ink.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/overlay.html +0 -1
- package/docs/overlay.min.js +0 -2
- package/docs/overlay.min.js.map +0 -1
- package/docs/prerender.common.min.js +0 -2
- package/docs/prerender.common.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/pwa-prerender.min.js +0 -2
- package/docs/pwa-prerender.min.js.map +0 -1
- package/docs/pwa.html +0 -11
- package/docs/pwa.min.css +0 -1
- package/docs/pwa.min.js +0 -2
- package/docs/pwa.min.js.map +0 -1
- package/docs/ripple.html +0 -1
- package/docs/ripple.min.js +0 -2
- package/docs/ripple.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/spec.min.css +0 -1
- package/docs/spec.min.js +0 -2
- package/docs/spec.min.js.map +0 -1
- package/docs/surface.html +0 -1
- package/docs/surface.min.js +0 -2
- package/docs/surface.min.js.map +0 -1
- 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/theme-colored-fallbacks.min.css +0 -1
- package/docs/theme-colored-fallbacks.min.js +0 -2
- package/docs/theme-colored-fallbacks.min.js.map +0 -1
- package/docs/theme-colored.min.css +0 -1
- package/docs/theme-colored.min.js +0 -2
- package/docs/theme-colored.min.js.map +0 -1
- package/docs/theme-default-fallbacks.min.css +0 -1
- package/docs/theme-default-fallbacks.min.js +0 -2
- package/docs/theme-default-fallbacks.min.js.map +0 -1
- package/docs/theme-default.min.css +0 -1
- package/docs/theme-default.min.js +0 -2
- package/docs/theme-default.min.js.map +0 -1
- package/docs/themes-fallbacks.min.css +0 -1
- package/docs/themes-fallbacks.min.js +0 -2
- package/docs/themes-fallbacks.min.js.map +0 -1
- package/docs/themes.min.css +0 -1
- package/docs/themes.min.js +0 -2
- package/docs/themes.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/transition.html +0 -1
- package/docs/transition.min.js +0 -2
- package/docs/transition.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/docs-src/components/datatable.pug +0 -327
- package/docs-src/components/selection.js +0 -9
- package/docs-src/components/selection.pug +0 -77
- package/docs-src/core/color.pug +0 -201
- package/docs-src/core/overlay.js +0 -4
- package/docs-src/core/ripple.js +0 -4
- package/docs-src/index.pug +0 -9
- package/docs-src/pwa/_dialogs.pug +0 -15
- package/docs-src/pwa/pwa-prerender.js +0 -3
- package/docs-src/pwa/pwa.js +0 -182
- package/docs-src/pwa/pwa.scss +0 -25
- package/docs-src/spec.scss +0 -1
- package/docs-src/themes/theme-colored-fallbacks.scss +0 -14
- package/docs-src/themes/theme-colored.scss +0 -14
- package/docs-src/themes/theme-default-fallbacks.scss +0 -14
- package/docs-src/themes/theme-default.scss +0 -14
- package/index.js +0 -51
- package/index.scss +0 -2
- package/webpack.config.js +0 -187
package/core/color/_theme.scss
CHANGED
|
@@ -1,212 +1,219 @@
|
|
|
1
1
|
// https://material.io/design/interaction/states.html
|
|
2
2
|
|
|
3
|
-
@
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
3
|
+
@use '../theme/_mixins.scss' as theme;
|
|
4
|
+
@use "../_platform.scss" as platform;
|
|
5
|
+
|
|
6
|
+
@function _resortColors($list) {
|
|
7
|
+
$newList: ();
|
|
8
|
+
@each $color in $list {
|
|
9
|
+
@if (index($newList, $color) == null) {
|
|
10
|
+
$newList: append($newList, $color);
|
|
11
|
+
$palette: theme.getThemeParamValue($color);
|
|
12
|
+
@each $color2 in $list {
|
|
13
|
+
@if (index($newList, $color2) == null) {
|
|
14
|
+
$palette2: theme.getThemeParamValue($color2);
|
|
15
|
+
@if ($palette == $palette2) {
|
|
16
|
+
$newList: append($newList, $color2);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
@return $newList;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Resort colors with aliases for CSS rule merging
|
|
26
|
+
$sortedInks: _resortColors(theme.$inks);
|
|
27
|
+
$sortedSurfaces: _resortColors(theme.$surfaces);
|
|
28
|
+
|
|
29
|
+
$themeValues: (
|
|
30
|
+
default-ink: theme.$foreground,
|
|
31
|
+
|
|
32
|
+
high-ink-opacity: theme.$high-opacity,
|
|
33
|
+
medium-ink-opacity: theme.$medium-opacity,
|
|
34
|
+
inactive-ink-opacity: theme.$inactive-opacity,
|
|
35
|
+
divider-ink-opacity: theme.$divider-opacity,
|
|
36
|
+
|
|
37
|
+
card-surface: ((#fff, null), (#121212, null)),
|
|
38
|
+
binary-surface: ((#fff, null), (#000, null)),
|
|
34
39
|
) !default;
|
|
35
40
|
|
|
36
|
-
@
|
|
37
|
-
|
|
41
|
+
@each $color in $sortedInks {
|
|
42
|
+
$newInkMap: (
|
|
43
|
+
#{$color}-default-ink: (($color, nth(theme.$default-color-ink, 1),null), ($color, nth(theme.$default-color-ink, 2), null)),
|
|
44
|
+
#{$color}-contrast-ink: (($color, nth(theme.$contrast-color-ink, 1),null), ($color, nth(theme.$contrast-color-ink, 2), null)),
|
|
45
|
+
#{$color}-light-ink: (($color, nth(theme.$light-color-ink, 1),null), ($color, nth(theme.$light-color-ink, 2), null)),
|
|
46
|
+
);
|
|
47
|
+
$themeValues: map-merge($themeValues, $newInkMap);
|
|
38
48
|
}
|
|
39
49
|
|
|
40
|
-
@
|
|
50
|
+
@each $color in $sortedSurfaces {
|
|
51
|
+
$newSurfaceMap: (
|
|
52
|
+
#{$color}-default-surface: (($color, nth(theme.$default-color-surface, 1),null), ($color, nth(theme.$default-color-surface, 2), null)),
|
|
53
|
+
#{$color}-alt-surface: (($color, nth(theme.$alt-color-surface, 1),null), ($color, nth(theme.$alt-color-surface, 2), null)),
|
|
54
|
+
);
|
|
55
|
+
$themeValues: map-merge($themeValues, $newSurfaceMap);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@function getThemeValue($key, $type) {
|
|
59
|
+
@return theme.getThemeValue('color', $themeValues, $key, $type);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@mixin addThemeRules($type: 'var') {
|
|
41
63
|
@if ($type == 'var') {
|
|
42
64
|
.mdw-theme {
|
|
43
|
-
|
|
44
|
-
background-color: RGB(var(--surface-color));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&svg[mdw-surface] {
|
|
48
|
-
background-color: transparent;
|
|
65
|
+
/** Surface Colors **/
|
|
49
66
|
|
|
50
|
-
|
|
67
|
+
&[mdw-surface] {
|
|
68
|
+
background-color: RGB(var(--mdw-surface));
|
|
51
69
|
}
|
|
70
|
+
}
|
|
52
71
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
@each $tone in $mdw-theme__tone-list {
|
|
56
|
-
--#{$tone}-surface: var(--#{$color}-#{$tone}-color);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&[mdw-ink~="#{$color}"] {
|
|
61
|
-
@each $tone in $mdw-theme__tone-list {
|
|
62
|
-
--#{$tone}-color: var(--#{$color}-#{$tone}-color);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
72
|
+
svg.mdw-theme[mdw-surface] {
|
|
73
|
+
background-color: transparent;
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
--ink-opacity: #{mdwColorThemeValue("high-ink-opacity", $type)};
|
|
70
|
-
color: RGBA(var(--ink-color),var(--ink-opacity));
|
|
71
|
-
}
|
|
75
|
+
fill: RGB(var(--mdw-surface));
|
|
76
|
+
}
|
|
72
77
|
|
|
78
|
+
.mdw-theme {
|
|
73
79
|
&[mdw-surface]:not([mdw-ink]) {
|
|
74
|
-
--ink
|
|
75
|
-
--ink-opacity: #{
|
|
76
|
-
color: RGBA(var(--ink
|
|
80
|
+
--mdw-ink: #{getThemeValue("default-ink", $type)};
|
|
81
|
+
--mdw-ink-opacity: #{getThemeValue("high-ink-opacity", $type)};
|
|
82
|
+
color: RGBA(var(--mdw-ink),var(--mdw-ink-opacity));
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
&[mdw-surface="white"] {
|
|
80
|
-
--surface
|
|
86
|
+
--mdw-surface: 255,255,255;
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
&[mdw-surface="black"] {
|
|
84
|
-
--surface
|
|
90
|
+
--mdw-surface: 0,0,0;
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
&[mdw-surface="binary"] {
|
|
88
|
-
--surface
|
|
94
|
+
--mdw-surface: #{getThemeValue("binary-surface", $type)};
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
&[mdw-surface="card"] {
|
|
92
|
-
--surface
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&[mdw-surface="background"] {
|
|
96
|
-
--surface-color: #{mdwColorThemeValue("background-surface", $type)};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&[mdw-surface="primary"] {
|
|
100
|
-
--surface-color: #{mdwColorThemeValue("primary-surface", $type)};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&[mdw-surface="secondary"] {
|
|
104
|
-
--surface-color: #{mdwColorThemeValue("secondary-surface", $type)};
|
|
98
|
+
--mdw-surface: #{getThemeValue("card-surface", $type)};
|
|
105
99
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
100
|
+
|
|
101
|
+
@each $surface in $sortedSurfaces {
|
|
102
|
+
&[mdw-surface~="#{$surface}"] {
|
|
103
|
+
--mdw-surface: #{getThemeValue("#{$surface}-default-surface", $type)};
|
|
104
|
+
}
|
|
109
105
|
}
|
|
110
106
|
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
@each $surface in $sortedSurfaces {
|
|
108
|
+
&[mdw-surface~="#{$surface}"] {
|
|
109
|
+
$palette: theme.getThemeParamValue($surface);
|
|
110
|
+
@each $tone in theme.$surface-tones {
|
|
111
|
+
$value: map-get($palette, $tone);
|
|
112
|
+
--#{$tone}-surface: #{red($value),green($value),blue($value)};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
113
115
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
|
|
117
|
+
@each $surface in $sortedSurfaces {
|
|
118
|
+
&[mdw-surface="#{$surface} alt"] {
|
|
119
|
+
--mdw-surface: #{getThemeValue("#{$surface}-alt-surface", $type)};
|
|
120
|
+
}
|
|
117
121
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
|
|
123
|
+
@each $tone in theme.$surface-tones {
|
|
124
|
+
&[mdw-surface~="#{$tone}"] {
|
|
125
|
+
--mdw-surface: var(--#{$tone}-surface);
|
|
126
|
+
}
|
|
121
127
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
|
|
129
|
+
/** Ink Color **/
|
|
130
|
+
|
|
131
|
+
&[mdw-ink] {
|
|
132
|
+
--mdw-ink: #{getThemeValue("default-ink", $type)};
|
|
133
|
+
--mdw-ink-opacity: 1;
|
|
134
|
+
color: RGBA(var(--mdw-ink),var(--mdw-ink-opacity));
|
|
125
135
|
}
|
|
126
|
-
|
|
136
|
+
|
|
137
|
+
&[mdw-ink=""],
|
|
138
|
+
&[mdw-ink~="default"] {
|
|
139
|
+
--mdw-ink: #{getThemeValue("default-ink", $type)};
|
|
140
|
+
--mdw-ink-opacity: #{getThemeValue("high-ink-opacity", $type)};
|
|
141
|
+
}
|
|
142
|
+
|
|
127
143
|
&[mdw-ink~="white"] {
|
|
128
|
-
--ink
|
|
144
|
+
--mdw-ink: 255,255,255;
|
|
129
145
|
}
|
|
130
146
|
|
|
131
147
|
&[mdw-ink~="black"] {
|
|
132
|
-
--ink
|
|
148
|
+
--mdw-ink: 0,0,0;
|
|
133
149
|
}
|
|
134
150
|
|
|
135
|
-
|
|
136
|
-
|
|
151
|
+
@each $ink in $sortedInks {
|
|
152
|
+
&[mdw-ink~="#{$ink}"] {
|
|
153
|
+
--mdw-ink: #{getThemeValue("#{$ink}-default-ink", $type)};
|
|
154
|
+
}
|
|
137
155
|
}
|
|
138
156
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
157
|
+
@each $ink in $sortedInks {
|
|
158
|
+
&[mdw-ink~="#{$ink}"] {
|
|
159
|
+
$palette: theme.getThemeParamValue($ink);
|
|
160
|
+
@each $tone in theme.$ink-tones {
|
|
161
|
+
$value: map-get($palette, $tone);
|
|
162
|
+
--mdw-ink-#{$tone}: #{red($value),green($value),blue($value)};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
147
165
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
166
|
+
|
|
167
|
+
@each $ink in $sortedInks {
|
|
168
|
+
&[mdw-ink^="#{$ink} contrast"] {
|
|
169
|
+
--mdw-ink: #{getThemeValue("#{$ink}-contrast-ink", $type)};
|
|
170
|
+
}
|
|
152
171
|
}
|
|
153
172
|
|
|
154
|
-
@each $
|
|
155
|
-
|
|
156
|
-
|
|
173
|
+
@each $ink in $sortedInks {
|
|
174
|
+
@if ($ink != 'background') {
|
|
175
|
+
&[mdw-ink^="#{$ink} light"] {
|
|
176
|
+
--mdw-ink: #{getThemeValue("#{$ink}-light-ink", $type)};
|
|
177
|
+
}
|
|
157
178
|
}
|
|
158
|
-
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@each $tone in theme.$ink-tones {
|
|
159
182
|
&[mdw-ink~="#{$tone}"] {
|
|
160
|
-
--ink
|
|
183
|
+
--mdw-ink: var(--mdw-ink-#{$tone});
|
|
161
184
|
}
|
|
162
185
|
}
|
|
163
186
|
|
|
164
|
-
|
|
165
|
-
--ink-color: #{mdwColorThemeValue("primary-contrast-ink", $type)};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
&[mdw-ink^="secondary contrast"] {
|
|
169
|
-
--ink-color: #{mdwColorThemeValue("secondary-contrast-ink", $type)};
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
&[mdw-ink^="warn contrast"] {
|
|
173
|
-
--ink-color: #{mdwColorThemeValue("warn-contrast-ink", $type)};
|
|
174
|
-
}
|
|
187
|
+
/** Ink Opacity **/
|
|
175
188
|
|
|
176
|
-
&[mdw-ink
|
|
177
|
-
--ink-
|
|
189
|
+
&[mdw-ink~="solid"] {
|
|
190
|
+
--mdw-ink-opacity: 1;
|
|
178
191
|
}
|
|
179
|
-
|
|
180
|
-
&[mdw-ink^="secondary light"] {
|
|
181
|
-
--ink-color: #{mdwColorThemeValue("secondary-light-ink", $type)};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
&[mdw-ink^="warn light"] {
|
|
185
|
-
--ink-color: #{mdwColorThemeValue("warn-light-ink", $type)};
|
|
186
|
-
}
|
|
187
|
-
|
|
192
|
+
|
|
188
193
|
&[mdw-ink~="high"] {
|
|
189
|
-
--ink-opacity: #{
|
|
194
|
+
--mdw-ink-opacity: #{getThemeValue("high-ink-opacity", $type)};
|
|
190
195
|
}
|
|
191
196
|
|
|
192
197
|
&[mdw-ink~="medium"] {
|
|
193
|
-
--ink-opacity: #{
|
|
198
|
+
--mdw-ink-opacity: #{getThemeValue("medium-ink-opacity", $type)};
|
|
194
199
|
}
|
|
195
200
|
|
|
196
201
|
&[mdw-ink~="inactive"] {
|
|
197
|
-
--ink-opacity: #{
|
|
202
|
+
--mdw-ink-opacity: #{getThemeValue("inactive-ink-opacity", $type)};
|
|
198
203
|
}
|
|
199
204
|
|
|
200
205
|
&[mdw-ink~="divider"] {
|
|
201
|
-
--ink-opacity: #{
|
|
206
|
+
--mdw-ink-opacity: #{getThemeValue("divider-ink-opacity", $type)};
|
|
202
207
|
}
|
|
203
208
|
|
|
209
|
+
/** Border Ink **/
|
|
210
|
+
|
|
204
211
|
&[mdw-border-ink] {
|
|
205
|
-
border-color: #{RGBA(var(--ink
|
|
212
|
+
border-color: #{RGBA(var(--mdw-ink), getThemeValue("divider-ink-opacity", $type))};
|
|
206
213
|
}
|
|
207
214
|
|
|
208
215
|
&[mdw-border-ink="default"] {
|
|
209
|
-
border-color: #{RGBA(
|
|
216
|
+
border-color: #{RGBA(getThemeValue("default-ink", $type), getThemeValue("divider-ink-opacity", $type))};
|
|
210
217
|
}
|
|
211
218
|
|
|
212
219
|
&[mdw-border-ink="none"] {
|
|
@@ -217,104 +224,79 @@ $mdw-color__theme-values: (
|
|
|
217
224
|
& {
|
|
218
225
|
&[mdw-ink="default"],
|
|
219
226
|
&[mdw-surface]:not([mdw-ink]) {
|
|
220
|
-
color:
|
|
227
|
+
color: RGBA(getThemeValue("default-ink", $type),getThemeValue("high-ink-opacity", $type));
|
|
221
228
|
}
|
|
222
229
|
|
|
223
230
|
&[mdw-surface="binary"] {
|
|
224
|
-
background-color:
|
|
231
|
+
background-color: RGB(getThemeValue("binary-surface", $type));
|
|
225
232
|
}
|
|
226
233
|
|
|
227
234
|
&[mdw-surface="card"] {
|
|
228
|
-
background-color:
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
&[mdw-surface="background"] {
|
|
232
|
-
background-color: #{mdwColorThemeValue("background-surface", $type)};
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
&[mdw-surface="primary"] {
|
|
236
|
-
background-color: #{mdwColorThemeValue("primary-surface", $type)};
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
&[mdw-surface="secondary"] {
|
|
240
|
-
background-color: #{mdwColorThemeValue("secondary-surface", $type)};
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
&[mdw-surface="warn"] {
|
|
244
|
-
background-color: #{mdwColorThemeValue("warn-surface", $type)};
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
&[mdw-surface="background alt"] {
|
|
248
|
-
background-color: #{mdwColorThemeValue("background-alt-surface", $type)};
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
&[mdw-surface="primary alt"] {
|
|
252
|
-
background-color: #{mdwColorThemeValue("primary-alt-surface", $type)};
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
&[mdw-surface="secondary alt"] {
|
|
256
|
-
background-color: #{mdwColorThemeValue("secondary-alt-surface", $type)};
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
&[mdw-surface="warn alt"] {
|
|
260
|
-
background-color: #{mdwColorThemeValue("warn-alt-surface", $type)};
|
|
235
|
+
background-color: RGB(getThemeValue("card-surface", $type));
|
|
261
236
|
}
|
|
262
237
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
&[mdw-ink~="secondary"] {
|
|
268
|
-
color: #{mdwColorThemeValue("secondary-ink", $type)};
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
&[mdw-ink~="warn"] {
|
|
272
|
-
color: #{mdwColorThemeValue("warn-ink", $type)};
|
|
238
|
+
@each $surface in $sortedSurfaces {
|
|
239
|
+
&[mdw-surface="#{$surface}"] {
|
|
240
|
+
background-color: RGB(getThemeValue("#{$surface}-default-surface", $type));
|
|
241
|
+
}
|
|
273
242
|
}
|
|
274
243
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
&[mdw-ink^="secondary contrast"] {
|
|
280
|
-
color: #{mdwColorThemeValue("secondary-contrast-ink", $type)};
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
&[mdw-ink^="warn contrast"] {
|
|
284
|
-
color: #{mdwColorThemeValue("warn-contrast-ink", $type)};
|
|
244
|
+
@each $surface in $sortedSurfaces {
|
|
245
|
+
&[mdw-surface="#{$surface} alt"] {
|
|
246
|
+
background-color: RGB(getThemeValue("#{$surface}-alt-surface", $type));
|
|
247
|
+
}
|
|
285
248
|
}
|
|
286
249
|
|
|
287
|
-
&[mdw-ink
|
|
288
|
-
color:
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
&[mdw-ink^="secondary light"] {
|
|
292
|
-
color: #{mdwColorThemeValue("secondary-light-ink", $type)};
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
&[mdw-ink^="warn light"] {
|
|
296
|
-
color: #{mdwColorThemeValue("warn-light-ink", $type)};
|
|
250
|
+
&[mdw-ink~="solid"] {
|
|
251
|
+
color: RGB(getThemeValue("default-ink", $type));
|
|
297
252
|
}
|
|
298
253
|
|
|
299
254
|
&[mdw-ink~="high"] {
|
|
300
|
-
color:
|
|
255
|
+
color: RGBA(getThemeValue("default-ink", $type),getThemeValue("high-ink-opacity", $type));
|
|
301
256
|
}
|
|
302
257
|
|
|
303
258
|
&[mdw-ink~="medium"] {
|
|
304
|
-
color:
|
|
259
|
+
color: RGBA(getThemeValue("default-ink", $type),getThemeValue("medium-ink-opacity", $type));
|
|
305
260
|
}
|
|
306
261
|
|
|
307
262
|
&[mdw-ink~="inactive"] {
|
|
308
|
-
color:
|
|
263
|
+
color: RGBA(getThemeValue("default-ink", $type),getThemeValue("inactive-ink-opacity", $type));
|
|
309
264
|
}
|
|
310
265
|
|
|
311
266
|
&[mdw-ink~="divider"] {
|
|
312
|
-
color:
|
|
267
|
+
color: RGBA(getThemeValue("default-ink", $type),getThemeValue("divider-ink-opacity", $type));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@each $ink in $sortedInks {
|
|
271
|
+
&[mdw-ink="#{$ink}"] {
|
|
272
|
+
&,
|
|
273
|
+
&.mdw-overlay::before {
|
|
274
|
+
color: RGB(getThemeValue("#{$ink}-default-ink", $type));
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@each $ink in $sortedInks {
|
|
280
|
+
&[mdw-ink="#{$ink} contrast"] {
|
|
281
|
+
&,
|
|
282
|
+
&.mdw-overlay::before {
|
|
283
|
+
color: RGB(getThemeValue("#{$ink}-contrast-ink", $type));
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@each $ink in $sortedInks {
|
|
289
|
+
&[mdw-ink="#{$ink} light"] {
|
|
290
|
+
&,
|
|
291
|
+
&.mdw-overlay::before {
|
|
292
|
+
color: RGB(getThemeValue("#{$ink}-light-ink", $type));
|
|
293
|
+
}
|
|
294
|
+
}
|
|
313
295
|
}
|
|
314
296
|
|
|
315
297
|
&[mdw-border-ink],
|
|
316
298
|
&[mdw-border-ink="default"] {
|
|
317
|
-
border-color:
|
|
299
|
+
border-color: RGBA(getThemeValue("default-ink", $type), getThemeValue("divider-ink-opacity", $type));
|
|
318
300
|
}
|
|
319
301
|
|
|
320
302
|
&[mdw-border-ink="none"] {
|
|
@@ -324,7 +306,7 @@ $mdw-color__theme-values: (
|
|
|
324
306
|
}
|
|
325
307
|
}
|
|
326
308
|
|
|
327
|
-
@mixin
|
|
309
|
+
@mixin addThemeFallbackRules() {
|
|
328
310
|
.mdw-theme[mdw-surface="white"] {
|
|
329
311
|
background-color: #fff;
|
|
330
312
|
}
|
|
@@ -333,98 +315,76 @@ $mdw-color__theme-values: (
|
|
|
333
315
|
background-color: #000;
|
|
334
316
|
}
|
|
335
317
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
.mdw-theme[mdw-ink="black"] {
|
|
341
|
-
color: #000;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
@each $tone in $mdw-theme__tone-list {
|
|
345
|
-
@each $param in ('primary', 'secondary', 'warn', 'background') {
|
|
346
|
-
$palette: mdwGetThemeParamValue($param);
|
|
318
|
+
@each $surface in $sortedSurfaces {
|
|
319
|
+
$palette: theme.getThemeParamValue($surface);
|
|
320
|
+
@each $tone in theme.$surface-tones {
|
|
347
321
|
$value: map-get($palette, $tone);
|
|
348
322
|
|
|
349
|
-
.mdw-theme[mdw-surface="#{$
|
|
323
|
+
.mdw-theme[mdw-surface="#{$surface} #{$tone}"] {
|
|
350
324
|
background-color: #{$value};
|
|
351
325
|
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
352
328
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
329
|
+
/** Ink Fallback Colors **/
|
|
330
|
+
|
|
331
|
+
.mdw-theme[mdw-ink~="white"] {
|
|
332
|
+
&,
|
|
333
|
+
&.mdw-overlay::before {
|
|
334
|
+
color: #fff;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.mdw-theme[mdw-ink~="black"] {
|
|
339
|
+
&,
|
|
340
|
+
&.mdw-overlay::before {
|
|
341
|
+
color: #000;
|
|
356
342
|
}
|
|
357
|
-
|
|
358
|
-
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
@each $tone in theme.$surface-tones {
|
|
346
|
+
@each $surface in $sortedSurfaces {
|
|
347
|
+
$palette: theme.getThemeParamValue($surface);
|
|
359
348
|
$value: map-get($palette, $tone);
|
|
360
349
|
|
|
361
|
-
.mdw-theme[mdw-surface^="#{$
|
|
350
|
+
.mdw-theme[mdw-surface^="#{$surface} #{$tone}"] {
|
|
362
351
|
background-color: #{$value};
|
|
363
352
|
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
364
355
|
|
|
365
|
-
|
|
366
|
-
|
|
356
|
+
@each $tone in theme.$ink-tones {
|
|
357
|
+
@each $ink in $sortedInks {
|
|
358
|
+
$palette: theme.getThemeParamValue($ink);
|
|
359
|
+
$value: map-get($palette, $tone);
|
|
360
|
+
.mdw-theme[mdw-ink^="#{$ink} #{$tone}"] {
|
|
361
|
+
&,
|
|
362
|
+
&.mdw-overlay::before {
|
|
363
|
+
color: #{$value};
|
|
364
|
+
}
|
|
367
365
|
}
|
|
368
366
|
}
|
|
369
367
|
}
|
|
370
368
|
|
|
371
369
|
.mdw-theme[mdw-light],
|
|
372
370
|
.mdw-theme[mdw-light] .mdw-theme:not([mdw-dark]) {
|
|
373
|
-
@include
|
|
371
|
+
@include addThemeRules('light');
|
|
374
372
|
}
|
|
375
373
|
|
|
376
374
|
.mdw-theme[mdw-dark],
|
|
377
375
|
.mdw-theme[mdw-dark] .mdw-theme:not([mdw-light]) {
|
|
378
|
-
@include
|
|
376
|
+
@include addThemeRules('dark');
|
|
379
377
|
}
|
|
380
378
|
}
|
|
381
379
|
|
|
382
|
-
@if (
|
|
383
|
-
@include
|
|
384
|
-
@include
|
|
380
|
+
@if (theme.$fallbacks == 'ieonly') {
|
|
381
|
+
@include platform.ifIE() {
|
|
382
|
+
@include addThemeFallbackRules();
|
|
385
383
|
}
|
|
386
|
-
} @else if (
|
|
387
|
-
@include
|
|
384
|
+
} @else if (theme.$fallbacks != false) {
|
|
385
|
+
@include addThemeFallbackRules();
|
|
388
386
|
}
|
|
389
387
|
|
|
390
|
-
|
|
391
|
-
@include
|
|
392
|
-
@each $color in $mdw-theme__colors {
|
|
393
|
-
$palette: map-get($mdw-theme__palettes, $color);
|
|
394
|
-
@each $tone in map-keys(map-remove($palette, "light", "dark")) {
|
|
395
|
-
$value: map-get($palette, $tone);
|
|
396
|
-
|
|
397
|
-
:root {
|
|
398
|
-
--#{$color}-#{$tone}-color: #{red($value),green($value),blue($value)};
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.mdw-theme[mdw-surface~="#{$color}"] {
|
|
403
|
-
@each $tone in $mdw-theme__tone-list {
|
|
404
|
-
--#{$tone}-surface: var(--#{$color}-#{$tone}-color);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.mdw-theme[mdw-ink~="#{$color}"] {
|
|
409
|
-
@each $tone in $mdw-theme__tone-list {
|
|
410
|
-
--#{$tone}-color: var(--#{$color}-#{$tone}-color);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
:root,
|
|
416
|
-
.mdw-theme {
|
|
417
|
-
--foreground-light-color: #{red($mdw-theme__foreground-light),green($mdw-theme__foreground-light),blue($mdw-theme__foreground-light)};
|
|
418
|
-
--foreground-dark-color: #{red($mdw-theme__foreground-dark),green($mdw-theme__foreground-dark),blue($mdw-theme__foreground-dark)};
|
|
419
|
-
@each $param in ('primary', 'secondary', 'warn', 'background') {
|
|
420
|
-
$palette: mdwGetThemeParamValue($param);
|
|
421
|
-
@each $tone in map-keys(map-remove($palette, "light", "dark")) {
|
|
422
|
-
$value: map-get($palette, $tone);
|
|
423
|
-
|
|
424
|
-
--#{$param}-#{$tone}-color: #{red($value),green($value),blue($value)};
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
@include mdw-color__theme-rules();
|
|
388
|
+
@include theme.addComponentCSSVariableRules('color', $themeValues) {
|
|
389
|
+
@include addThemeRules();
|
|
430
390
|
}
|
package/core/color/index.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@forward './_spec.scss';
|
|
2
|
+
@forward './_theme.scss';
|