@microsoft/atlas-css 3.11.0 → 3.12.2

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.11.0",
3
+ "version": "3.12.2",
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",
@@ -36,6 +36,7 @@ $checkbox-spacing: $spacer-3 !default;
36
36
 
37
37
  .checkbox-check {
38
38
  display: flex;
39
+ position: relative;
39
40
  flex-shrink: 0;
40
41
  align-items: center;
41
42
  justify-content: center;
@@ -3,3 +3,4 @@
3
3
  @import './checkbox.scss';
4
4
  @import './input.scss';
5
5
  @import './textarea.scss';
6
+ @import './select.scss';
@@ -40,8 +40,12 @@ $input-focus-box-shadow-size: 0 0 0 0.125rem !default;
40
40
  }
41
41
 
42
42
  @include focus-visible {
43
+ @extend %focus;
44
+
43
45
  border-color: $input-focus-border-color;
44
- outline: none !important;
46
+ outline-color: transparent;
47
+ outline-offset: 0;
48
+ outline-style: solid;
45
49
  box-shadow: $input-focus-box-shadow-size $input-focus-border-color;
46
50
  }
47
51
 
@@ -57,7 +61,6 @@ $input-focus-box-shadow-size: 0 0 0 0.125rem !default;
57
61
  border-color: $input-danger-border-color;
58
62
 
59
63
  @include focus-visible() {
60
- outline: none !important;
61
64
  box-shadow: $input-focus-box-shadow-size $input-danger-border-color;
62
65
  }
63
66
  }
@@ -66,7 +69,6 @@ $input-focus-box-shadow-size: 0 0 0 0.125rem !default;
66
69
  border-color: $input-success-border-color;
67
70
 
68
71
  @include focus-visible() {
69
- outline: none !important;
70
72
  box-shadow: $input-focus-box-shadow-size $input-success-border-color;
71
73
  }
72
74
  }
@@ -0,0 +1,123 @@
1
+ /* stylelint-disable selector-no-qualifying-type */
2
+
3
+ $select-color: $text !default;
4
+ $select-background-color: $body-background !default;
5
+ $select-border-color: $text !default;
6
+ $select-placeholder-color: $text-subtle !default;
7
+
8
+ $select-hover-color: $text !default;
9
+ $select-hover-border-color: $primary !default;
10
+ $select-focus-border-color: $primary !default;
11
+
12
+ $select-disabled-color: $text-subtle !default;
13
+ $select-disabled-background-color: $body-background-medium !default;
14
+ $select-disabled-border-color: $table-border-dark !default;
15
+
16
+ $select-danger-border-color: $danger !default;
17
+ $select-success-border-color: $success !default;
18
+
19
+ $select-focus-box-shadow-size: 0 0 0 0.125rem !default;
20
+
21
+ $select-arrow-size: 0.525em !default;
22
+ $select-arrow-border-width: 1px !default;
23
+ $select-arrow-actual-width: 0.75em !default;
24
+
25
+ .select {
26
+ position: relative;
27
+ font-size: $control-font-size;
28
+
29
+ select {
30
+ @include control;
31
+
32
+ width: 100%;
33
+ max-width: 100%;
34
+ border-color: $select-border-color;
35
+ background-color: $select-background-color;
36
+ color: $select-color;
37
+ cursor: pointer;
38
+
39
+ &[multiple] {
40
+ padding: 0;
41
+ overflow-y: auto;
42
+
43
+ option {
44
+ padding: $control-padding-vertical $control-padding-horizontal;
45
+ }
46
+ }
47
+
48
+ &[disabled] {
49
+ border-color: $select-disabled-border-color;
50
+ background-color: $select-disabled-background-color;
51
+ color: $select-disabled-color;
52
+ }
53
+
54
+ @include focus-visible {
55
+ @extend %focus;
56
+
57
+ border-color: $select-focus-border-color;
58
+ outline-color: transparent;
59
+ outline-offset: 0;
60
+ outline-style: solid;
61
+ box-shadow: $select-focus-box-shadow-size $select-focus-border-color;
62
+ }
63
+ }
64
+
65
+ &:not(.select-multiple) {
66
+ select {
67
+ padding-inline-end: calc($control-padding-horizontal + $select-arrow-actual-width);
68
+ }
69
+
70
+ &::after {
71
+ display: block;
72
+ position: absolute;
73
+ top: calc(50% - $select-arrow-actual-width / 2);
74
+ width: $select-arrow-size;
75
+ height: $select-arrow-size;
76
+ transform: rotate(-45deg);
77
+ transform-origin: center;
78
+ border: $select-arrow-border-width solid $select-color;
79
+ border-top: 0;
80
+ border-right: 0;
81
+ pointer-events: none;
82
+ content: ' ';
83
+ z-index: $zindex-active;
84
+ inset-inline-end: $control-padding-horizontal;
85
+ }
86
+
87
+ &.select-disabled::after {
88
+ border-color: $select-disabled-border-color;
89
+ }
90
+ }
91
+
92
+ &.select-sm {
93
+ font-size: $control-sm-font-size;
94
+
95
+ select {
96
+ @include control-sm;
97
+ }
98
+ }
99
+
100
+ &.select-lg {
101
+ font-size: $control-lg-font-size;
102
+
103
+ select {
104
+ @include control-lg;
105
+ }
106
+ }
107
+
108
+ &.select-danger select {
109
+ border-color: $select-danger-border-color;
110
+
111
+ @include focus-visible() {
112
+ box-shadow: $select-focus-box-shadow-size $select-danger-border-color;
113
+ }
114
+ }
115
+
116
+ &.select-success select {
117
+ border-color: $select-success-border-color;
118
+
119
+ @include focus-visible() {
120
+ box-shadow: $select-focus-box-shadow-size $select-success-border-color;
121
+ }
122
+ }
123
+ }
@@ -51,8 +51,12 @@ $textarea-focus-box-shadow-size: 0 0 0 0.125rem !default;
51
51
  }
52
52
 
53
53
  @include focus-visible {
54
+ @extend %focus;
55
+
54
56
  border-color: $textarea-focus-border-color;
55
- outline: none !important;
57
+ outline-color: transparent;
58
+ outline-offset: 0;
59
+ outline-style: solid;
56
60
  box-shadow: $textarea-focus-box-shadow-size $textarea-focus-border-color;
57
61
  }
58
62
 
@@ -64,15 +68,14 @@ $textarea-focus-box-shadow-size: 0 0 0 0.125rem !default;
64
68
  border-color: $textarea-danger-border-color;
65
69
 
66
70
  @include focus-visible() {
67
- outline: none !important;
68
71
  box-shadow: $textarea-focus-box-shadow-size $textarea-danger-border-color;
69
72
  }
70
73
  }
71
74
 
72
75
  &.textarea-success {
73
76
  border-color: $textarea-success-border-color;
77
+
74
78
  @include focus-visible() {
75
- outline: none !important;
76
79
  box-shadow: $textarea-focus-box-shadow-size $textarea-success-border-color;
77
80
  }
78
81
  }