@microsoft/atlas-css 3.12.5 → 3.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/atlas-css",
3
- "version": "3.12.5",
3
+ "version": "3.13.0",
4
4
  "description": "Styles backing the Atlas Design System used by Microsoft's Developer Relations.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -13,8 +13,11 @@
13
13
  }
14
14
 
15
15
  a.color-#{$name} {
16
- &:hover,
17
- &.focus-visible {
16
+ &:hover {
17
+ color: $hover !important;
18
+ }
19
+
20
+ @include focus-visible {
18
21
  color: $hover !important;
19
22
  }
20
23
 
@@ -64,7 +64,6 @@
64
64
  z-index: $zindex-hover;
65
65
  }
66
66
 
67
- &.focus-visible,
68
67
  &.is-focused,
69
68
  &:active,
70
69
  &.is-active,
@@ -76,6 +75,14 @@
76
75
  }
77
76
  }
78
77
 
78
+ @include focus-visible {
79
+ z-index: $zindex-focus;
80
+
81
+ &:hover {
82
+ z-index: $zindex-multi;
83
+ }
84
+ }
85
+
79
86
  &.is-expanded {
80
87
  flex-grow: 1;
81
88
  }
@@ -4,3 +4,4 @@
4
4
  @import './input.scss';
5
5
  @import './textarea.scss';
6
6
  @import './select.scss';
7
+ @import './radio.scss';
@@ -0,0 +1,97 @@
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-timing-function: $input-timing-function !default;
8
+ $radio-duration: $input-transition-duration !default;
9
+ $radio-animation: boop !default;
10
+ $radio-spacing: 0.5em !default;
11
+
12
+ @mixin radio-dot {
13
+ position: absolute;
14
+ inset: 0;
15
+ width: $radio-dot-size;
16
+ height: $radio-dot-size;
17
+ margin: auto;
18
+ border-radius: $border-radius-rounded;
19
+ background-color: $body-background;
20
+ content: '';
21
+ overflow: hidden;
22
+ }
23
+
24
+ @mixin radio-dot-checked {
25
+ background: $radio-dot-checked-color;
26
+ }
27
+
28
+ .radio {
29
+ display: inline-flex;
30
+ position: relative;
31
+ align-items: flex-start;
32
+ line-height: 1.25;
33
+ cursor: pointer;
34
+
35
+ .radio-dot {
36
+ display: inline-block;
37
+ position: relative;
38
+ inset-block-start: 0.0625em;
39
+ flex-shrink: 0;
40
+ width: $radio-circle-size;
41
+ height: $radio-circle-size;
42
+ border: $radio-border-width solid $radio-border-color;
43
+ border-radius: $border-radius-rounded;
44
+ color: $radio-dot-color;
45
+ appearance: none;
46
+
47
+ &::before {
48
+ @include radio-dot;
49
+ }
50
+ }
51
+
52
+ .radio-label-text {
53
+ margin: 0 $radio-spacing;
54
+ }
55
+
56
+ /* stylelint-disable selector-max-specificity */
57
+
58
+ &.is-hovered,
59
+ &:hover:not([disabled]) {
60
+ .radio-dot:not(:checked)::before {
61
+ @include radio-dot-checked;
62
+ }
63
+ }
64
+
65
+ /* stylelint-enable */
66
+
67
+ /* stylelint-disable selector-no-qualifying-type */
68
+
69
+ input {
70
+ &.is-focused {
71
+ @extend %focus;
72
+ }
73
+
74
+ @include focus-visible {
75
+ @extend %focus;
76
+ }
77
+ }
78
+
79
+ input.is-checked,
80
+ input:checked,
81
+ .radio-dot.is-checked {
82
+ animation: $radio-animation $radio-duration $radio-timing-function 1;
83
+ border-color: $radio-dot-checked-color;
84
+
85
+ &::before {
86
+ @include radio-dot-checked;
87
+ }
88
+ }
89
+
90
+ input[disabled],
91
+ input[disabled] ~ .radio-label-text {
92
+ opacity: 0.5;
93
+ cursor: not-allowed;
94
+ }
95
+
96
+ /* stylelint-enable */
97
+ }
@@ -16,7 +16,6 @@
16
16
  text-decoration: underline !important;
17
17
  }
18
18
 
19
- &.focus-visible,
20
19
  &.is-focused,
21
20
  &:hover,
22
21
  &.is-hovered {
@@ -24,6 +23,11 @@
24
23
  text-decoration: underline !important;
25
24
  }
26
25
 
26
+ @include focus-visible {
27
+ color: $primary-hover;
28
+ text-decoration: underline !important;
29
+ }
30
+
27
31
  &:visited {
28
32
  color: $visited;
29
33
  }
@@ -10,3 +10,17 @@
10
10
  transform: rotate(359deg);
11
11
  }
12
12
  }
13
+
14
+ @keyframes boop {
15
+ 0% {
16
+ transform: scale(1);
17
+ }
18
+
19
+ 50% {
20
+ transform: scale(1.1);
21
+ }
22
+
23
+ 100% {
24
+ transform: scale(1);
25
+ }
26
+ }
@@ -4,7 +4,8 @@
4
4
  appearance: none;
5
5
 
6
6
  &:not(:hover),
7
- &:not(.focus-visible) {
7
+ &:not(.focus-visible),
8
+ &:not(:focus-visible) {
8
9
  background-color: transparent;
9
10
  }
10
11
  }