igniteui-theming 1.0.0-beta.1 → 1.0.0-beta.4
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/package.json +1 -1
- package/sass/color/_functions.scss +2 -2
- package/sass/color/presets/_index.scss +2 -0
- package/sass/color/presets/dark/_bootstrap.scss +13 -0
- package/sass/color/presets/dark/_fluent.scss +11 -0
- package/sass/color/presets/dark/_index.scss +4 -0
- package/sass/color/presets/dark/_indigo.scss +13 -0
- package/sass/color/presets/dark/_material.scss +8 -0
- package/sass/color/presets/light/_bootstrap.scss +13 -0
- package/sass/color/presets/light/_fluent.scss +12 -0
- package/sass/color/presets/light/_index.scss +4 -0
- package/sass/color/presets/light/_indigo.scss +13 -0
- package/sass/color/presets/light/_material.scss +8 -0
- package/sass/elevations/_mixins.scss +1 -1
- package/sass/elevations/presets/_index.scss +1 -0
- package/sass/elevations/presets/_material.scss +46 -31
- package/sass/themes/_functions.scss +9 -10
- package/sass/themes/_mixins.scss +4 -5
- package/sass/typography/_functions.scss +1 -1
- package/sass/typography/presets/_bootstrap.scss +7 -4
- package/sass/typography/presets/_fluent.scss +3 -3
- package/sass/typography/presets/_index.scss +4 -0
- package/sass/typography/presets/_indigo.scss +3 -3
- package/sass/typography/presets/_material.scss +3 -15
- package/test/_color.spec.scss +1 -1
- package/test/_elevations.spec.scss +1 -1
- package/test/_themes.spec.scss +4 -4
- package/test/_typography.spec.scss +5 -6
- package/test/_utils.spec.scss +1 -1
- package/test/e2e/theme.scss +3 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-theming",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.4",
|
|
4
4
|
"description": "A set of Sass variables, mixins, and functions for generating palettes, typography, and elevations used by Ignite UI components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
@use 'charts';
|
|
8
8
|
@use 'multipliers';
|
|
9
9
|
@use 'types';
|
|
10
|
-
@use '../utils' as *;
|
|
10
|
+
@use '../utils/math' as *;
|
|
11
11
|
|
|
12
12
|
$_enhanced-accessibility: false;
|
|
13
13
|
|
|
@@ -175,7 +175,7 @@ $_enhanced-accessibility: false;
|
|
|
175
175
|
$meta: if($palette, map.get($palette, '_meta'), null);
|
|
176
176
|
|
|
177
177
|
@if not($c) {
|
|
178
|
-
@error 'The passed color #{$color} is not valid.';
|
|
178
|
+
@error 'The passed color #{meta.inspect($color)} is not valid.';
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
@if not($palette) or not($meta) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward './material' as material-*;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../
|
|
1
|
+
@use '../functions' as *;
|
|
2
2
|
|
|
3
3
|
////
|
|
4
4
|
/// @group elevations
|
|
@@ -6,42 +6,57 @@
|
|
|
6
6
|
////
|
|
7
7
|
|
|
8
8
|
/// Level 1 - Umbra Shadows
|
|
9
|
-
/// @type {Color} $
|
|
10
|
-
$
|
|
9
|
+
/// @type {Color} $_color-1 - The color used to generate umbra shadows.
|
|
10
|
+
$_color-1: rgba(0 0 0 / 26%);
|
|
11
11
|
|
|
12
12
|
/// Level 2 - Penumbra Shadows
|
|
13
|
-
/// @type {Color} $
|
|
14
|
-
$
|
|
13
|
+
/// @type {Color} $_color-2 - The color used to generate penumbra shadows.
|
|
14
|
+
$_color-2: rgba(0 0 0 / 12%);
|
|
15
15
|
|
|
16
16
|
/// Level 3 - Ambient Shadows
|
|
17
|
-
/// @type {Color} $
|
|
18
|
-
$
|
|
17
|
+
/// @type {Color} $_color-3 - The color used to generate ambient shadows.
|
|
18
|
+
$_color-3: rgba(0 0 0 / 8%);
|
|
19
|
+
|
|
20
|
+
/// Allows user configration of this module.
|
|
21
|
+
@mixin configure($color-1, $color-2, $color-3) {
|
|
22
|
+
@if $color-1 {
|
|
23
|
+
$_color-1: $color-1 !global;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@if $color-2 {
|
|
27
|
+
$_color-2: $color-2 !global;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@if $color-3 {
|
|
31
|
+
$_color-3: $color-3 !global;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
19
34
|
|
|
20
35
|
/// @type {Map} $elevations - А map of 24 shadow elevations with the umbra, penumbra and ambient shadows.
|
|
21
36
|
$elevations: (
|
|
22
37
|
0: none,
|
|
23
|
-
1: box-shadow((0 1px 3px 0 $
|
|
24
|
-
2: box-shadow((0 1px 5px 0 $
|
|
25
|
-
3: box-shadow((0 1px 8px 0 $
|
|
26
|
-
4: box-shadow((0 2px 4px -1px $
|
|
27
|
-
5: box-shadow((0 3px 5px -1px $
|
|
28
|
-
6: box-shadow((0 3px 5px -1px $
|
|
29
|
-
7: box-shadow((0 4px 5px -2px $
|
|
30
|
-
8: box-shadow((0 5px 5px -3px $
|
|
31
|
-
9: box-shadow((0 5px 6px -3px $
|
|
32
|
-
10: box-shadow((0 6px 6px -3px $
|
|
33
|
-
11: box-shadow((0 6px 7px -4px $
|
|
34
|
-
12: box-shadow((0 7px 8px -4px $
|
|
35
|
-
13: box-shadow((0 7px 8px -4px $
|
|
36
|
-
14: box-shadow((0 7px 9px -4px $
|
|
37
|
-
15: box-shadow((0 8px 9px -5px $
|
|
38
|
-
16: box-shadow((0 8px 10px -5px $
|
|
39
|
-
17: box-shadow((0 8px 11px -5px $
|
|
40
|
-
18: box-shadow((0 9px 11px -5px $
|
|
41
|
-
19: box-shadow((0 9px 12px -6px $
|
|
42
|
-
20: box-shadow((0 10px 13px -6px $
|
|
43
|
-
21: box-shadow((0 10px 13px -6px $
|
|
44
|
-
22: box-shadow((0 10px 14px -6px $
|
|
45
|
-
23: box-shadow((0 11px 14px -7px $
|
|
46
|
-
24: box-shadow((0 11px 15px -7px $
|
|
38
|
+
1: box-shadow((0 1px 3px 0 $_color-1, 0 1px 1px 0 $_color-2, 0 2px 1px -1px $_color-3)),
|
|
39
|
+
2: box-shadow((0 1px 5px 0 $_color-1, 0 2px 2px 0 $_color-2, 0 3px 1px -2px $_color-3)),
|
|
40
|
+
3: box-shadow((0 1px 8px 0 $_color-1, 0 3px 4px 0 $_color-2, 0 3px 3px -2px $_color-3)),
|
|
41
|
+
4: box-shadow((0 2px 4px -1px $_color-1, 0 4px 5px 0 $_color-2, 0 1px 10px 0 $_color-3)),
|
|
42
|
+
5: box-shadow((0 3px 5px -1px $_color-1, 0 5px 8px 0 $_color-2, 0 1px 14px 0 $_color-3)),
|
|
43
|
+
6: box-shadow((0 3px 5px -1px $_color-1, 0 6px 10px 0 $_color-2, 0 1px 18px 0 $_color-3)),
|
|
44
|
+
7: box-shadow((0 4px 5px -2px $_color-1, 0 7px 10px 1px $_color-2, 0 2px 16px 1px $_color-3)),
|
|
45
|
+
8: box-shadow((0 5px 5px -3px $_color-1, 0 8px 10px 1px $_color-2, 0 3px 14px 2px $_color-3)),
|
|
46
|
+
9: box-shadow((0 5px 6px -3px $_color-1, 0 9px 12px 1px $_color-2, 0 3px 16px 2px $_color-3)),
|
|
47
|
+
10: box-shadow((0 6px 6px -3px $_color-1, 0 10px 14px 1px $_color-2, 0 4px 18px 3px $_color-3)),
|
|
48
|
+
11: box-shadow((0 6px 7px -4px $_color-1, 0 11px 15px 1px $_color-2, 0 4px 20px 3px $_color-3)),
|
|
49
|
+
12: box-shadow((0 7px 8px -4px $_color-1, 0 12px 17px 2px $_color-2, 0 5px 22px 4px $_color-3)),
|
|
50
|
+
13: box-shadow((0 7px 8px -4px $_color-1, 0 13px 19px 2px $_color-2, 0 5px 24px 4px $_color-3)),
|
|
51
|
+
14: box-shadow((0 7px 9px -4px $_color-1, 0 14px 21px 2px $_color-2, 0 5px 26px 4px $_color-3)),
|
|
52
|
+
15: box-shadow((0 8px 9px -5px $_color-1, 0 15px 22px 2px $_color-2, 0 6px 28px 5px $_color-3)),
|
|
53
|
+
16: box-shadow((0 8px 10px -5px $_color-1, 0 16px 24px 2px $_color-2, 0 6px 30px 5px $_color-3)),
|
|
54
|
+
17: box-shadow((0 8px 11px -5px $_color-1, 0 17px 26px 2px $_color-2, 0 6px 32px 5px $_color-3)),
|
|
55
|
+
18: box-shadow((0 9px 11px -5px $_color-1, 0 18px 28px 2px $_color-2, 0 7px 34px 6px $_color-3)),
|
|
56
|
+
19: box-shadow((0 9px 12px -6px $_color-1, 0 19px 29px 2px $_color-2, 0 7px 36px 6px $_color-3)),
|
|
57
|
+
20: box-shadow((0 10px 13px -6px $_color-1, 0 20px 31px 3px $_color-2, 0 8px 38px 7px $_color-3)),
|
|
58
|
+
21: box-shadow((0 10px 13px -6px $_color-1, 0 21px 33px 3px $_color-2, 0 8px 40px 7px $_color-3)),
|
|
59
|
+
22: box-shadow((0 10px 14px -6px $_color-1, 0 22px 35px 3px $_color-2, 0 8px 42px 7px $_color-3)),
|
|
60
|
+
23: box-shadow((0 11px 14px -7px $_color-1, 0 23px 36px 3px $_color-2, 0 9px 44px 8px $_color-3)),
|
|
61
|
+
24: box-shadow((0 11px 15px -7px $_color-1, 0 24px 38px 3px $_color-2, 0 9px 46px 8px $_color-3))
|
|
47
62
|
);
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:meta';
|
|
3
3
|
@use 'sass:string';
|
|
4
|
-
@use '../
|
|
5
|
-
@use '../elevations/' as *;
|
|
6
|
-
@use '../color/' as color;
|
|
4
|
+
@use '../typography/functions' as *;
|
|
5
|
+
@use '../elevations/functions' as *;
|
|
6
|
+
@use '../color/functions' as color;
|
|
7
7
|
|
|
8
8
|
/// Digests a theme schema and returns a resolved theme map.
|
|
9
9
|
/// @access private
|
|
10
10
|
/// @param {Map} $schema - A theme schema.
|
|
11
|
-
/// @requires {function} extend
|
|
12
11
|
/// @requires {function} resolve-value
|
|
13
12
|
/// @example scss Get the resolved theme for a schema
|
|
14
13
|
/// $custom-schema: (
|
|
@@ -24,14 +23,14 @@
|
|
|
24
23
|
|
|
25
24
|
@each $key, $value in $schema {
|
|
26
25
|
@if meta.type-of($value) == 'map' {
|
|
27
|
-
$result:
|
|
26
|
+
$result: map.merge($result, (#{$key}: resolve-value($value)));
|
|
28
27
|
} @else {
|
|
29
|
-
$result:
|
|
28
|
+
$result: map.merge($result, (#{$key}: $value));
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
// Special case for chart elevation literals
|
|
33
32
|
@if string.index($key, 'elevation') {
|
|
34
|
-
$result:
|
|
33
|
+
$result: map.merge(
|
|
35
34
|
$result,
|
|
36
35
|
(
|
|
37
36
|
#{$key}: #{elevation($value)}
|
|
@@ -41,7 +40,7 @@
|
|
|
41
40
|
|
|
42
41
|
// Special case for chart brushes
|
|
43
42
|
@if $value == 'series' {
|
|
44
|
-
$result:
|
|
43
|
+
$result: map.merge(
|
|
45
44
|
$result,
|
|
46
45
|
(
|
|
47
46
|
#{$key}: #{color.chart-brushes()}
|
|
@@ -105,6 +104,6 @@
|
|
|
105
104
|
/// @param {Number} $radius - The preferred value.
|
|
106
105
|
/// @param {Number} $min [rem(0)] - The minimum value.
|
|
107
106
|
/// @param {Number} $max [$radius] - The maximum allowed value.
|
|
108
|
-
@function border-radius($radius, $min: rem(0), $max: $radius) {
|
|
109
|
-
@return clamp($min, calc(var(--ig-radius-factor) * #{$radius}), $max);
|
|
107
|
+
@function border-radius($radius, $min: #{rem(0)}, $max: $radius) {
|
|
108
|
+
@return clamp(#{$min}, #{calc(var(--ig-radius-factor) * #{$radius})}, #{$max});
|
|
110
109
|
}
|
package/sass/themes/_mixins.scss
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:meta';
|
|
3
3
|
@use 'sass:string';
|
|
4
|
-
@use '../utils/' as *;
|
|
5
|
-
@use '../
|
|
6
|
-
@use './functions' as *;
|
|
4
|
+
@use '../utils/meta' as *;
|
|
5
|
+
@use '../typography/functions' as *;
|
|
7
6
|
|
|
8
7
|
/// A list of ignored keywords to be excluded when generating CSS variables for a theme.
|
|
9
8
|
/// @access private
|
|
@@ -65,8 +64,8 @@ $ignored-keys: ('name', 'palette', 'variant', 'selector');
|
|
|
65
64
|
/// @param {Number} $radius - The preferred value.
|
|
66
65
|
/// @param {Number} $min [rem(0)] - The minimum value.
|
|
67
66
|
/// @param {Number} $max [$radius] - The maximum allowed value.
|
|
68
|
-
@mixin border-radius($radius, $min: rem(0), $max: $radius) {
|
|
69
|
-
border-radius:
|
|
67
|
+
@mixin border-radius($radius, $min: #{rem(0)}, $max: $radius) {
|
|
68
|
+
border-radius: clamp(#{$min}, #{calc(var(--ig-radius-factor) * #{$radius})}, #{$max});
|
|
70
69
|
}
|
|
71
70
|
|
|
72
71
|
/// Truncates text to a specific number of lines.
|
|
@@ -57,7 +57,7 @@ $browser-context: 16px;
|
|
|
57
57
|
|
|
58
58
|
/// Produces a type style map of values that adheres to the ITypeStyle map.
|
|
59
59
|
/// @access public
|
|
60
|
-
/// @param {String} $font-family [var(--
|
|
60
|
+
/// @param {String} $font-family [var(--ig-font-family)] - The font family of the type style.
|
|
61
61
|
/// @param {String} $font-size - The font size of the type style.
|
|
62
62
|
/// @param {Number|String} $font-weight [normal] - The font weight of the type style.
|
|
63
63
|
/// @param {String} $font-style [normal] - The font style of the type style.
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
@use '../
|
|
1
|
+
@use '../functions' as *;
|
|
2
|
+
@use '../../utils/map' as *;
|
|
2
3
|
|
|
3
4
|
////
|
|
4
5
|
/// @group Typography
|
|
5
6
|
////
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
/* stylelint-disable-next-line max-line-length */
|
|
9
|
+
$typeface: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
|
|
10
|
+
$_base-scale: (
|
|
8
11
|
h1: type-style(
|
|
9
12
|
$font-size: rem(40px),
|
|
10
13
|
$font-weight: 500,
|
|
@@ -116,8 +119,8 @@ $bootstrap_weekday: type-style(
|
|
|
116
119
|
$margin-top: 0,
|
|
117
120
|
$margin-bottom: 0
|
|
118
121
|
);
|
|
119
|
-
$
|
|
120
|
-
$scale,
|
|
122
|
+
$type-scale: extend(
|
|
123
|
+
$_base-scale,
|
|
121
124
|
(
|
|
122
125
|
calendar-labels: $bootstrap_weekday,
|
|
123
126
|
)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
@use '../
|
|
1
|
+
@use '../functions' as *;
|
|
2
2
|
|
|
3
3
|
////
|
|
4
4
|
/// @group Typography
|
|
5
5
|
////
|
|
6
6
|
|
|
7
|
-
$
|
|
7
|
+
$typeface: "'Titillium Web', sans-serif";
|
|
8
|
+
$type-scale: (
|
|
8
9
|
h1: type-style(
|
|
9
|
-
$font-family: var(--igc-font-family),
|
|
10
10
|
$font-size: rem(96px),
|
|
11
11
|
$font-weight: 300,
|
|
12
12
|
$font-style: normal,
|
|
@@ -17,7 +17,6 @@ $scale: (
|
|
|
17
17
|
$margin-bottom: rem(56px)
|
|
18
18
|
),
|
|
19
19
|
h2: type-style(
|
|
20
|
-
$font-family: var(--igc-font-family),
|
|
21
20
|
$font-size: rem(60px),
|
|
22
21
|
$font-weight: 300,
|
|
23
22
|
$font-style: normal,
|
|
@@ -28,7 +27,6 @@ $scale: (
|
|
|
28
27
|
$margin-bottom: rem(28px)
|
|
29
28
|
),
|
|
30
29
|
h3: type-style(
|
|
31
|
-
$font-family: var(--igc-font-family),
|
|
32
30
|
$font-size: rem(48px),
|
|
33
31
|
$font-weight: 400,
|
|
34
32
|
$font-style: normal,
|
|
@@ -39,7 +37,6 @@ $scale: (
|
|
|
39
37
|
$margin-bottom: 0
|
|
40
38
|
),
|
|
41
39
|
h4: type-style(
|
|
42
|
-
$font-family: var(--igc-font-family),
|
|
43
40
|
$font-size: rem(34px),
|
|
44
41
|
$font-weight: 400,
|
|
45
42
|
$font-style: normal,
|
|
@@ -50,7 +47,6 @@ $scale: (
|
|
|
50
47
|
$margin-bottom: 0
|
|
51
48
|
),
|
|
52
49
|
h5: type-style(
|
|
53
|
-
$font-family: var(--igc-font-family),
|
|
54
50
|
$font-size: rem(24px),
|
|
55
51
|
$font-weight: 400,
|
|
56
52
|
$font-style: normal,
|
|
@@ -61,7 +57,6 @@ $scale: (
|
|
|
61
57
|
$margin-bottom: 0
|
|
62
58
|
),
|
|
63
59
|
h6: type-style(
|
|
64
|
-
$font-family: var(--igc-font-family),
|
|
65
60
|
$font-size: rem(20px),
|
|
66
61
|
$font-weight: 600,
|
|
67
62
|
$font-style: normal,
|
|
@@ -72,7 +67,6 @@ $scale: (
|
|
|
72
67
|
$margin-bottom: 0
|
|
73
68
|
),
|
|
74
69
|
subtitle-1: type-style(
|
|
75
|
-
$font-family: var(--igc-font-family),
|
|
76
70
|
$font-size: rem(16px),
|
|
77
71
|
$font-weight: 400,
|
|
78
72
|
$font-style: normal,
|
|
@@ -81,7 +75,6 @@ $scale: (
|
|
|
81
75
|
$text-transform: none
|
|
82
76
|
),
|
|
83
77
|
subtitle-2: type-style(
|
|
84
|
-
$font-family: var(--igc-font-family),
|
|
85
78
|
$font-size: rem(14px),
|
|
86
79
|
$font-weight: 600,
|
|
87
80
|
$font-style: normal,
|
|
@@ -90,7 +83,6 @@ $scale: (
|
|
|
90
83
|
$text-transform: none
|
|
91
84
|
),
|
|
92
85
|
body-1: type-style(
|
|
93
|
-
$font-family: var(--igc-font-family),
|
|
94
86
|
$font-size: rem(16px),
|
|
95
87
|
$font-weight: 400,
|
|
96
88
|
$font-style: normal,
|
|
@@ -101,7 +93,6 @@ $scale: (
|
|
|
101
93
|
$margin-bottom: rem(16)
|
|
102
94
|
),
|
|
103
95
|
body-2: type-style(
|
|
104
|
-
$font-family: var(--igc-font-family),
|
|
105
96
|
$font-size: rem(14px),
|
|
106
97
|
$font-weight: 400,
|
|
107
98
|
$font-style: normal,
|
|
@@ -110,7 +101,6 @@ $scale: (
|
|
|
110
101
|
$text-transform: none
|
|
111
102
|
),
|
|
112
103
|
button: type-style(
|
|
113
|
-
$font-family: var(--igc-font-family),
|
|
114
104
|
$font-size: rem(14px),
|
|
115
105
|
$font-weight: 600,
|
|
116
106
|
$font-style: normal,
|
|
@@ -119,7 +109,6 @@ $scale: (
|
|
|
119
109
|
$text-transform: uppercase
|
|
120
110
|
),
|
|
121
111
|
caption: type-style(
|
|
122
|
-
$font-family: var(--igc-font-family),
|
|
123
112
|
$font-size: rem(12px),
|
|
124
113
|
$font-weight: 400,
|
|
125
114
|
$font-style: normal,
|
|
@@ -128,7 +117,6 @@ $scale: (
|
|
|
128
117
|
$text-transform: none
|
|
129
118
|
),
|
|
130
119
|
overline: type-style(
|
|
131
|
-
$font-family: var(--igc-font-family),
|
|
132
120
|
$font-size: rem(10px),
|
|
133
121
|
$font-weight: 400,
|
|
134
122
|
$font-style: normal,
|
package/test/_color.spec.scss
CHANGED
package/test/_themes.spec.scss
CHANGED
|
@@ -180,18 +180,18 @@ $schema: (
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
@include it('should set the border-radius to a value between min and max') {
|
|
183
|
-
$border-radius: border-radius(4px, 2px, 3px);
|
|
184
|
-
$expected: meta.inspect(
|
|
183
|
+
$border-radius: border-radius(rem(4px), rem(2px), rem(3px));
|
|
184
|
+
$expected: clamp(.125rem, meta.inspect(calc(var(--ig-radius-factor) * .25rem)), .1875rem);
|
|
185
185
|
|
|
186
186
|
@include assert-equal($assert: $border-radius, $expected: $expected, $inspect: true);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
@include it('should include border-radius styles to a given scope with a value between min and max') {
|
|
190
|
-
$expected: meta.inspect(
|
|
190
|
+
$expected: clamp(.125rem, meta.inspect(calc(var(--ig-radius-factor) * .25rem)), .1875rem);
|
|
191
191
|
|
|
192
192
|
@include assert() {
|
|
193
193
|
@include output() {
|
|
194
|
-
@include border-radius(4px, 2px, 3px);
|
|
194
|
+
@include border-radius(rem(4px), rem(2px), rem(3px));
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
@include expect() {
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
@use 'sass:color';
|
|
8
8
|
@use 'sass:string';
|
|
9
9
|
@use '../node_modules/sass-true/' as *;
|
|
10
|
-
@use '../
|
|
11
|
-
@use '../sass/typography/types';
|
|
10
|
+
@use '../sass/typography/' as *;
|
|
12
11
|
|
|
13
12
|
$h1: (font-size: 96px);
|
|
14
13
|
$h2: (font-size: 70px);
|
|
@@ -74,7 +73,7 @@ $scale: type-scale(
|
|
|
74
73
|
$font-size: 18px;
|
|
75
74
|
$rules: type-style($font-size: $font-size);
|
|
76
75
|
|
|
77
|
-
@each $rule, $value in map.remove(
|
|
76
|
+
@each $rule, $value in map.remove($ITypeStyle, 'font-size') {
|
|
78
77
|
@include assert-equal(map.get($rules, $rule), $value);
|
|
79
78
|
}
|
|
80
79
|
|
|
@@ -170,7 +169,7 @@ $scale: type-scale(
|
|
|
170
169
|
|
|
171
170
|
@include expect() {
|
|
172
171
|
.my-h1 {
|
|
173
|
-
@each $key, $value in
|
|
172
|
+
@each $key, $value in $ITypeStyle {
|
|
174
173
|
#{$key}: var(--ig-#{$category}-#{$key});
|
|
175
174
|
}
|
|
176
175
|
}
|
|
@@ -185,7 +184,7 @@ $scale: type-scale(
|
|
|
185
184
|
}
|
|
186
185
|
|
|
187
186
|
@include expect() {
|
|
188
|
-
@each $category in
|
|
187
|
+
@each $category in $ITypeScale {
|
|
189
188
|
&__#{$category} {
|
|
190
189
|
@include type-style($category);
|
|
191
190
|
}
|
|
@@ -201,7 +200,7 @@ $scale: type-scale(
|
|
|
201
200
|
}
|
|
202
201
|
|
|
203
202
|
@include expect() {
|
|
204
|
-
@each $category, $element in
|
|
203
|
+
@each $category, $element in $IElementCategories {
|
|
205
204
|
#{$element} {
|
|
206
205
|
@include type-style($category);
|
|
207
206
|
}
|
package/test/_utils.spec.scss
CHANGED
package/test/e2e/theme.scss
CHANGED
|
@@ -1,38 +1,4 @@
|
|
|
1
1
|
@use '../../index' as *;
|
|
2
|
-
@
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
$h2: (font-size: 70px);
|
|
6
|
-
$h3: (font-size: 40px);
|
|
7
|
-
$h4: (font-size: 30px);
|
|
8
|
-
$h5: (font-size: 20px);
|
|
9
|
-
$h6: (font-size: 10px);
|
|
10
|
-
$subtitle-1: (font-size: 96px);
|
|
11
|
-
$subtitle-2: (font-size: 70px);
|
|
12
|
-
$body-1: (font-size: 40px);
|
|
13
|
-
$body-2: (font-size: 30px);
|
|
14
|
-
$button: (font-size: 20px);
|
|
15
|
-
$caption: (font-size: 10px);
|
|
16
|
-
$overline: (font-size: 10px);
|
|
17
|
-
$theme: 'material';
|
|
18
|
-
$scale: type-scale(
|
|
19
|
-
$h1: $h1,
|
|
20
|
-
$h2: $h2,
|
|
21
|
-
$h3: $h3,
|
|
22
|
-
$h4: $h4,
|
|
23
|
-
$h5: $h5,
|
|
24
|
-
$h6: $h6,
|
|
25
|
-
$subtitle-1: $subtitle-1,
|
|
26
|
-
$subtitle-2: $subtitle-2,
|
|
27
|
-
$body-1: $body-1,
|
|
28
|
-
$body-2: $body-2,
|
|
29
|
-
$button: $button,
|
|
30
|
-
$caption: $caption,
|
|
31
|
-
$overline: $overline,
|
|
32
|
-
$_theme: $theme
|
|
33
|
-
);
|
|
34
|
-
$palette: palette($primary: #9fe, $secondary: orange, $surface: #fff);
|
|
35
|
-
|
|
36
|
-
@include palette($palette);
|
|
37
|
-
@include typography("'Roboto', sans-serif", $scale);
|
|
38
|
-
@include elevations($elevations);
|
|
2
|
+
@include palette($light-material-palette);
|
|
3
|
+
@include typography($material-typeface, $material-type-scale);
|
|
4
|
+
@include elevations($material-elevations);
|