@microsoft/atlas-css 3.47.1 → 3.48.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.47.1",
3
+ "version": "3.48.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",
@@ -21,6 +21,7 @@
21
21
  @import './pagination.scss';
22
22
  @import './progress-bar.scss';
23
23
  @import './table.scss';
24
+ @import './tag.scss';
24
25
  @import './toggle.scss';
25
26
  @import './scroll.scss';
26
27
  @import './site-header.scss';
@@ -39,4 +39,11 @@ $popover-width: 224px !default;
39
39
  inset-inline-start: -25%;
40
40
  }
41
41
  }
42
+
43
+ &.popover-top {
44
+ .popover-content {
45
+ inset-block-end: 100%;
46
+ margin-block-end: $spacer-3;
47
+ }
48
+ }
42
49
  }
@@ -0,0 +1,205 @@
1
+ /* stylelint-disable selector-max-specificity, no-descending-specificity */
2
+
3
+ $tag-padding-block: 0.375em !default;
4
+ $tag-padding-inline: 0.675em !default;
5
+
6
+ $tag-gap-size: 0.375em !default;
7
+
8
+ $tag-font-size: $font-size-8 !default;
9
+ $tag-font-size-sm: $font-size-9 !default;
10
+ $tag-font-size-lg: $font-size-7 !default;
11
+ $tag-font-weight: $weight-normal !default;
12
+
13
+ $tag-icon-font-size: 0.875em !default;
14
+
15
+ $tag-border-width: $border-width !default;
16
+ $tag-border-radius: $border-radius !default;
17
+ $tag-border-radius-rounded: $border-radius-rounded !default;
18
+ $tag-border-color: $secondary !default;
19
+
20
+ $tag-color: $secondary-dark !default;
21
+ $tag-color-hover: $primary-dark !default;
22
+ $tag-background-color: $body-background !default;
23
+ $tag-background-hover: $secondary-background-glow-high-contrast !default;
24
+
25
+ $tag-color-filled: $text !default;
26
+ $tag-background-filled: $secondary-background-glow-high-contrast !default;
27
+ $tag-color-filled-hover: $primary-hover !default;
28
+ $tag-background-filled-hover: $secondary !default;
29
+ $tag-interactive-divider-color-filled: $secondary-box-shadow !default;
30
+ $tag-interactive-color-filled-hover: $secondary-invert !default;
31
+
32
+ $tag-color-primary: $primary-dark !default;
33
+ $tag-color-primary-hover: $primary-hover !default;
34
+ $tag-background-primary: $primary-background !default;
35
+ $tag-background-primary-hover: $primary-hover !default;
36
+ $tag-border-color-primary: $primary-background-glow-high-contrast !default;
37
+ $tag-interactive-divider-color-primary: $primary-box-shadow !default;
38
+ $tag-interactive-color-primary-hover: $primary-invert !default;
39
+
40
+ .tag {
41
+ display: inline-flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ padding: $tag-padding-block $tag-padding-inline;
45
+ border: $tag-border-width solid $tag-border-color;
46
+ border-radius: $tag-border-radius;
47
+ background-color: $tag-background-color;
48
+ color: $tag-color;
49
+ font-size: $tag-font-size;
50
+ font-weight: $tag-font-weight;
51
+ line-height: $line-height-normal;
52
+ white-space: nowrap;
53
+ gap: $tag-gap-size;
54
+
55
+ &:where(button) {
56
+ cursor: pointer;
57
+ }
58
+
59
+ .tag-close {
60
+ display: inline-flex;
61
+ align-items: center;
62
+ justify-content: center;
63
+ }
64
+
65
+ &:hover,
66
+ &.is-hovered {
67
+ .tag-close {
68
+ color: $tag-color-hover;
69
+ }
70
+ }
71
+
72
+ .icon {
73
+ font-size: $tag-icon-font-size;
74
+ }
75
+
76
+ // Sizes
77
+
78
+ &.tag-sm {
79
+ font-size: $tag-font-size-sm;
80
+ }
81
+
82
+ &.tag-lg {
83
+ font-size: $tag-font-size-lg;
84
+ }
85
+
86
+ // Interactive tag
87
+
88
+ &.tag-interactive {
89
+ align-items: stretch;
90
+ padding: 0;
91
+ border: none;
92
+ color: $text;
93
+ gap: 0;
94
+
95
+ .tag-popover {
96
+ .tag-summary {
97
+ padding: $tag-padding-block $tag-padding-inline;
98
+ border: $tag-border-width solid $tag-border-color;
99
+ border-radius: $tag-border-radius;
100
+ outline-color: currentColor;
101
+ outline-offset: -$focus-width;
102
+ cursor: pointer;
103
+ overflow: hidden;
104
+
105
+ /* stylelint-disable-next-line max-nesting-depth, rule-empty-line-before */
106
+ &:hover,
107
+ &.is-hovered {
108
+ background-color: $tag-background-hover;
109
+ }
110
+ }
111
+
112
+ &:not(:only-child) .tag-summary {
113
+ border-start-end-radius: 0;
114
+ border-end-end-radius: 0;
115
+ border-inline-end: 0;
116
+ }
117
+ }
118
+
119
+ .tag-close {
120
+ padding: $tag-padding-block $tag-padding-inline;
121
+ border: 0;
122
+ border: $tag-border-width solid $tag-border-color;
123
+ border-radius: 0 $tag-border-radius $tag-border-radius 0;
124
+ outline-color: currentColor;
125
+ outline-offset: -$focus-width;
126
+ background-color: inherit;
127
+ color: inherit;
128
+ cursor: pointer;
129
+
130
+ &:hover,
131
+ &.is-hovered {
132
+ background-color: $tag-background-hover;
133
+ color: $tag-color-hover;
134
+ }
135
+ }
136
+ }
137
+ }
138
+
139
+ // Colors
140
+
141
+ .tag.tag-primary {
142
+ border-color: $tag-border-color-primary;
143
+ background-color: $tag-background-primary;
144
+ color: $tag-color-primary;
145
+
146
+ &:hover,
147
+ &.is-hovered {
148
+ .tag-close {
149
+ color: $tag-color-primary-hover;
150
+ }
151
+ }
152
+
153
+ &.tag-interactive {
154
+ .tag-popover .tag-summary,
155
+ .tag-close {
156
+ border-color: $tag-border-color-primary;
157
+ background-color: $tag-background-primary;
158
+ color: $tag-color-primary;
159
+
160
+ &:hover,
161
+ &.is-hovered {
162
+ border-color: $tag-background-primary-hover;
163
+ background-color: $tag-background-primary-hover;
164
+ color: $tag-interactive-color-primary-hover;
165
+ }
166
+ }
167
+
168
+ .tag-close {
169
+ border-inline-start-color: $tag-interactive-divider-color-primary;
170
+ }
171
+ }
172
+ }
173
+
174
+ .tag.tag-filled {
175
+ border-color: $tag-background-filled;
176
+ background-color: $tag-background-filled;
177
+ color: $tag-color-filled;
178
+
179
+ &:hover,
180
+ &.is-hovered {
181
+ .tag-close {
182
+ color: $tag-color-filled-hover;
183
+ }
184
+ }
185
+
186
+ &.tag-interactive {
187
+ .tag-popover .tag-summary,
188
+ .tag-close {
189
+ border-color: $tag-background-filled;
190
+ background-color: $tag-background-filled;
191
+ color: $tag-color-filled;
192
+
193
+ &:hover,
194
+ &.is-hovered {
195
+ border-color: $tag-background-filled-hover;
196
+ background-color: $tag-background-filled-hover;
197
+ color: $tag-interactive-color-filled-hover;
198
+ }
199
+ }
200
+
201
+ .tag-close {
202
+ border-inline-start-color: $tag-interactive-divider-color-filled;
203
+ }
204
+ }
205
+ }