@primer/css 0.0.0-20220209190837 → 0.0.0-20220211133203
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/CHANGELOG.md +21 -5
- package/actionlist/action-list-item-divider.scss +0 -9
- package/actionlist/action-list-item.scss +121 -135
- package/actionlist/action-list-tree.scss +5 -104
- package/actionlist/action-list.scss +0 -5
- package/base/kbd.scss +0 -1
- package/base/normalize.scss +1 -1
- package/base/typography-base.scss +3 -2
- package/blankslate/blankslate.scss +20 -1
- package/box/box.scss +0 -3
- package/buttons/button.scss +1 -0
- package/dist/actionlist.css +1 -1
- package/dist/actionlist.css.map +1 -1
- package/dist/alerts.css.map +1 -1
- package/dist/autocomplete.css.map +1 -1
- package/dist/avatars.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/blankslate.css +1 -1
- package/dist/blankslate.css.map +1 -1
- package/dist/box.css.map +1 -1
- package/dist/branch-name.css.map +1 -1
- package/dist/breadcrumb.css.map +1 -1
- package/dist/buttons.css.map +1 -1
- package/dist/core.css +1 -1
- package/dist/core.css.map +1 -1
- package/dist/dropdown.css.map +1 -1
- package/dist/forms.css.map +1 -1
- package/dist/header.css.map +1 -1
- package/dist/labels.css +1 -1
- package/dist/labels.css.map +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/links.css.map +1 -1
- package/dist/loaders.css.map +1 -1
- package/dist/markdown.css +1 -1
- package/dist/markdown.css.map +1 -1
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-links.css.map +1 -1
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/meta.json +77 -77
- package/dist/navigation.css.map +1 -1
- package/dist/pagination.css.map +1 -1
- package/dist/popover.css +1 -1
- package/dist/popover.css.map +1 -1
- package/dist/primer.css +2 -2
- package/dist/primer.css.map +1 -1
- package/dist/product.css +1 -1
- package/dist/product.css.map +1 -1
- package/dist/progress.css.map +1 -1
- package/dist/select-menu.css.map +1 -1
- package/dist/stats/actionlist.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/blankslate.json +1 -1
- package/dist/stats/core.json +1 -1
- package/dist/stats/labels.json +1 -1
- package/dist/stats/markdown.json +1 -1
- package/dist/stats/popover.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/dist/stats/product.json +1 -1
- package/dist/subhead.css.map +1 -1
- package/dist/timeline.css.map +1 -1
- package/dist/toasts.css.map +1 -1
- package/dist/tooltips.css.map +1 -1
- package/dist/truncate.css.map +1 -1
- package/dist/utilities.css.map +1 -1
- package/dist/variables.json +7 -7
- package/forms/form-control.scss +1 -0
- package/forms/form-group.scss +1 -0
- package/forms/radio-group.scss +0 -3
- package/labels/mixins.scss +6 -2
- package/layout/grid-offset.scss +1 -0
- package/layout/grid.scss +1 -0
- package/layout/page-layout.scss +0 -5
- package/markdown/code.scss +5 -0
- package/markdown/footnotes.scss +38 -26
- package/markdown/markdown-body.scss +0 -8
- package/marketing/type/typography.scss +3 -0
- package/package.json +14 -14
- package/popover/popover.scss +10 -1
- package/support/mixins/misc.scss +1 -0
- package/timeline/timeline-item.scss +0 -1
- package/utilities/margin.scss +4 -1
- package/utilities/padding.scss +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
# @primer/css
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20220211133203
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fake entry to force publishing
|
|
8
|
+
|
|
9
|
+
* [#1928](https://github.com/primer/css/pull/1928) [`0fb67895`](https://github.com/primer/css/commit/0fb6789555652860cfa5178b60433eb2c3d2575c) Thanks [@simurai](https://github.com/simurai)! - Fix `<sup><a>` from getting wrapped with `[ ]`
|
|
10
|
+
|
|
11
|
+
## 19.3.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#1876](https://github.com/primer/css/pull/1876) [`bcf447ab`](https://github.com/primer/css/commit/bcf447ab226e6043dd47c1fcc395ba104af866d4) Thanks [@vdepizzol](https://github.com/vdepizzol)! - Add mono font stack to <samp> tag
|
|
16
|
+
|
|
17
|
+
* [#1919](https://github.com/primer/css/pull/1919) [`21085f5c`](https://github.com/primer/css/commit/21085f5c6cc538b5014a47de76642554a4291cc6) Thanks [@hectahertz](https://github.com/hectahertz)! - Add blankslate classes to replace utilities
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
6
20
|
|
|
7
21
|
- [#1892](https://github.com/primer/css/pull/1892) [`55bd498b`](https://github.com/primer/css/commit/55bd498b7357e86659ac574f0f745f7b420fb6d3) Thanks [@langermank](https://github.com/langermank)! - Patch: Fix ActionList--divided for label with inline description scenarios
|
|
8
22
|
|
|
9
|
-
*
|
|
23
|
+
* [#1906](https://github.com/primer/css/pull/1906) [`f02d9a3e`](https://github.com/primer/css/commit/f02d9a3e4e86c2659a9f507995bcb90c5226e34e) Thanks [@jonrohan](https://github.com/jonrohan)! - Upgrading @primer/stylelint-config@12.3.0 and fixing violations
|
|
24
|
+
|
|
25
|
+
- [#1908](https://github.com/primer/css/pull/1908) [`84581e96`](https://github.com/primer/css/commit/84581e96aee50ff3883907dfe1069701edd1c24a) Thanks [@simurai](https://github.com/simurai)! - Reduce size of `Label--inline`
|
|
10
26
|
|
|
11
|
-
|
|
27
|
+
* [#1890](https://github.com/primer/css/pull/1890) [`74d0438b`](https://github.com/primer/css/commit/74d0438bd4dbaed447b553c5d3c8b945da282836) Thanks [@andrialexandrou](https://github.com/andrialexandrou)! - Adds --color-accent-emphasis and --color-fg-on-emphasis rules for Windows High Contrast Mode
|
|
12
28
|
|
|
13
|
-
|
|
29
|
+
- [#1882](https://github.com/primer/css/pull/1882) [`4a06aba1`](https://github.com/primer/css/commit/4a06aba1d3f80bcc228ff4360d0e02d5ace158ff) Thanks [@tqwewe](https://github.com/tqwewe)! - Fix layout gutter none styles
|
|
14
30
|
|
|
15
|
-
|
|
31
|
+
* [#1894](https://github.com/primer/css/pull/1894) [`d1adf595`](https://github.com/primer/css/commit/d1adf595308afb97f83c5ca172222944189a5961) Thanks [@simurai](https://github.com/simurai)! - Make `pagination` responsive by default
|
|
16
32
|
|
|
17
33
|
## 19.2.0
|
|
18
34
|
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
// has children
|
|
5
5
|
&:not(:empty) {
|
|
6
6
|
display: flex;
|
|
7
|
-
// stylelint-disable-next-line primer/spacing
|
|
8
7
|
padding: ($spacer-1 * 1.5) $spacer-2;
|
|
9
8
|
font-size: $font-size-small;
|
|
10
9
|
font-weight: $font-weight-bold;
|
|
@@ -14,21 +13,13 @@
|
|
|
14
13
|
|
|
15
14
|
// no children
|
|
16
15
|
&:empty {
|
|
17
|
-
display: block;
|
|
18
16
|
height: 1px;
|
|
19
17
|
padding: 0;
|
|
20
|
-
// stylelint-disable-next-line primer/spacing
|
|
21
18
|
margin: ($spacer-2 - 1px) ($spacer-2 * -1) $spacer-2;
|
|
22
19
|
list-style: none;
|
|
23
20
|
background: var(--color-action-list-item-inline-divider);
|
|
24
21
|
border: 0;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
.ActionList-sectionDivider-title {
|
|
28
|
-
font-size: $font-size-small;
|
|
29
|
-
font-weight: $font-weight-bold;
|
|
30
|
-
color: var(--color-fg-muted);
|
|
31
|
-
}
|
|
32
23
|
}
|
|
33
24
|
|
|
34
25
|
.ActionList-sectionDivider--filled {
|
|
@@ -24,10 +24,17 @@
|
|
|
24
24
|
list-style: none;
|
|
25
25
|
background-color: transparent;
|
|
26
26
|
border-radius: $border-radius;
|
|
27
|
+
touch-action: manipulation;
|
|
28
|
+
-webkit-tap-highlight-color: transparent;
|
|
27
29
|
|
|
28
30
|
&:hover,
|
|
29
31
|
&:active {
|
|
30
32
|
cursor: pointer;
|
|
33
|
+
|
|
34
|
+
// a href
|
|
35
|
+
.ActionList-content {
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
}
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
// only hover li without list as children
|
|
@@ -150,6 +157,98 @@
|
|
|
150
157
|
}
|
|
151
158
|
}
|
|
152
159
|
|
|
160
|
+
// collapsible item [aria-expanded]
|
|
161
|
+
|
|
162
|
+
// nesting (single level)
|
|
163
|
+
// target items inside expanded subgroups
|
|
164
|
+
&[aria-expanded] {
|
|
165
|
+
.ActionList--subGroup {
|
|
166
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
167
|
+
transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.ActionList-content {
|
|
171
|
+
padding-left: $spacer-4;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// has 16px leading visual
|
|
176
|
+
.ActionList-content--visual16 + .ActionList--subGroup {
|
|
177
|
+
.ActionList-content {
|
|
178
|
+
padding-left: $spacer-5;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// has 20px leading visual
|
|
183
|
+
.ActionList-content--visual20 + .ActionList--subGroup {
|
|
184
|
+
.ActionList-content {
|
|
185
|
+
padding-left: $spacer-2 * 4.5; // 36px
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// has 24px leading visual
|
|
190
|
+
.ActionList-content--visual24 + .ActionList--subGroup {
|
|
191
|
+
.ActionList-content {
|
|
192
|
+
padding-left: $spacer-6;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&[aria-expanded='true'] {
|
|
198
|
+
.ActionList-item-collapseIcon {
|
|
199
|
+
transition: transform 120ms linear;
|
|
200
|
+
transform: scaleY(-1);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.ActionList--subGroup {
|
|
204
|
+
height: auto;
|
|
205
|
+
overflow: visible;
|
|
206
|
+
visibility: visible;
|
|
207
|
+
opacity: 1;
|
|
208
|
+
transform: translateY(0);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&.ActionList-item--hasActiveSubItem {
|
|
212
|
+
> .ActionList-content > .ActionList-item-label {
|
|
213
|
+
font-weight: $font-weight-bold;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&[aria-expanded='false'] {
|
|
219
|
+
.ActionList-item-collapseIcon {
|
|
220
|
+
transition: transform 120ms linear;
|
|
221
|
+
transform: scaleY(1);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.ActionList--subGroup {
|
|
225
|
+
height: 0;
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
visibility: hidden;
|
|
228
|
+
opacity: 0;
|
|
229
|
+
transform: translateY(-$spacer-3);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// show active indicator on parent collapse if child is active
|
|
233
|
+
&.ActionList-item--hasActiveSubItem {
|
|
234
|
+
background: var(--color-action-list-item-default-selected-bg);
|
|
235
|
+
|
|
236
|
+
.ActionList-item-label {
|
|
237
|
+
font-weight: $font-weight-bold;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&::before,
|
|
241
|
+
+ .ActionList-item::before {
|
|
242
|
+
visibility: hidden;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// blue accent line
|
|
246
|
+
&::after {
|
|
247
|
+
@include activeIndicatorLine;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
153
252
|
// checkbox item [aria-checked]
|
|
154
253
|
// listbox [aria-selected]
|
|
155
254
|
|
|
@@ -264,40 +363,48 @@
|
|
|
264
363
|
}
|
|
265
364
|
}
|
|
266
365
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
366
|
+
&:active {
|
|
367
|
+
background: var(--color-action-list-item-danger-active-bg);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// disabled
|
|
372
|
+
&[aria-disabled='true'] {
|
|
373
|
+
.ActionList-item-label,
|
|
374
|
+
.ActionList-item-description {
|
|
375
|
+
color: var(--color-primer-fg-disabled);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.ActionList-item-visual {
|
|
379
|
+
fill: var(--color-primer-fg-disabled);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
@media (hover: hover) {
|
|
383
|
+
&:hover {
|
|
384
|
+
cursor: not-allowed;
|
|
385
|
+
background-color: transparent;
|
|
270
386
|
}
|
|
271
387
|
}
|
|
272
388
|
}
|
|
273
389
|
|
|
274
390
|
// if nested list exists, remove default padding
|
|
275
391
|
.ActionList {
|
|
276
|
-
// stylelint-disable-next-line primer/spacing
|
|
277
392
|
padding: unset;
|
|
278
393
|
}
|
|
279
394
|
}
|
|
280
395
|
|
|
281
|
-
//
|
|
396
|
+
// span or a href
|
|
282
397
|
.ActionList-content {
|
|
283
398
|
position: relative;
|
|
284
399
|
display: grid;
|
|
285
|
-
width: 100%;
|
|
286
|
-
// stylelint-disable-next-line primer/spacing
|
|
287
400
|
padding: $actionList-item-padding-vertical $actionList-item-padding-horizontal;
|
|
288
401
|
font-size: $body-font-size;
|
|
289
402
|
font-weight: $font-weight-normal;
|
|
290
403
|
color: var(--color-fg-default);
|
|
291
|
-
text-align: left;
|
|
292
404
|
user-select: none;
|
|
293
|
-
|
|
294
|
-
// stylelint-disable-next-line declaration-property-value-disallowed-list
|
|
295
|
-
border: none;
|
|
405
|
+
touch-action: manipulation;
|
|
296
406
|
border-radius: $border-radius;
|
|
297
407
|
transition: $actionList-item-bg-transition;
|
|
298
|
-
touch-action: manipulation;
|
|
299
|
-
touch-action: manipulation;
|
|
300
|
-
-webkit-tap-highlight-color: transparent;
|
|
301
408
|
grid-template-rows: min-content;
|
|
302
409
|
grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
|
|
303
410
|
grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;
|
|
@@ -308,138 +415,19 @@
|
|
|
308
415
|
margin-right: $spacer-2;
|
|
309
416
|
}
|
|
310
417
|
|
|
311
|
-
// state
|
|
312
|
-
|
|
313
|
-
&:hover {
|
|
314
|
-
text-decoration: none;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
418
|
&:focus-visible {
|
|
318
419
|
@include focusOutline;
|
|
319
420
|
}
|
|
320
421
|
|
|
321
|
-
// disabled
|
|
322
|
-
&[aria-disabled='true'] {
|
|
323
|
-
.ActionList-item-label,
|
|
324
|
-
.ActionList-item-description {
|
|
325
|
-
color: var(--color-primer-fg-disabled);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.ActionList-item-visual {
|
|
329
|
-
fill: var(--color-primer-fg-disabled);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
@media (hover: hover) {
|
|
333
|
-
&:hover {
|
|
334
|
-
cursor: not-allowed;
|
|
335
|
-
background-color: transparent;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
// collapsible item [aria-expanded]
|
|
341
|
-
|
|
342
|
-
// nesting (single level)
|
|
343
|
-
// target items inside expanded subgroups
|
|
344
|
-
&[aria-expanded] {
|
|
345
|
-
+ .ActionList--subGroup {
|
|
346
|
-
@media screen and (prefers-reduced-motion: no-preference) {
|
|
347
|
-
transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.ActionList-content {
|
|
351
|
-
padding-left: $spacer-4;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
// has 16px leading visual
|
|
356
|
-
&.ActionList-content--visual16 + .ActionList--subGroup {
|
|
357
|
-
.ActionList-content {
|
|
358
|
-
padding-left: $spacer-5;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
// has 20px leading visual
|
|
363
|
-
&.ActionList-content--visual20 + .ActionList--subGroup {
|
|
364
|
-
.ActionList-content {
|
|
365
|
-
padding-left: $spacer-2 * 4.5; // 36px
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
// has 24px leading visual
|
|
370
|
-
&.ActionList-content--visual24 + .ActionList--subGroup {
|
|
371
|
-
.ActionList-content {
|
|
372
|
-
padding-left: $spacer-6;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
&[aria-expanded='true'] {
|
|
378
|
-
.ActionList-item-collapseIcon {
|
|
379
|
-
transition: transform 120ms linear;
|
|
380
|
-
transform: scaleY(-1);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
+ .ActionList--subGroup {
|
|
384
|
-
height: auto;
|
|
385
|
-
overflow: visible;
|
|
386
|
-
visibility: visible;
|
|
387
|
-
opacity: 1;
|
|
388
|
-
transform: translateY(0);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
&.ActionList-content--hasActiveSubItem {
|
|
392
|
-
> .ActionList-item-label {
|
|
393
|
-
font-weight: $font-weight-bold;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
&[aria-expanded='false'] {
|
|
399
|
-
.ActionList-item-collapseIcon {
|
|
400
|
-
transition: transform 120ms linear;
|
|
401
|
-
transform: scaleY(1);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
+ .ActionList--subGroup {
|
|
405
|
-
height: 0;
|
|
406
|
-
overflow: hidden;
|
|
407
|
-
visibility: hidden;
|
|
408
|
-
opacity: 0;
|
|
409
|
-
transform: translateY(-$spacer-3);
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
// show active indicator on parent collapse if child is active
|
|
413
|
-
&.ActionList-content--hasActiveSubItem {
|
|
414
|
-
background: var(--color-action-list-item-default-selected-bg);
|
|
415
|
-
|
|
416
|
-
.ActionList-item-label {
|
|
417
|
-
font-weight: $font-weight-bold;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
&::before,
|
|
421
|
-
+ .ActionList-item::before {
|
|
422
|
-
visibility: hidden;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
// blue accent line
|
|
426
|
-
&::after {
|
|
427
|
-
@include activeIndicatorLine;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
422
|
// sizes
|
|
433
423
|
|
|
434
424
|
&.ActionList-content--sizeMedium {
|
|
435
425
|
// 44px total height
|
|
436
|
-
// stylelint-disable-next-line primer/spacing
|
|
437
426
|
padding: $actionList-item-padding-vertical-md $actionList-item-padding-horizontal;
|
|
438
427
|
}
|
|
439
428
|
|
|
440
429
|
&.ActionList-content--sizeLarge {
|
|
441
430
|
// 48px total height
|
|
442
|
-
// stylelint-disable-next-line primer/spacing
|
|
443
431
|
padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
|
|
444
432
|
}
|
|
445
433
|
|
|
@@ -449,7 +437,6 @@
|
|
|
449
437
|
|
|
450
438
|
// On pointer:coarse (mobile), all list items are large
|
|
451
439
|
@media (pointer: coarse) {
|
|
452
|
-
// stylelint-disable-next-line primer/spacing
|
|
453
440
|
padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
|
|
454
441
|
}
|
|
455
442
|
|
|
@@ -506,7 +493,6 @@
|
|
|
506
493
|
align-items: baseline;
|
|
507
494
|
|
|
508
495
|
.ActionList-item-description {
|
|
509
|
-
// stylelint-disable-next-line primer/spacing
|
|
510
496
|
margin-left: $actionList-item-padding-horizontal;
|
|
511
497
|
}
|
|
512
498
|
}
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
// stylelint-disable max-nesting-depth, selector-max-compound-selectors, selector-max-specificity, no-duplicate-selectors, selector-max-type
|
|
2
1
|
// tree-view variant
|
|
3
2
|
// renders ActionList with default styling for tree-view
|
|
4
3
|
// collapse/expand icons presents as leadingActions, rotate 90deg
|
|
5
4
|
// connecting vertical lines between collapse groups
|
|
6
5
|
// consistent font-size between nested groups
|
|
7
6
|
|
|
8
|
-
@mixin activeIndicatorLine {
|
|
9
|
-
position: absolute;
|
|
10
|
-
top: calc(50% - 12px);
|
|
11
|
-
left: -$actionList-item-padding-horizontal;
|
|
12
|
-
width: $spacer-1;
|
|
13
|
-
height: $spacer-4;
|
|
14
|
-
content: '';
|
|
15
|
-
background: var(--color-accent-fg);
|
|
16
|
-
border-radius: $border-radius;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
7
|
@mixin treeConnectingLine($left) {
|
|
20
8
|
position: absolute;
|
|
21
9
|
left: $left;
|
|
@@ -33,97 +21,6 @@
|
|
|
33
21
|
}
|
|
34
22
|
|
|
35
23
|
.ActionList-item {
|
|
36
|
-
// start: copy from ActionList proper- backwards compatible for treeview with different markup structure
|
|
37
|
-
&[aria-expanded] {
|
|
38
|
-
.ActionList--subGroup {
|
|
39
|
-
@media screen and (prefers-reduced-motion: no-preference) {
|
|
40
|
-
transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ActionList-content {
|
|
44
|
-
padding-left: $spacer-4;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// has 16px leading visual
|
|
49
|
-
.ActionList-content--visual16 + .ActionList--subGroup {
|
|
50
|
-
.ActionList-content {
|
|
51
|
-
padding-left: $spacer-5;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// has 20px leading visual
|
|
56
|
-
.ActionList-content--visual20 + .ActionList--subGroup {
|
|
57
|
-
.ActionList-content {
|
|
58
|
-
padding-left: $spacer-2 * 4.5; // 36px
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// has 24px leading visual
|
|
63
|
-
.ActionList-content--visual24 + .ActionList--subGroup {
|
|
64
|
-
.ActionList-content {
|
|
65
|
-
padding-left: $spacer-6;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&[aria-expanded='true'] {
|
|
71
|
-
.ActionList-item-collapseIcon {
|
|
72
|
-
transition: transform 120ms linear;
|
|
73
|
-
transform: scaleY(-1);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.ActionList--subGroup {
|
|
77
|
-
height: auto;
|
|
78
|
-
overflow: visible;
|
|
79
|
-
visibility: visible;
|
|
80
|
-
opacity: 1;
|
|
81
|
-
transform: translateY(0);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&.ActionList-item--hasActiveSubItem {
|
|
85
|
-
> .ActionList-content > .ActionList-item-label {
|
|
86
|
-
font-weight: $font-weight-bold;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&[aria-expanded='false'] {
|
|
92
|
-
.ActionList-item-collapseIcon {
|
|
93
|
-
transition: transform 120ms linear;
|
|
94
|
-
transform: scaleY(1);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.ActionList--subGroup {
|
|
98
|
-
height: 0;
|
|
99
|
-
overflow: hidden;
|
|
100
|
-
visibility: hidden;
|
|
101
|
-
opacity: 0;
|
|
102
|
-
transform: translateY(-$spacer-3);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// show active indicator on parent collapse if child is active
|
|
106
|
-
// this class has changed in non tree ActionList. Leaving for now until we hear about their a11y audit (if markup needs to change)
|
|
107
|
-
&.ActionList-item--hasActiveSubItem {
|
|
108
|
-
background: var(--color-action-list-item-default-selected-bg);
|
|
109
|
-
|
|
110
|
-
.ActionList-item-label {
|
|
111
|
-
font-weight: $font-weight-bold;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
&::before,
|
|
115
|
-
+ .ActionList-item::before {
|
|
116
|
-
visibility: hidden;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// blue accent line
|
|
120
|
-
&::after {
|
|
121
|
-
@include activeIndicatorLine;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
// end copy
|
|
126
|
-
|
|
127
24
|
// nesting (infinate levels)
|
|
128
25
|
// target items inside expanded subgroup
|
|
129
26
|
&[aria-expanded] {
|
|
@@ -131,8 +28,8 @@
|
|
|
131
28
|
position: relative;
|
|
132
29
|
|
|
133
30
|
// --ActionList-tree-depth is defined as an inline style referencing the aria-level of each item ie: aria-level="2"
|
|
31
|
+
// stylelint-disable-next-line selector-max-specificity, max-nesting-depth, selector-max-compound-selectors
|
|
134
32
|
.ActionList-content {
|
|
135
|
-
// stylelint-disable-next-line primer/spacing
|
|
136
33
|
padding-left: calc(#{$spacer-2} * var(--ActionList-tree-depth));
|
|
137
34
|
}
|
|
138
35
|
}
|
|
@@ -157,9 +54,11 @@
|
|
|
157
54
|
// expand/collapse group
|
|
158
55
|
.ActionList-item--hasSubItem {
|
|
159
56
|
.ActionList-item--subItem:not(.ActionList-item--hasSubItem) {
|
|
57
|
+
// stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors
|
|
160
58
|
.ActionList-content {
|
|
161
59
|
// increase child padding by targeting content first child span (add to ActionList-content padding, not replace)
|
|
162
60
|
// creates a slight indent of child items
|
|
61
|
+
// stylelint-disable-next-line selector-max-specificity, selector-max-type, max-nesting-depth, selector-max-compound-selectors
|
|
163
62
|
> span:first-child {
|
|
164
63
|
padding-left: $spacer-4;
|
|
165
64
|
}
|
|
@@ -170,6 +69,7 @@
|
|
|
170
69
|
// first subitem
|
|
171
70
|
> [aria-level='1'].ActionList-item--hasSubItem {
|
|
172
71
|
> .ActionList--subGroup {
|
|
72
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
173
73
|
&::before {
|
|
174
74
|
@include treeConnectingLine($left: $spacer-3);
|
|
175
75
|
}
|
|
@@ -180,6 +80,7 @@
|
|
|
180
80
|
// center connecting line with parent (line is 1px (8px - 1px)
|
|
181
81
|
.ActionList-item--hasSubItem:not([aria-level='1']) {
|
|
182
82
|
> .ActionList--subGroup {
|
|
83
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
183
84
|
&::before {
|
|
184
85
|
@include treeConnectingLine(
|
|
185
86
|
$left: calc(#{$spacer-2} * (var(--ActionList-tree-depth)) + #{$spacer-2 - $border-width})
|
package/base/kbd.scss
CHANGED
package/base/normalize.scss
CHANGED
|
@@ -30,12 +30,31 @@
|
|
|
30
30
|
color: var(--color-fg-muted);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
.blankslate-image {
|
|
34
|
+
margin-bottom: $spacer-3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.blankslate-heading {
|
|
38
|
+
margin-bottom: $spacer-1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.blankslate-action {
|
|
42
|
+
margin-top: $spacer-3;
|
|
43
|
+
|
|
44
|
+
&:first-of-type {
|
|
45
|
+
margin-top: $spacer-4;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:last-of-type {
|
|
49
|
+
margin-bottom: $spacer-2;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
33
53
|
.blankslate-capped {
|
|
34
54
|
border-radius: 0 0 $border-radius $border-radius;
|
|
35
55
|
}
|
|
36
56
|
|
|
37
57
|
.blankslate-spacious {
|
|
38
|
-
// stylelint-disable-next-line primer/spacing
|
|
39
58
|
padding: ($spacer-6 * 2) $spacer-6;
|
|
40
59
|
}
|
|
41
60
|
|
package/box/box.scss
CHANGED
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
.Box-btn-octicon {
|
|
29
29
|
&.btn-octicon {
|
|
30
30
|
padding: $spacer-2 $spacer-3;
|
|
31
|
-
// stylelint-disable-next-line primer/spacing
|
|
32
31
|
margin: (-$spacer-2) (-$spacer-3);
|
|
33
32
|
line-height: $lh-condensed;
|
|
34
33
|
}
|
|
@@ -60,7 +59,6 @@
|
|
|
60
59
|
.Box-btn-octicon {
|
|
61
60
|
&.btn-octicon {
|
|
62
61
|
padding: $spacer-4;
|
|
63
|
-
// stylelint-disable-next-line primer/spacing
|
|
64
62
|
margin: (-$spacer-4) (-$spacer-4);
|
|
65
63
|
}
|
|
66
64
|
}
|
|
@@ -285,7 +283,6 @@
|
|
|
285
283
|
// Increase specificity when btn-octicon is used because comes after .Box in the cascade
|
|
286
284
|
&.btn-octicon {
|
|
287
285
|
padding: $spacer-3 $spacer-3;
|
|
288
|
-
// stylelint-disable-next-line primer/spacing
|
|
289
286
|
margin: (-$spacer-3) (-$spacer-3);
|
|
290
287
|
line-height: $lh-default; // override btn-octicon line-height
|
|
291
288
|
}
|
package/buttons/button.scss
CHANGED
|
@@ -294,6 +294,7 @@
|
|
|
294
294
|
|
|
295
295
|
// Large button adds more padding around text. Use font-size utils to increase font-size.. e.g, <p class="text-gamma"><button class="btn btn-large btn-primary" type="button">Big green button</button></p>
|
|
296
296
|
.btn-large {
|
|
297
|
+
// stylelint-disable-next-line primer/spacing
|
|
297
298
|
padding: $em-spacer-6 1.5em;
|
|
298
299
|
font-size: inherit;
|
|
299
300
|
line-height: $lh-default;
|