@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
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
$input-color: $text !default;
|
|
2
|
-
$input-background-color: $body-background !default;
|
|
3
|
-
$input-border-color: $control-border !default;
|
|
4
|
-
$input-placeholder-color: $text-subtle !default;
|
|
5
|
-
|
|
6
|
-
$input-hover-color: $text !default;
|
|
7
|
-
$input-hover-border-color: $primary !default;
|
|
8
|
-
$input-focus-border-color: $primary !default;
|
|
9
|
-
|
|
10
|
-
$input-disabled-color: $text-subtle !default;
|
|
11
|
-
$input-disabled-background-color: $body-background-medium !default;
|
|
12
|
-
$input-disabled-border-color: $table-border-dark !default;
|
|
13
|
-
|
|
14
|
-
$input-danger-border-color: $danger !default;
|
|
15
|
-
$input-success-border-color: $success !default;
|
|
16
|
-
|
|
17
|
-
$input-focus-box-shadow-size: 0 0 0 0.125rem !default;
|
|
18
|
-
|
|
19
|
-
$input-icon-size: 2.25em !default;
|
|
20
|
-
$input-icon-color: $text-subtle !default;
|
|
21
|
-
$input-icon-active-color: $secondary !default;
|
|
22
|
-
|
|
23
|
-
.input {
|
|
24
|
-
@include control;
|
|
25
|
-
|
|
26
|
-
width: 100%;
|
|
27
|
-
max-width: 100%;
|
|
28
|
-
border-color: $input-border-color;
|
|
29
|
-
background-color: $input-background-color;
|
|
30
|
-
color: $input-color !important;
|
|
31
|
-
|
|
32
|
-
&::placeholder {
|
|
33
|
-
color: $input-placeholder-color;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&:hover {
|
|
37
|
-
border-color: $input-hover-border-color;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&[disabled] {
|
|
41
|
-
border-color: $input-disabled-border-color;
|
|
42
|
-
background-color: $input-disabled-background-color;
|
|
43
|
-
color: $input-disabled-color;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@include focus-visible {
|
|
47
|
-
@extend %focus;
|
|
48
|
-
|
|
49
|
-
border-color: $input-focus-border-color;
|
|
50
|
-
outline-color: transparent;
|
|
51
|
-
outline-offset: 0;
|
|
52
|
-
outline-style: solid;
|
|
53
|
-
box-shadow: $input-focus-box-shadow-size $input-focus-border-color;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&.input-sm {
|
|
57
|
-
@include control-sm;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&.input-lg {
|
|
61
|
-
@include control-lg;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&.input-danger {
|
|
65
|
-
border-color: $input-danger-border-color;
|
|
66
|
-
|
|
67
|
-
@include focus-visible() {
|
|
68
|
-
box-shadow: $input-focus-box-shadow-size $input-danger-border-color;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&.input-success {
|
|
73
|
-
border-color: $input-success-border-color;
|
|
74
|
-
|
|
75
|
-
@include focus-visible() {
|
|
76
|
-
box-shadow: $input-focus-box-shadow-size $input-success-border-color;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&.input-icon-right {
|
|
81
|
-
padding-inline-end: $input-icon-size;
|
|
82
|
-
|
|
83
|
-
~ .icon {
|
|
84
|
-
inset-inline-start: unset !important;
|
|
85
|
-
inset-inline-end: 0;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.input[type='date'] {
|
|
89
|
-
position: relative;
|
|
90
|
-
|
|
91
|
-
&::-webkit-calendar-picker-indicator {
|
|
92
|
-
position: absolute;
|
|
93
|
-
width: 1.5em;
|
|
94
|
-
background: none;
|
|
95
|
-
color: transparent;
|
|
96
|
-
inset-inline-end: 0;
|
|
97
|
-
z-index: $zindex-dropdown;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&.input-icon,
|
|
103
|
-
&.input-icon-right {
|
|
104
|
-
padding-inline-start: $input-icon-size;
|
|
105
|
-
|
|
106
|
-
&.input-icon-right {
|
|
107
|
-
padding-inline-start: $control-padding-horizontal;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
+ .icon {
|
|
111
|
-
@include fill-current-color();
|
|
112
|
-
|
|
113
|
-
position: absolute;
|
|
114
|
-
inset-block-start: 0;
|
|
115
|
-
inset-inline-start: 0;
|
|
116
|
-
width: $input-icon-size;
|
|
117
|
-
height: 100%;
|
|
118
|
-
color: $input-icon-color;
|
|
119
|
-
pointer-events: none;
|
|
120
|
-
z-index: $zindex-multi;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
@include focus-visible {
|
|
124
|
-
+ .icon {
|
|
125
|
-
color: $input-icon-active-color;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&.input-sm {
|
|
130
|
-
~ .icon svg {
|
|
131
|
-
width: 0.875em;
|
|
132
|
-
height: 0.875em;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&.input-lg {
|
|
137
|
-
~ .icon svg {
|
|
138
|
-
width: 1.125em;
|
|
139
|
-
height: 1.125em;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
1
|
+
$input-color: $text !default;
|
|
2
|
+
$input-background-color: $body-background !default;
|
|
3
|
+
$input-border-color: $control-border !default;
|
|
4
|
+
$input-placeholder-color: $text-subtle !default;
|
|
5
|
+
|
|
6
|
+
$input-hover-color: $text !default;
|
|
7
|
+
$input-hover-border-color: $primary !default;
|
|
8
|
+
$input-focus-border-color: $primary !default;
|
|
9
|
+
|
|
10
|
+
$input-disabled-color: $text-subtle !default;
|
|
11
|
+
$input-disabled-background-color: $body-background-medium !default;
|
|
12
|
+
$input-disabled-border-color: $table-border-dark !default;
|
|
13
|
+
|
|
14
|
+
$input-danger-border-color: $danger !default;
|
|
15
|
+
$input-success-border-color: $success !default;
|
|
16
|
+
|
|
17
|
+
$input-focus-box-shadow-size: 0 0 0 0.125rem !default;
|
|
18
|
+
|
|
19
|
+
$input-icon-size: 2.25em !default;
|
|
20
|
+
$input-icon-color: $text-subtle !default;
|
|
21
|
+
$input-icon-active-color: $secondary !default;
|
|
22
|
+
|
|
23
|
+
.input {
|
|
24
|
+
@include control;
|
|
25
|
+
|
|
26
|
+
width: 100%;
|
|
27
|
+
max-width: 100%;
|
|
28
|
+
border-color: $input-border-color;
|
|
29
|
+
background-color: $input-background-color;
|
|
30
|
+
color: $input-color !important;
|
|
31
|
+
|
|
32
|
+
&::placeholder {
|
|
33
|
+
color: $input-placeholder-color;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
border-color: $input-hover-border-color;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&[disabled] {
|
|
41
|
+
border-color: $input-disabled-border-color;
|
|
42
|
+
background-color: $input-disabled-background-color;
|
|
43
|
+
color: $input-disabled-color;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@include focus-visible {
|
|
47
|
+
@extend %focus;
|
|
48
|
+
|
|
49
|
+
border-color: $input-focus-border-color;
|
|
50
|
+
outline-color: transparent;
|
|
51
|
+
outline-offset: 0;
|
|
52
|
+
outline-style: solid;
|
|
53
|
+
box-shadow: $input-focus-box-shadow-size $input-focus-border-color;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.input-sm {
|
|
57
|
+
@include control-sm;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.input-lg {
|
|
61
|
+
@include control-lg;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.input-danger {
|
|
65
|
+
border-color: $input-danger-border-color;
|
|
66
|
+
|
|
67
|
+
@include focus-visible() {
|
|
68
|
+
box-shadow: $input-focus-box-shadow-size $input-danger-border-color;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.input-success {
|
|
73
|
+
border-color: $input-success-border-color;
|
|
74
|
+
|
|
75
|
+
@include focus-visible() {
|
|
76
|
+
box-shadow: $input-focus-box-shadow-size $input-success-border-color;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&.input-icon-right {
|
|
81
|
+
padding-inline-end: $input-icon-size;
|
|
82
|
+
|
|
83
|
+
~ .icon {
|
|
84
|
+
inset-inline-start: unset !important;
|
|
85
|
+
inset-inline-end: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.input[type='date'] {
|
|
89
|
+
position: relative;
|
|
90
|
+
|
|
91
|
+
&::-webkit-calendar-picker-indicator {
|
|
92
|
+
position: absolute;
|
|
93
|
+
width: 1.5em;
|
|
94
|
+
background: none;
|
|
95
|
+
color: transparent;
|
|
96
|
+
inset-inline-end: 0;
|
|
97
|
+
z-index: $zindex-dropdown;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.input-icon,
|
|
103
|
+
&.input-icon-right {
|
|
104
|
+
padding-inline-start: $input-icon-size;
|
|
105
|
+
|
|
106
|
+
&.input-icon-right {
|
|
107
|
+
padding-inline-start: $control-padding-horizontal;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
+ .icon {
|
|
111
|
+
@include fill-current-color();
|
|
112
|
+
|
|
113
|
+
position: absolute;
|
|
114
|
+
inset-block-start: 0;
|
|
115
|
+
inset-inline-start: 0;
|
|
116
|
+
width: $input-icon-size;
|
|
117
|
+
height: 100%;
|
|
118
|
+
color: $input-icon-color;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
z-index: $zindex-multi;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@include focus-visible {
|
|
124
|
+
+ .icon {
|
|
125
|
+
color: $input-icon-active-color;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&.input-sm {
|
|
130
|
+
~ .icon svg {
|
|
131
|
+
width: 0.875em;
|
|
132
|
+
height: 0.875em;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&.input-lg {
|
|
137
|
+
~ .icon svg {
|
|
138
|
+
width: 1.125em;
|
|
139
|
+
height: 1.125em;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
$label-color: $text !default;
|
|
2
|
-
$label-font-size: $font-size-7 !default;
|
|
3
|
-
$label-font-weight: $weight-semibold !default;
|
|
4
|
-
|
|
5
|
-
@mixin label {
|
|
6
|
-
display: block;
|
|
7
|
-
color: $label-color;
|
|
8
|
-
font-size: $label-font-size;
|
|
9
|
-
font-weight: $label-font-weight;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.label {
|
|
13
|
-
@include label;
|
|
14
|
-
}
|
|
1
|
+
$label-color: $text !default;
|
|
2
|
+
$label-font-size: $font-size-7 !default;
|
|
3
|
+
$label-font-weight: $weight-semibold !default;
|
|
4
|
+
|
|
5
|
+
@mixin label {
|
|
6
|
+
display: block;
|
|
7
|
+
color: $label-color;
|
|
8
|
+
font-size: $label-font-size;
|
|
9
|
+
font-weight: $label-font-weight;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.label {
|
|
13
|
+
@include label;
|
|
14
|
+
}
|
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
$radio-circle-size: 1.25em !default;
|
|
2
|
-
$radio-dot-size: 0.625em !default;
|
|
3
|
-
$radio-border-color: $control-border !default;
|
|
4
|
-
$radio-border-width: $control-border-width !default;
|
|
5
|
-
$radio-dot-checked-color: $primary !default;
|
|
6
|
-
$radio-dot-color: $text-subtle !default;
|
|
7
|
-
$radio-dot-hover-unchecked-color: $control-border !default;
|
|
8
|
-
$radio-timing-function: $input-timing-function !default;
|
|
9
|
-
$radio-duration: $input-transition-duration !default;
|
|
10
|
-
$radio-animation: boop !default;
|
|
11
|
-
$radio-spacing: 0.5em !default;
|
|
12
|
-
|
|
13
|
-
@mixin radio-dot {
|
|
14
|
-
position: absolute;
|
|
15
|
-
inset: 0;
|
|
16
|
-
width: $radio-dot-size;
|
|
17
|
-
height: $radio-dot-size;
|
|
18
|
-
margin: auto;
|
|
19
|
-
border-radius: $border-radius-rounded;
|
|
20
|
-
content: '';
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@mixin radio-dot-checked {
|
|
25
|
-
background: $radio-dot-checked-color;
|
|
26
|
-
box-shadow: inset 0 0 0 0.25em $body-background;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.radio {
|
|
30
|
-
display: inline-flex;
|
|
31
|
-
line-height: 1.25;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
|
|
34
|
-
.radio-dot {
|
|
35
|
-
display: inline-block;
|
|
36
|
-
position: relative;
|
|
37
|
-
inset-block-start: 0.0625em;
|
|
38
|
-
flex-shrink: 0;
|
|
39
|
-
width: $radio-circle-size;
|
|
40
|
-
height: $radio-circle-size;
|
|
41
|
-
border: $radio-border-width solid $radio-border-color;
|
|
42
|
-
border-radius: $border-radius-rounded;
|
|
43
|
-
background-color: $body-background;
|
|
44
|
-
color: $radio-dot-color;
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
appearance: none;
|
|
47
|
-
|
|
48
|
-
@include forced-colors {
|
|
49
|
-
border-color: CanvasText !important;
|
|
50
|
-
background-color: unset !important;
|
|
51
|
-
|
|
52
|
-
&::before {
|
|
53
|
-
@include radio-dot;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.radio-label-text {
|
|
59
|
-
margin: 0 $radio-spacing;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* stylelint-disable selector-max-specificity, selector-no-qualifying-type, max-nesting-depth */
|
|
63
|
-
|
|
64
|
-
input {
|
|
65
|
-
&.is-focused {
|
|
66
|
-
@extend %focus;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@include focus-visible {
|
|
70
|
-
@extend %focus;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
input.is-checked,
|
|
75
|
-
input:checked,
|
|
76
|
-
.radio-dot.is-checked {
|
|
77
|
-
@include radio-dot-checked;
|
|
78
|
-
|
|
79
|
-
animation: $radio-animation $radio-duration $radio-timing-function 1;
|
|
80
|
-
border-color: $radio-dot-checked-color;
|
|
81
|
-
|
|
82
|
-
@include forced-colors {
|
|
83
|
-
border-color: CanvasText !important;
|
|
84
|
-
background-color: unset !important;
|
|
85
|
-
box-shadow: none !important;
|
|
86
|
-
|
|
87
|
-
&::before {
|
|
88
|
-
background-color: CanvasText !important;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&.is-hovered,
|
|
94
|
-
&:hover {
|
|
95
|
-
.radio-dot:not(:checked):not([disabled]) {
|
|
96
|
-
background: $radio-dot-hover-unchecked-color;
|
|
97
|
-
box-shadow: inset 0 0 0 0.25em $body-background;
|
|
98
|
-
|
|
99
|
-
@include forced-colors {
|
|
100
|
-
background-color: unset !important;
|
|
101
|
-
box-shadow: none !important;
|
|
102
|
-
|
|
103
|
-
&::before {
|
|
104
|
-
background-color: CanvasText !important;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.radio-dot.is-checked {
|
|
110
|
-
@include radio-dot-checked;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
input[disabled],
|
|
115
|
-
input[disabled] ~ .radio-label-text {
|
|
116
|
-
opacity: 0.5;
|
|
117
|
-
cursor: not-allowed;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* stylelint-enable */
|
|
121
|
-
}
|
|
1
|
+
$radio-circle-size: 1.25em !default;
|
|
2
|
+
$radio-dot-size: 0.625em !default;
|
|
3
|
+
$radio-border-color: $control-border !default;
|
|
4
|
+
$radio-border-width: $control-border-width !default;
|
|
5
|
+
$radio-dot-checked-color: $primary !default;
|
|
6
|
+
$radio-dot-color: $text-subtle !default;
|
|
7
|
+
$radio-dot-hover-unchecked-color: $control-border !default;
|
|
8
|
+
$radio-timing-function: $input-timing-function !default;
|
|
9
|
+
$radio-duration: $input-transition-duration !default;
|
|
10
|
+
$radio-animation: boop !default;
|
|
11
|
+
$radio-spacing: 0.5em !default;
|
|
12
|
+
|
|
13
|
+
@mixin radio-dot {
|
|
14
|
+
position: absolute;
|
|
15
|
+
inset: 0;
|
|
16
|
+
width: $radio-dot-size;
|
|
17
|
+
height: $radio-dot-size;
|
|
18
|
+
margin: auto;
|
|
19
|
+
border-radius: $border-radius-rounded;
|
|
20
|
+
content: '';
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@mixin radio-dot-checked {
|
|
25
|
+
background: $radio-dot-checked-color;
|
|
26
|
+
box-shadow: inset 0 0 0 0.25em $body-background;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.radio {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
line-height: 1.25;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
|
|
34
|
+
.radio-dot {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
position: relative;
|
|
37
|
+
inset-block-start: 0.0625em;
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
width: $radio-circle-size;
|
|
40
|
+
height: $radio-circle-size;
|
|
41
|
+
border: $radio-border-width solid $radio-border-color;
|
|
42
|
+
border-radius: $border-radius-rounded;
|
|
43
|
+
background-color: $body-background;
|
|
44
|
+
color: $radio-dot-color;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
appearance: none;
|
|
47
|
+
|
|
48
|
+
@include forced-colors {
|
|
49
|
+
border-color: CanvasText !important;
|
|
50
|
+
background-color: unset !important;
|
|
51
|
+
|
|
52
|
+
&::before {
|
|
53
|
+
@include radio-dot;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.radio-label-text {
|
|
59
|
+
margin: 0 $radio-spacing;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* stylelint-disable selector-max-specificity, selector-no-qualifying-type, max-nesting-depth */
|
|
63
|
+
|
|
64
|
+
input {
|
|
65
|
+
&.is-focused {
|
|
66
|
+
@extend %focus;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@include focus-visible {
|
|
70
|
+
@extend %focus;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
input.is-checked,
|
|
75
|
+
input:checked,
|
|
76
|
+
.radio-dot.is-checked {
|
|
77
|
+
@include radio-dot-checked;
|
|
78
|
+
|
|
79
|
+
animation: $radio-animation $radio-duration $radio-timing-function 1;
|
|
80
|
+
border-color: $radio-dot-checked-color;
|
|
81
|
+
|
|
82
|
+
@include forced-colors {
|
|
83
|
+
border-color: CanvasText !important;
|
|
84
|
+
background-color: unset !important;
|
|
85
|
+
box-shadow: none !important;
|
|
86
|
+
|
|
87
|
+
&::before {
|
|
88
|
+
background-color: CanvasText !important;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.is-hovered,
|
|
94
|
+
&:hover {
|
|
95
|
+
.radio-dot:not(:checked):not([disabled]) {
|
|
96
|
+
background: $radio-dot-hover-unchecked-color;
|
|
97
|
+
box-shadow: inset 0 0 0 0.25em $body-background;
|
|
98
|
+
|
|
99
|
+
@include forced-colors {
|
|
100
|
+
background-color: unset !important;
|
|
101
|
+
box-shadow: none !important;
|
|
102
|
+
|
|
103
|
+
&::before {
|
|
104
|
+
background-color: CanvasText !important;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.radio-dot.is-checked {
|
|
110
|
+
@include radio-dot-checked;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
input[disabled],
|
|
115
|
+
input[disabled] ~ .radio-label-text {
|
|
116
|
+
opacity: 0.5;
|
|
117
|
+
cursor: not-allowed;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* stylelint-enable */
|
|
121
|
+
}
|