@microsoft/atlas-css 3.28.0 → 3.30.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.28.0",
3
+ "version": "3.30.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",
@@ -6,6 +6,10 @@ $button-background-color: $body-background !default;
6
6
  $button-lg-font-size: $font-size-6 !default;
7
7
  $button-sm-font-size: $font-size-8 !default;
8
8
 
9
+ $button-icon-font-size: $font-size-8 !default;
10
+ $button-icon-sm-font-size: $font-size-9 !default;
11
+ $button-icon-lg-font-size: $font-size-7 !default;
12
+
9
13
  $button-border-color: $text-subtle !default;
10
14
  $button-border-width: $control-border-width !default;
11
15
  $button-border-radius: $control-radius !default;
@@ -48,6 +52,8 @@ $button-font-weight: $weight-semibold !default;
48
52
  }
49
53
 
50
54
  .icon {
55
+ font-size: $button-icon-font-size;
56
+
51
57
  &:only-child {
52
58
  margin: 0;
53
59
  }
@@ -74,14 +80,26 @@ $button-font-weight: $weight-semibold !default;
74
80
 
75
81
  // Sizes
76
82
 
83
+ /* stylelint-disable no-descending-specificity */
84
+
77
85
  &.button-sm {
78
86
  font-size: $button-sm-font-size;
87
+
88
+ .icon {
89
+ font-size: $button-icon-sm-font-size;
90
+ }
79
91
  }
80
92
 
81
93
  &.button-lg {
82
94
  font-size: $button-lg-font-size;
95
+
96
+ .icon {
97
+ font-size: $button-icon-lg-font-size;
98
+ }
83
99
  }
84
100
 
101
+ /* stylelint-enable no-descending-specificity */
102
+
85
103
  // Modifiers
86
104
 
87
105
  &.is-disabled,
@@ -3,6 +3,7 @@
3
3
  $checkbox-border-radius: $border-radius-sm !default;
4
4
  $checkbox-border-width: 0.0625em !default;
5
5
  $checkbox-unchecked-border-color: $control-border !default;
6
+ $checkbox-invalid-border-color: $danger !default;
6
7
  $checkbox-color: $primary !default;
7
8
  $checkbox-check-color: $primary-invert !default;
8
9
  $checkbox-check-hover-color: $text-subtle !default;
@@ -61,21 +62,17 @@ $checkbox-spacing: $spacer-3 !default;
61
62
  }
62
63
  }
63
64
 
64
- &:hover .checkbox-check::before {
65
- @include checkmark;
65
+ &.checkbox-sm {
66
+ @include control-sm;
66
67
  }
67
68
 
68
- &.checkbox-sm {
69
- font-size: $font-size-8;
69
+ &.checkbox-lg {
70
+ @include control-lg;
70
71
  }
71
72
 
72
73
  input[type='checkbox'] {
73
74
  @include visually-hidden();
74
75
 
75
- &:focus-visible + .checkbox-check {
76
- @extend %focus;
77
- }
78
-
79
76
  &:checked + .checkbox-check {
80
77
  border-color: $checkbox-color;
81
78
  background-color: $checkbox-color;
@@ -87,9 +84,22 @@ $checkbox-spacing: $spacer-3 !default;
87
84
  }
88
85
  }
89
86
 
90
- &[disabled] + .checkbox-check {
91
- opacity: 0.6;
92
- cursor: not-allowed;
87
+ &[disabled] {
88
+ + .checkbox-check {
89
+ border-color: $checkbox-unchecked-border-color;
90
+ opacity: 0.6;
91
+ }
92
+
93
+ + .checkbox-check,
94
+ ~ .checkbox-text {
95
+ cursor: not-allowed;
96
+ }
97
+ }
98
+
99
+ @include focus-visible {
100
+ + .checkbox-check {
101
+ @extend %focus;
102
+ }
93
103
  }
94
104
  }
95
105
 
@@ -116,4 +126,16 @@ $checkbox-spacing: $spacer-3 !default;
116
126
  border-color: $checkbox-check-color;
117
127
  }
118
128
  }
129
+
130
+ &.is-invalid {
131
+ input[type='checkbox']:not(:checked) + .checkbox-check {
132
+ border-color: $checkbox-invalid-border-color;
133
+ }
134
+ }
135
+
136
+ &:hover {
137
+ input[type='checkbox']:not(:checked):not([disabled]) + .checkbox-check::before {
138
+ @include checkmark;
139
+ }
140
+ }
119
141
  }