@microsoft/atlas-css 3.43.0 → 3.44.1
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/README.md +42 -42
- package/dist/class-names.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +91 -91
- package/src/atomics/README.md +56 -56
- package/src/atomics/aspect-ratio.scss +13 -13
- package/src/atomics/background.scss +11 -11
- package/src/atomics/border.scss +113 -113
- package/src/atomics/colors.scss +204 -204
- package/src/atomics/display.scss +33 -33
- package/src/atomics/flex.scss +74 -71
- package/src/atomics/gap.scss +60 -60
- package/src/atomics/image.scss +15 -15
- package/src/atomics/index.scss +18 -18
- package/src/atomics/line-clamp.scss +15 -15
- package/src/atomics/list.scss +8 -3
- package/src/atomics/overflow.scss +9 -9
- package/src/atomics/position.scss +19 -19
- package/src/atomics/shadow.scss +19 -19
- package/src/atomics/spacing-auto.scss +52 -52
- package/src/atomics/spacing.scss +98 -98
- package/src/atomics/typography.scss +203 -203
- package/src/atomics/visually-hidden.scss +4 -4
- package/src/atomics/width.scss +44 -44
- package/src/components/README.md +69 -69
- package/src/components/banner.scss +69 -69
- package/src/components/breadcrumbs.scss +37 -37
- package/src/components/button-reset.scss +8 -8
- package/src/components/button.scss +241 -241
- package/src/components/buttons.scss +93 -93
- package/src/components/card.scss +252 -252
- package/src/components/form/checkbox.scss +141 -141
- package/src/components/form/form.scss +67 -67
- package/src/components/form/help.scss +18 -18
- package/src/components/form/index.scss +8 -8
- package/src/components/form/input.scss +143 -143
- package/src/components/form/label.scss +14 -14
- package/src/components/form/radio.scss +121 -121
- package/src/components/form/select.scss +116 -116
- package/src/components/form/textarea.scss +82 -82
- package/src/components/gradient-card.scss +14 -14
- package/src/components/gradient.scss +85 -85
- package/src/components/hero.scss +197 -197
- package/src/components/icon.scss +20 -20
- package/src/components/image.scss +44 -44
- package/src/components/index.scss +27 -27
- package/src/components/layout.scss +189 -189
- package/src/components/link-button.scss +34 -34
- package/src/components/markdown.scss +158 -158
- package/src/components/media.scss +22 -22
- package/src/components/message.scss +74 -74
- package/src/components/notification.scss +101 -101
- package/src/components/pagination.scss +183 -183
- package/src/components/persona.scss +60 -60
- package/src/components/popover.scss +42 -42
- package/src/components/scroll.scss +26 -26
- package/src/components/segmented-control.scss +128 -128
- package/src/components/site-header.scss +255 -255
- package/src/components/stretched-link.scss +8 -8
- package/src/components/table.scss +114 -114
- package/src/components/toggle.scss +86 -86
- package/src/core/animations.scss +55 -55
- package/src/core/bare-elements.scss +38 -38
- package/src/core/focus.scss +45 -45
- package/src/core/font-stack.scss +28 -28
- package/src/core/index.scss +7 -7
- package/src/core/minireset.scss +79 -79
- package/src/core/normalize.scss +353 -353
- package/src/core/themes.scss +91 -91
- package/src/index.scss +5 -5
- package/src/mixins/center.scss +11 -11
- package/src/mixins/code-block.scss +43 -43
- package/src/mixins/colors.scss +6 -6
- package/src/mixins/control.scss +43 -43
- package/src/mixins/dismiss.scss +22 -22
- package/src/mixins/focus.scss +23 -23
- package/src/mixins/font-size.scss +35 -35
- package/src/mixins/force-colors.scss +5 -5
- package/src/mixins/gradient.scss +11 -11
- package/src/mixins/index.scss +17 -17
- package/src/mixins/layout-gap.scss +7 -7
- package/src/mixins/line-clamp.scss +15 -15
- package/src/mixins/loader.scss +16 -16
- package/src/mixins/media-queries.scss +61 -61
- package/src/mixins/overlay.scss +12 -12
- package/src/mixins/transparency.scss +15 -15
- package/src/mixins/unselectable.scss +13 -13
- package/src/mixins/visually-hidden.scss +12 -12
- package/src/tokens/animation.scss +8 -8
- package/src/tokens/border.scss +12 -12
- package/src/tokens/breakpoints.scss +11 -11
- package/src/tokens/colors.scss +239 -239
- package/src/tokens/direction.scss +25 -25
- package/src/tokens/display.scss +5 -5
- package/src/tokens/focus.scss +9 -9
- package/src/tokens/font-stack.scss +10 -10
- package/src/tokens/index.scss +17 -17
- package/src/tokens/layout.scss +17 -17
- package/src/tokens/palette.scss +200 -200
- package/src/tokens/position.scss +5 -5
- package/src/tokens/schemes.scss +14 -14
- package/src/tokens/shadow.scss +11 -11
- package/src/tokens/spacing.scss +25 -25
- package/src/tokens/themes.scss +318 -318
- package/src/tokens/typography.scss +33 -33
- package/src/tokens/z-index.scss +20 -20
- package/tokens/README.md +34 -34
- package/tokens/index.js +246 -246
- package/tokens/types.d.ts +35 -35
package/src/core/themes.scss
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
$root-theme: 'light' !default;
|
|
4
|
-
$print-theme: 'light' !default;
|
|
5
|
-
|
|
6
|
-
// Ensure that the root theme exists
|
|
7
|
-
@if map.has-key($themes, $root-theme) != true {
|
|
8
|
-
@error "Cannot build themes because $root-theme (#{$root-theme}) is set to a theme that does not exist in $themes map.";
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Ensure that the print theme exists
|
|
12
|
-
@if map.has-key($themes, $print-theme) != true {
|
|
13
|
-
@error "Cannot build themes because $print-theme (#{$print-theme}) is set to a theme that does not exist in $themes map.";
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
$theme-names: map.keys($themes);
|
|
17
|
-
|
|
18
|
-
// Validation: ensure that all values in the root theme are in the other themes too
|
|
19
|
-
@each $root-color-name, $val in map.get($themes, $root-theme) {
|
|
20
|
-
@each $theme-name in $theme-names {
|
|
21
|
-
@if $theme-name != $root-theme {
|
|
22
|
-
@if map.has-key(map.get($themes, $theme-name), $root-color-name) != true {
|
|
23
|
-
@error '#{$root-color-name} from #{$root-theme} does not exist in theme: #{$theme-name}.';
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Validation: ensure all properties in non-root themes exist in root
|
|
30
|
-
@each $theme-name in $theme-names {
|
|
31
|
-
$theme: map.get($themes, $theme-name);
|
|
32
|
-
@if $theme-name != $root-theme {
|
|
33
|
-
$root: map.get($themes, $root-theme);
|
|
34
|
-
@each $color-name, $val in $theme {
|
|
35
|
-
@if map.has-key($root, $color-name) != true {
|
|
36
|
-
@error '#{$color-name} from #{$theme-name} does not exist in theme: #{$theme-name}.';
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@each $key, $value in $themes {
|
|
43
|
-
// Set the default theme
|
|
44
|
-
@if $key == $root-theme {
|
|
45
|
-
:root {
|
|
46
|
-
@each $colorName, $colorVal in map.get($themes, $key) {
|
|
47
|
-
// stylelint-disable-next-line custom-property-pattern
|
|
48
|
-
--theme-#{$colorName}: #{$colorVal};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@if $key == $print-theme {
|
|
54
|
-
.theme-#{$key} {
|
|
55
|
-
@each $colorName, $colorVal in map.get($themes, $key) {
|
|
56
|
-
// stylelint-disable-next-line custom-property-pattern
|
|
57
|
-
--theme-#{$colorName}: #{$colorVal};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
} @else {
|
|
61
|
-
// Set the rest of the themes, exclude them from print styling.
|
|
62
|
-
@media not print {
|
|
63
|
-
.theme-#{$key} {
|
|
64
|
-
@each $colorName, $colorVal in map-get($themes, $key) {
|
|
65
|
-
// stylelint-disable-next-line custom-property-pattern
|
|
66
|
-
--theme-#{$colorName}: #{$colorVal};
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// End validation
|
|
74
|
-
|
|
75
|
-
%theme-base-styles {
|
|
76
|
-
outline-color: $text;
|
|
77
|
-
background-color: $body-background;
|
|
78
|
-
color: $text;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@each $key, $value in $themes {
|
|
82
|
-
.theme-#{$key} {
|
|
83
|
-
@extend %theme-base-styles;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@each $key, $value in $color-schemes {
|
|
88
|
-
.theme-#{$key} {
|
|
89
|
-
color-scheme: #{$value};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$root-theme: 'light' !default;
|
|
4
|
+
$print-theme: 'light' !default;
|
|
5
|
+
|
|
6
|
+
// Ensure that the root theme exists
|
|
7
|
+
@if map.has-key($themes, $root-theme) != true {
|
|
8
|
+
@error "Cannot build themes because $root-theme (#{$root-theme}) is set to a theme that does not exist in $themes map.";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Ensure that the print theme exists
|
|
12
|
+
@if map.has-key($themes, $print-theme) != true {
|
|
13
|
+
@error "Cannot build themes because $print-theme (#{$print-theme}) is set to a theme that does not exist in $themes map.";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
$theme-names: map.keys($themes);
|
|
17
|
+
|
|
18
|
+
// Validation: ensure that all values in the root theme are in the other themes too
|
|
19
|
+
@each $root-color-name, $val in map.get($themes, $root-theme) {
|
|
20
|
+
@each $theme-name in $theme-names {
|
|
21
|
+
@if $theme-name != $root-theme {
|
|
22
|
+
@if map.has-key(map.get($themes, $theme-name), $root-color-name) != true {
|
|
23
|
+
@error '#{$root-color-name} from #{$root-theme} does not exist in theme: #{$theme-name}.';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Validation: ensure all properties in non-root themes exist in root
|
|
30
|
+
@each $theme-name in $theme-names {
|
|
31
|
+
$theme: map.get($themes, $theme-name);
|
|
32
|
+
@if $theme-name != $root-theme {
|
|
33
|
+
$root: map.get($themes, $root-theme);
|
|
34
|
+
@each $color-name, $val in $theme {
|
|
35
|
+
@if map.has-key($root, $color-name) != true {
|
|
36
|
+
@error '#{$color-name} from #{$theme-name} does not exist in theme: #{$theme-name}.';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@each $key, $value in $themes {
|
|
43
|
+
// Set the default theme
|
|
44
|
+
@if $key == $root-theme {
|
|
45
|
+
:root {
|
|
46
|
+
@each $colorName, $colorVal in map.get($themes, $key) {
|
|
47
|
+
// stylelint-disable-next-line custom-property-pattern
|
|
48
|
+
--theme-#{$colorName}: #{$colorVal};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@if $key == $print-theme {
|
|
54
|
+
.theme-#{$key} {
|
|
55
|
+
@each $colorName, $colorVal in map.get($themes, $key) {
|
|
56
|
+
// stylelint-disable-next-line custom-property-pattern
|
|
57
|
+
--theme-#{$colorName}: #{$colorVal};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
} @else {
|
|
61
|
+
// Set the rest of the themes, exclude them from print styling.
|
|
62
|
+
@media not print {
|
|
63
|
+
.theme-#{$key} {
|
|
64
|
+
@each $colorName, $colorVal in map-get($themes, $key) {
|
|
65
|
+
// stylelint-disable-next-line custom-property-pattern
|
|
66
|
+
--theme-#{$colorName}: #{$colorVal};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// End validation
|
|
74
|
+
|
|
75
|
+
%theme-base-styles {
|
|
76
|
+
outline-color: $text;
|
|
77
|
+
background-color: $body-background;
|
|
78
|
+
color: $text;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@each $key, $value in $themes {
|
|
82
|
+
.theme-#{$key} {
|
|
83
|
+
@extend %theme-base-styles;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@each $key, $value in $color-schemes {
|
|
88
|
+
.theme-#{$key} {
|
|
89
|
+
color-scheme: #{$value};
|
|
90
|
+
}
|
|
91
|
+
}
|
package/src/index.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import './tokens/index.scss';
|
|
2
|
-
@import './mixins/index.scss';
|
|
3
|
-
@import './core/index.scss';
|
|
4
|
-
@import './components/index.scss';
|
|
5
|
-
@import './atomics/index.scss';
|
|
1
|
+
@import './tokens/index.scss';
|
|
2
|
+
@import './mixins/index.scss';
|
|
3
|
+
@import './core/index.scss';
|
|
4
|
+
@import './components/index.scss';
|
|
5
|
+
@import './atomics/index.scss';
|
package/src/mixins/center.scss
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@mixin center($width, $height: 0) {
|
|
2
|
-
position: absolute;
|
|
3
|
-
|
|
4
|
-
@if $height != 0 {
|
|
5
|
-
inset-block-start: calc(50% - (#{$height} / 2));
|
|
6
|
-
inset-inline-start: calc(50% - (#{$width} / 2));
|
|
7
|
-
} @else {
|
|
8
|
-
inset-block-start: calc(50% - (#{$width} / 2));
|
|
9
|
-
inset-inline-start: calc(50% - (#{$width} / 2));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
@mixin center($width, $height: 0) {
|
|
2
|
+
position: absolute;
|
|
3
|
+
|
|
4
|
+
@if $height != 0 {
|
|
5
|
+
inset-block-start: calc(50% - (#{$height} / 2));
|
|
6
|
+
inset-inline-start: calc(50% - (#{$width} / 2));
|
|
7
|
+
} @else {
|
|
8
|
+
inset-block-start: calc(50% - (#{$width} / 2));
|
|
9
|
+
inset-inline-start: calc(50% - (#{$width} / 2));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
$code-font-size: $font-size-8 !default;
|
|
2
|
-
$code-block-spacing: 1em !default;
|
|
3
|
-
$code-header-body-line-height: 1.3571 !default;
|
|
4
|
-
|
|
5
|
-
@mixin code-block {
|
|
6
|
-
pre {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
max-width: 100%;
|
|
9
|
-
margin: 0;
|
|
10
|
-
padding: $code-block-spacing;
|
|
11
|
-
border: 1px solid $border;
|
|
12
|
-
background-color: $code-block;
|
|
13
|
-
font-size: $code-font-size;
|
|
14
|
-
-moz-osx-font-smoothing: auto;
|
|
15
|
-
-webkit-font-smoothing: auto;
|
|
16
|
-
line-height: 1.3571;
|
|
17
|
-
white-space: pre;
|
|
18
|
-
word-spacing: normal;
|
|
19
|
-
overflow: auto;
|
|
20
|
-
word-break: normal;
|
|
21
|
-
word-wrap: normal;
|
|
22
|
-
tab-size: 4;
|
|
23
|
-
hyphens: none;
|
|
24
|
-
-webkit-overflow-scrolling: touch;
|
|
25
|
-
|
|
26
|
-
> code {
|
|
27
|
-
display: block;
|
|
28
|
-
position: relative;
|
|
29
|
-
padding: 0;
|
|
30
|
-
border: 0;
|
|
31
|
-
line-height: $code-header-body-line-height;
|
|
32
|
-
|
|
33
|
-
mark {
|
|
34
|
-
display: inline-block;
|
|
35
|
-
min-width: calc(100% + #{$code-block-spacing} + #{$code-block-spacing});
|
|
36
|
-
min-height: 18.9px; // Allow for highlighting of blank lines.
|
|
37
|
-
margin: 0 $code-block-spacing * -1;
|
|
38
|
-
padding: 0 $code-block-spacing;
|
|
39
|
-
color: $text;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
$code-font-size: $font-size-8 !default;
|
|
2
|
+
$code-block-spacing: 1em !default;
|
|
3
|
+
$code-header-body-line-height: 1.3571 !default;
|
|
4
|
+
|
|
5
|
+
@mixin code-block {
|
|
6
|
+
pre {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: $code-block-spacing;
|
|
11
|
+
border: 1px solid $border;
|
|
12
|
+
background-color: $code-block;
|
|
13
|
+
font-size: $code-font-size;
|
|
14
|
+
-moz-osx-font-smoothing: auto;
|
|
15
|
+
-webkit-font-smoothing: auto;
|
|
16
|
+
line-height: 1.3571;
|
|
17
|
+
white-space: pre;
|
|
18
|
+
word-spacing: normal;
|
|
19
|
+
overflow: auto;
|
|
20
|
+
word-break: normal;
|
|
21
|
+
word-wrap: normal;
|
|
22
|
+
tab-size: 4;
|
|
23
|
+
hyphens: none;
|
|
24
|
+
-webkit-overflow-scrolling: touch;
|
|
25
|
+
|
|
26
|
+
> code {
|
|
27
|
+
display: block;
|
|
28
|
+
position: relative;
|
|
29
|
+
padding: 0;
|
|
30
|
+
border: 0;
|
|
31
|
+
line-height: $code-header-body-line-height;
|
|
32
|
+
|
|
33
|
+
mark {
|
|
34
|
+
display: inline-block;
|
|
35
|
+
min-width: calc(100% + #{$code-block-spacing} + #{$code-block-spacing});
|
|
36
|
+
min-height: 18.9px; // Allow for highlighting of blank lines.
|
|
37
|
+
margin: 0 $code-block-spacing * -1;
|
|
38
|
+
padding: 0 $code-block-spacing;
|
|
39
|
+
color: $text;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
package/src/mixins/colors.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@mixin fill-current-color {
|
|
2
|
-
fill: currentColor !important;
|
|
3
|
-
|
|
4
|
-
// Ensure SVG paths can adapt to forced colors theming
|
|
5
|
-
forced-color-adjust: auto;
|
|
6
|
-
}
|
|
1
|
+
@mixin fill-current-color {
|
|
2
|
+
fill: currentColor !important;
|
|
3
|
+
|
|
4
|
+
// Ensure SVG paths can adapt to forced colors theming
|
|
5
|
+
forced-color-adjust: auto;
|
|
6
|
+
}
|
package/src/mixins/control.scss
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
$control-radius: $border-radius-sm !default;
|
|
2
|
-
|
|
3
|
-
$control-font-size: $font-size-7 !default;
|
|
4
|
-
$control-sm-font-size: $font-size-8 !default;
|
|
5
|
-
$control-lg-font-size: $font-size-6 !default;
|
|
6
|
-
|
|
7
|
-
$control-border-width: 1px !default;
|
|
8
|
-
|
|
9
|
-
$control-padding-vertical: calc(0.375em - #{$control-border-width}) !default;
|
|
10
|
-
$control-padding-horizontal: calc(0.625em - #{$control-border-width}) !default;
|
|
11
|
-
|
|
12
|
-
%control {
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
position: relative;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: flex-start;
|
|
17
|
-
min-height: 2.25em;
|
|
18
|
-
padding-block: $control-padding-vertical;
|
|
19
|
-
padding-inline: $control-padding-horizontal;
|
|
20
|
-
border: $control-border-width solid transparent;
|
|
21
|
-
border-radius: $control-radius;
|
|
22
|
-
font-size: $control-font-size;
|
|
23
|
-
line-height: 1.5;
|
|
24
|
-
appearance: none;
|
|
25
|
-
box-shadow: none;
|
|
26
|
-
vertical-align: top;
|
|
27
|
-
|
|
28
|
-
&[disabled] {
|
|
29
|
-
cursor: not-allowed;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@mixin control {
|
|
34
|
-
@extend %control;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@mixin control-sm {
|
|
38
|
-
font-size: $control-sm-font-size;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@mixin control-lg {
|
|
42
|
-
font-size: $control-lg-font-size;
|
|
43
|
-
}
|
|
1
|
+
$control-radius: $border-radius-sm !default;
|
|
2
|
+
|
|
3
|
+
$control-font-size: $font-size-7 !default;
|
|
4
|
+
$control-sm-font-size: $font-size-8 !default;
|
|
5
|
+
$control-lg-font-size: $font-size-6 !default;
|
|
6
|
+
|
|
7
|
+
$control-border-width: 1px !default;
|
|
8
|
+
|
|
9
|
+
$control-padding-vertical: calc(0.375em - #{$control-border-width}) !default;
|
|
10
|
+
$control-padding-horizontal: calc(0.625em - #{$control-border-width}) !default;
|
|
11
|
+
|
|
12
|
+
%control {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
position: relative;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: flex-start;
|
|
17
|
+
min-height: 2.25em;
|
|
18
|
+
padding-block: $control-padding-vertical;
|
|
19
|
+
padding-inline: $control-padding-horizontal;
|
|
20
|
+
border: $control-border-width solid transparent;
|
|
21
|
+
border-radius: $control-radius;
|
|
22
|
+
font-size: $control-font-size;
|
|
23
|
+
line-height: 1.5;
|
|
24
|
+
appearance: none;
|
|
25
|
+
box-shadow: none;
|
|
26
|
+
vertical-align: top;
|
|
27
|
+
|
|
28
|
+
&[disabled] {
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@mixin control {
|
|
34
|
+
@extend %control;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin control-sm {
|
|
38
|
+
font-size: $control-sm-font-size;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@mixin control-lg {
|
|
42
|
+
font-size: $control-lg-font-size;
|
|
43
|
+
}
|
package/src/mixins/dismiss.scss
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
%dismiss {
|
|
2
|
-
@include transparent-effects;
|
|
3
|
-
|
|
4
|
-
display: inline-block;
|
|
5
|
-
color: currentColor;
|
|
6
|
-
font-size: 1rem;
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@mixin dismiss {
|
|
11
|
-
@extend %dismiss;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@mixin dismiss-square {
|
|
15
|
-
@extend %dismiss;
|
|
16
|
-
|
|
17
|
-
width: 1em;
|
|
18
|
-
height: 1em;
|
|
19
|
-
padding: 0;
|
|
20
|
-
border: 0;
|
|
21
|
-
border-radius: $border-radius-rounded;
|
|
22
|
-
}
|
|
1
|
+
%dismiss {
|
|
2
|
+
@include transparent-effects;
|
|
3
|
+
|
|
4
|
+
display: inline-block;
|
|
5
|
+
color: currentColor;
|
|
6
|
+
font-size: 1rem;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@mixin dismiss {
|
|
11
|
+
@extend %dismiss;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin dismiss-square {
|
|
15
|
+
@extend %dismiss;
|
|
16
|
+
|
|
17
|
+
width: 1em;
|
|
18
|
+
height: 1em;
|
|
19
|
+
padding: 0;
|
|
20
|
+
border: 0;
|
|
21
|
+
border-radius: $border-radius-rounded;
|
|
22
|
+
}
|
package/src/mixins/focus.scss
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
// stylelint-disable declaration-block-no-redundant-longhand-properties
|
|
2
|
-
@mixin focus() {
|
|
3
|
-
outline-color: inherit;
|
|
4
|
-
outline-offset: $focus-outline-offset;
|
|
5
|
-
outline-style: $focus-style;
|
|
6
|
-
outline-width: $focus-width;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
%focus {
|
|
10
|
-
@include focus();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@mixin focus-visible {
|
|
14
|
-
@if ($focus-visible-use-polyfill) {
|
|
15
|
-
&.focus-visible {
|
|
16
|
-
@content;
|
|
17
|
-
}
|
|
18
|
-
} @else {
|
|
19
|
-
&:focus-visible {
|
|
20
|
-
@content;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
// stylelint-disable declaration-block-no-redundant-longhand-properties
|
|
2
|
+
@mixin focus() {
|
|
3
|
+
outline-color: inherit;
|
|
4
|
+
outline-offset: $focus-outline-offset;
|
|
5
|
+
outline-style: $focus-style;
|
|
6
|
+
outline-width: $focus-width;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
%focus {
|
|
10
|
+
@include focus();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin focus-visible {
|
|
14
|
+
@if ($focus-visible-use-polyfill) {
|
|
15
|
+
&.focus-visible {
|
|
16
|
+
@content;
|
|
17
|
+
}
|
|
18
|
+
} @else {
|
|
19
|
+
&:focus-visible {
|
|
20
|
+
@content;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
@use 'sass:math';
|
|
2
|
-
|
|
3
|
-
/* stylelint-disable */
|
|
4
|
-
|
|
5
|
-
$font-size-scaling-factor: 0.75 !default;
|
|
6
|
-
|
|
7
|
-
// Remove the units from a value
|
|
8
|
-
@function strip-units($number) {
|
|
9
|
-
@return math.div($number, ($number * 0 + 1));
|
|
10
|
-
}
|
|
11
|
-
@mixin responsive-font-size(
|
|
12
|
-
// font-size to stop scaling at
|
|
13
|
-
$end-rem,
|
|
14
|
-
// whether to include !important
|
|
15
|
-
$important: false,
|
|
16
|
-
// font-size to start scaling from
|
|
17
|
-
$start-rem: max($end-rem * $font-size-scaling-factor, 1rem),
|
|
18
|
-
// viewport width to stop scaling at
|
|
19
|
-
$end-width: $breakpoint-desktop,
|
|
20
|
-
// viewport width to start scaling from
|
|
21
|
-
$start-width: 480px
|
|
22
|
-
) {
|
|
23
|
-
$m: math.div(
|
|
24
|
-
strip-units($end-rem) - strip-units($start-rem),
|
|
25
|
-
strip-units($end-width) - strip-units($start-width)
|
|
26
|
-
) * strip-units($document-font-size);
|
|
27
|
-
|
|
28
|
-
$y: strip-units($start-rem) * strip-units($document-font-size);
|
|
29
|
-
$x: strip-units($start-width);
|
|
30
|
-
$b: $y - $m * $x;
|
|
31
|
-
$importantValue: if($important, !important, '');
|
|
32
|
-
|
|
33
|
-
font-size: clamp(#{$start-rem}, #{$b}px + #{$m * 100}vw, #{$end-rem}) #{$importantValue};
|
|
34
|
-
}
|
|
35
|
-
/* stylelint-enable */
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable */
|
|
4
|
+
|
|
5
|
+
$font-size-scaling-factor: 0.75 !default;
|
|
6
|
+
|
|
7
|
+
// Remove the units from a value
|
|
8
|
+
@function strip-units($number) {
|
|
9
|
+
@return math.div($number, ($number * 0 + 1));
|
|
10
|
+
}
|
|
11
|
+
@mixin responsive-font-size(
|
|
12
|
+
// font-size to stop scaling at
|
|
13
|
+
$end-rem,
|
|
14
|
+
// whether to include !important
|
|
15
|
+
$important: false,
|
|
16
|
+
// font-size to start scaling from
|
|
17
|
+
$start-rem: max($end-rem * $font-size-scaling-factor, 1rem),
|
|
18
|
+
// viewport width to stop scaling at
|
|
19
|
+
$end-width: $breakpoint-desktop,
|
|
20
|
+
// viewport width to start scaling from
|
|
21
|
+
$start-width: 480px
|
|
22
|
+
) {
|
|
23
|
+
$m: math.div(
|
|
24
|
+
strip-units($end-rem) - strip-units($start-rem),
|
|
25
|
+
strip-units($end-width) - strip-units($start-width)
|
|
26
|
+
) * strip-units($document-font-size);
|
|
27
|
+
|
|
28
|
+
$y: strip-units($start-rem) * strip-units($document-font-size);
|
|
29
|
+
$x: strip-units($start-width);
|
|
30
|
+
$b: $y - $m * $x;
|
|
31
|
+
$importantValue: if($important, !important, '');
|
|
32
|
+
|
|
33
|
+
font-size: clamp(#{$start-rem}, #{$b}px + #{$m * 100}vw, #{$end-rem}) #{$importantValue};
|
|
34
|
+
}
|
|
35
|
+
/* stylelint-enable */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@mixin forced-colors() {
|
|
2
|
-
@media (forced-colors: active) {
|
|
3
|
-
@content;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
1
|
+
@mixin forced-colors() {
|
|
2
|
+
@media (forced-colors: active) {
|
|
3
|
+
@content;
|
|
4
|
+
}
|
|
5
|
+
}
|
package/src/mixins/gradient.scss
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@mixin gradient-text($startColor, $endColor) {
|
|
2
|
-
/* stylelint-disable */
|
|
3
|
-
-webkit-background-clip: text;
|
|
4
|
-
/* stylelint-enable */
|
|
5
|
-
background-clip: text;
|
|
6
|
-
background-color: $startColor;
|
|
7
|
-
background-image: linear-gradient(90deg, $startColor, $endColor);
|
|
8
|
-
color: transparent;
|
|
9
|
-
-webkit-text-fill-color: transparent;
|
|
10
|
-
line-height: 1.4; // required because of background clip, avoid "g" and "y" getting cut off
|
|
11
|
-
}
|
|
1
|
+
@mixin gradient-text($startColor, $endColor) {
|
|
2
|
+
/* stylelint-disable */
|
|
3
|
+
-webkit-background-clip: text;
|
|
4
|
+
/* stylelint-enable */
|
|
5
|
+
background-clip: text;
|
|
6
|
+
background-color: $startColor;
|
|
7
|
+
background-image: linear-gradient(90deg, $startColor, $endColor);
|
|
8
|
+
color: transparent;
|
|
9
|
+
-webkit-text-fill-color: transparent;
|
|
10
|
+
line-height: 1.4; // required because of background clip, avoid "g" and "y" getting cut off
|
|
11
|
+
}
|
package/src/mixins/index.scss
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
@import './media-queries.scss';
|
|
2
|
-
@import './code-block.scss';
|
|
3
|
-
@import './colors.scss';
|
|
4
|
-
@import './control.scss';
|
|
5
|
-
@import './center.scss';
|
|
6
|
-
@import './focus.scss';
|
|
7
|
-
@import './gradient.scss';
|
|
8
|
-
@import './loader.scss';
|
|
9
|
-
@import './line-clamp.scss';
|
|
10
|
-
@import './layout-gap.scss';
|
|
11
|
-
@import './font-size.scss';
|
|
12
|
-
@import './force-colors.scss';
|
|
13
|
-
@import './overlay.scss';
|
|
14
|
-
@import './transparency.scss';
|
|
15
|
-
@import './dismiss.scss';
|
|
16
|
-
@import './unselectable.scss';
|
|
17
|
-
@import './visually-hidden.scss';
|
|
1
|
+
@import './media-queries.scss';
|
|
2
|
+
@import './code-block.scss';
|
|
3
|
+
@import './colors.scss';
|
|
4
|
+
@import './control.scss';
|
|
5
|
+
@import './center.scss';
|
|
6
|
+
@import './focus.scss';
|
|
7
|
+
@import './gradient.scss';
|
|
8
|
+
@import './loader.scss';
|
|
9
|
+
@import './line-clamp.scss';
|
|
10
|
+
@import './layout-gap.scss';
|
|
11
|
+
@import './font-size.scss';
|
|
12
|
+
@import './force-colors.scss';
|
|
13
|
+
@import './overlay.scss';
|
|
14
|
+
@import './transparency.scss';
|
|
15
|
+
@import './dismiss.scss';
|
|
16
|
+
@import './unselectable.scss';
|
|
17
|
+
@import './visually-hidden.scss';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
%layout-gap {
|
|
2
|
-
padding-inline: $layout-gap;
|
|
3
|
-
|
|
4
|
-
@include widescreen {
|
|
5
|
-
padding-inline: $layout-widescreen-gap;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
%layout-gap {
|
|
2
|
+
padding-inline: $layout-gap;
|
|
3
|
+
|
|
4
|
+
@include widescreen {
|
|
5
|
+
padding-inline: $layout-widescreen-gap;
|
|
6
|
+
}
|
|
7
|
+
}
|