@primer/css 20.0.0-rc.b5fee637 → 20.0.0-rc.f7fbc78b
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 +165 -4
- package/CONTRIBUTING.md +6 -4
- package/DEVELOP.md +26 -21
- package/README.md +2 -2
- package/actionlist/action-list-item-divider.scss +8 -2
- package/actionlist/action-list-item.scss +214 -130
- package/actionlist/action-list-tree.scss +118 -0
- package/actionlist/action-list.scss +29 -0
- package/actionlist/index.scss +1 -0
- package/alerts/flash.scss +6 -2
- package/autocomplete/autocomplete.scss +51 -2
- package/avatars/avatar-stack.scss +1 -0
- package/base/base.scss +64 -3
- package/base/index.scss +0 -1
- package/base/kbd.scss +0 -1
- package/base/normalize.scss +13 -53
- package/base/typography-base.scss +3 -2
- package/blankslate/blankslate.scss +20 -1
- package/blankslate/index.scss +0 -1
- package/box/box-overlay.scss +2 -0
- package/box/box.scss +0 -3
- package/branch-name/branch-name.scss +1 -0
- package/breadcrumb/breadcrumb.scss +1 -1
- package/buttons/button-group.scss +3 -2
- package/buttons/button.scss +64 -36
- package/buttons/misc.scss +30 -25
- package/color-modes/index.scss +2 -0
- package/color-modes/native.scss +12 -0
- package/color-modes/themes/dark.scss +0 -1
- package/color-modes/themes/dark_colorblind.scss +0 -1
- package/color-modes/themes/dark_dimmed.scss +0 -1
- package/color-modes/themes/dark_high_contrast.scss +0 -1
- package/color-modes/themes/dark_tritanopia.scss +6 -0
- package/color-modes/themes/light.scss +0 -1
- package/color-modes/themes/light_colorblind.scss +0 -1
- package/color-modes/themes/light_high_contrast.scss +0 -1
- package/color-modes/themes/light_tritanopia.scss +6 -0
- package/dist/actionlist.css +1 -1
- package/dist/actionlist.css.map +1 -1
- package/dist/alerts.css +1 -1
- package/dist/alerts.css.map +1 -1
- package/dist/autocomplete.css +1 -1
- package/dist/autocomplete.css.map +1 -1
- package/dist/avatars.css +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 +1 -1
- package/dist/branch-name.css.map +1 -1
- package/dist/breadcrumb.css.map +1 -1
- package/dist/buttons.css +1 -1
- package/dist/buttons.css.map +1 -1
- package/dist/color-modes.css +1 -1
- package/dist/color-modes.css.map +1 -1
- package/dist/core.css +1 -1
- package/dist/core.css.map +1 -1
- package/dist/dropdown.css +1 -1
- package/dist/dropdown.css.map +1 -1
- package/dist/forms.css +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 +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/links.css +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 +1 -1
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-links.css +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/marketing.css +1 -1
- package/dist/marketing.css.map +1 -1
- package/dist/meta.json +82 -82
- package/dist/navigation.css +1 -1
- package/dist/navigation.css.map +1 -1
- package/dist/pagination.css +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 +4 -4
- 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/alerts.json +1 -1
- package/dist/stats/autocomplete.json +1 -1
- package/dist/stats/avatars.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/blankslate.json +1 -1
- package/dist/stats/branch-name.json +1 -1
- package/dist/stats/buttons.json +1 -1
- package/dist/stats/color-modes.json +1 -1
- package/dist/stats/core.json +1 -1
- package/dist/stats/dropdown.json +1 -1
- package/dist/stats/forms.json +1 -1
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/links.json +1 -1
- package/dist/stats/markdown.json +1 -1
- package/dist/stats/marketing-buttons.json +1 -1
- package/dist/stats/marketing-links.json +1 -1
- package/dist/stats/marketing.json +1 -1
- package/dist/stats/navigation.json +1 -1
- package/dist/stats/pagination.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/stats/subhead.json +1 -1
- package/dist/stats/toasts.json +1 -1
- package/dist/stats/tooltips.json +1 -1
- package/dist/stats/utilities.json +1 -1
- package/dist/subhead.css +1 -1
- package/dist/subhead.css.map +1 -1
- package/dist/table-object.css.map +1 -1
- package/dist/timeline.css.map +1 -1
- package/dist/toasts.css +1 -1
- package/dist/toasts.css.map +1 -1
- package/dist/tooltips.css +1 -1
- package/dist/tooltips.css.map +1 -1
- package/dist/truncate.css.map +1 -1
- package/dist/utilities.css +1 -1
- package/dist/utilities.css.map +1 -1
- package/dist/variables.json +34 -34
- package/dropdown/dropdown.scss +0 -2
- package/forms/form-control.scss +26 -5
- package/forms/form-group.scss +48 -13
- package/forms/form-validation.scss +1 -1
- package/forms/input-group.scss +18 -0
- package/labels/index.scss +0 -1
- package/labels/labels.scss +12 -1
- package/labels/mixins.scss +7 -2
- package/labels/states.scss +2 -2
- package/layout/grid-offset.scss +1 -0
- package/layout/grid.scss +1 -0
- package/layout/index.scss +1 -1
- package/layout/layout.scss +8 -11
- package/layout/mixins.scss +30 -4
- package/layout/page-layout.scss +384 -0
- package/links/link.scss +6 -1
- package/markdown/code.scss +5 -0
- package/markdown/footnotes.scss +38 -26
- package/markdown/headings.scss +17 -0
- package/markdown/images.scss +3 -3
- package/markdown/markdown-body.scss +0 -8
- package/marketing/buttons/button.scss +32 -26
- package/marketing/links/link.scss +5 -5
- package/marketing/type/typography.scss +21 -0
- package/marketing/utilities/layout.scss +1 -0
- package/navigation/filter-list.scss +20 -2
- package/navigation/menu.scss +8 -10
- package/navigation/sidenav.scss +3 -12
- package/navigation/subnav.scss +21 -2
- package/navigation/tabnav.scss +9 -4
- package/navigation/underline-nav.scss +51 -45
- package/package.json +32 -26
- package/pagination/pagination.scss +65 -7
- package/popover/popover.scss +2 -2
- package/select-menu/select-menu.scss +3 -3
- package/stylelint.config.cjs +2 -11
- package/subhead/subhead.scss +3 -0
- package/support/mixins/color-modes.scss +5 -0
- package/support/mixins/layout.scss +1 -0
- package/support/mixins/misc.scss +28 -5
- package/support/mixins/typography.scss +3 -2
- package/support/variables/layout.scss +3 -3
- package/table-object/table-object.scss +3 -0
- package/timeline/timeline-item.scss +2 -1
- package/toasts/toasts.scss +7 -4
- package/tooltips/tooltips.scss +0 -7
- package/utilities/colors.scss +16 -0
- package/utilities/details.scss +81 -4
- package/utilities/layout.scss +1 -1
- package/utilities/margin.scss +4 -1
- package/utilities/padding.scss +3 -1
- package/utilities/visibility-display.scss +52 -3
- package/table-object/README.md +0 -25
package/markdown/footnotes.scss
CHANGED
|
@@ -1,37 +1,49 @@
|
|
|
1
1
|
// stylelint-disable selector-max-type
|
|
2
2
|
// stylelint-disable selector-max-compound-selectors
|
|
3
3
|
|
|
4
|
-
.markdown-body
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
.markdown-body {
|
|
5
|
+
[data-footnote-ref] {
|
|
6
|
+
&::before {
|
|
7
|
+
content: '[';
|
|
8
|
+
}
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
&::after {
|
|
11
|
+
content: ']';
|
|
12
|
+
}
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
.footnotes {
|
|
16
|
+
font-size: $h6-size;
|
|
17
|
+
color: var(--color-fg-muted);
|
|
18
|
+
border-top: $border;
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
right: -$spacer-2;
|
|
21
|
-
bottom: -$spacer-2;
|
|
22
|
-
left: -$spacer-4;
|
|
23
|
-
pointer-events: none;
|
|
24
|
-
content: '';
|
|
25
|
-
// stylelint-disable-next-line primer/borders
|
|
26
|
-
border: 2px $border-style var(--color-accent-emphasis);
|
|
27
|
-
border-radius: $border-radius;
|
|
28
|
-
}
|
|
20
|
+
ol {
|
|
21
|
+
padding-left: $spacer-3;
|
|
22
|
+
}
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
li {
|
|
25
|
+
position: relative;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
li:target::before {
|
|
29
|
+
position: absolute;
|
|
30
|
+
top: -$spacer-2;
|
|
31
|
+
right: -$spacer-2;
|
|
32
|
+
bottom: -$spacer-2;
|
|
33
|
+
left: -$spacer-4;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
content: '';
|
|
36
|
+
// stylelint-disable-next-line primer/borders
|
|
37
|
+
border: 2px $border-style var(--color-accent-emphasis);
|
|
38
|
+
border-radius: $border-radius;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
li:target {
|
|
42
|
+
color: var(--color-fg-default);
|
|
43
|
+
}
|
|
33
44
|
|
|
34
|
-
|
|
35
|
-
|
|
45
|
+
.data-footnote-backref g-emoji {
|
|
46
|
+
font-family: monospace;
|
|
47
|
+
}
|
|
36
48
|
}
|
|
37
49
|
}
|
package/markdown/headings.scss
CHANGED
package/markdown/images.scss
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
box-sizing: content-box;
|
|
11
11
|
background-color: var(--color-canvas-default);
|
|
12
12
|
|
|
13
|
-
&[align=right] {
|
|
13
|
+
&[align='right'] {
|
|
14
14
|
// stylelint-disable-next-line primer/spacing
|
|
15
15
|
padding-left: 20px;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
&[align=left] {
|
|
18
|
+
&[align='left'] {
|
|
19
19
|
// stylelint-disable-next-line primer/spacing
|
|
20
20
|
padding-right: 20px;
|
|
21
21
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
.emoji {
|
|
25
25
|
max-width: none;
|
|
26
26
|
vertical-align: text-top;
|
|
27
|
-
// Override `<img>` styles so
|
|
27
|
+
// Override `<img>` styles so Emojis don't clash with zebra striping in our tables
|
|
28
28
|
background-color: transparent;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
white-space: nowrap;
|
|
14
14
|
vertical-align: middle;
|
|
15
15
|
user-select: none;
|
|
16
|
-
background:
|
|
16
|
+
background:
|
|
17
|
+
linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%),
|
|
18
|
+
var(--color-mktg-btn-bg) !important;
|
|
17
19
|
border: 0;
|
|
18
20
|
// stylelint-disable-next-line primer/borders
|
|
19
21
|
border-radius: 0.375rem;
|
|
20
|
-
transition: box-shadow 0.2s;
|
|
22
|
+
transition: box-shadow 0.2s, outline 0.2s ease;
|
|
21
23
|
appearance: none !important;
|
|
22
24
|
|
|
23
25
|
&::before {
|
|
@@ -42,29 +44,32 @@
|
|
|
42
44
|
box-shadow: var(--color-mktg-btn-shadow-hover) !important;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
|
-
&:focus,
|
|
46
|
-
&.focus {
|
|
47
|
-
outline: 0;
|
|
48
|
-
box-shadow: var(--color-mktg-btn-shadow-focus), var(--color-mktg-btn-shadow-hover) !important;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
47
|
&:hover,
|
|
52
48
|
&:focus,
|
|
49
|
+
&:focus-visible,
|
|
53
50
|
&.focus {
|
|
54
51
|
&::before {
|
|
55
52
|
opacity: 1;
|
|
56
53
|
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// fallback :focus state
|
|
57
|
+
&:focus {
|
|
58
|
+
@include focusOutline(2px, var(--color-accent-fg));
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
// remove fallback :focus if :focus-visible is supported
|
|
61
|
+
&:not(:focus-visible) {
|
|
62
|
+
outline: solid 1px transparent;
|
|
63
|
+
box-shadow: none;
|
|
60
64
|
}
|
|
61
65
|
}
|
|
62
66
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
// default focus state
|
|
68
|
+
&:focus-visible {
|
|
69
|
+
@include focusOutline(2px, var(--color-accent-fg));
|
|
70
|
+
}
|
|
67
71
|
|
|
72
|
+
&:active {
|
|
68
73
|
&::before {
|
|
69
74
|
opacity: 0.5 !important;
|
|
70
75
|
}
|
|
@@ -91,11 +96,6 @@
|
|
|
91
96
|
box-shadow: var(--color-mktg-btn-shadow-hover-muted) !important;
|
|
92
97
|
}
|
|
93
98
|
|
|
94
|
-
&:focus,
|
|
95
|
-
&.focus {
|
|
96
|
-
box-shadow: var(--color-mktg-btn-shadow-hover-muted), var(--color-mktg-btn-shadow-focus) !important;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
99
|
&:active {
|
|
100
100
|
// stylelint-disable-next-line primer/box-shadow
|
|
101
101
|
box-shadow: var(--color-fg-default) 0 0 0 3px inset !important;
|
|
@@ -119,11 +119,6 @@
|
|
|
119
119
|
&:hover {
|
|
120
120
|
box-shadow: var(--color-mktg-btn-shadow-hover-muted) !important;
|
|
121
121
|
}
|
|
122
|
-
|
|
123
|
-
&:focus,
|
|
124
|
-
.focus {
|
|
125
|
-
box-shadow: var(--color-mktg-btn-shadow-hover-muted), var(--color-mktg-btn-shadow-focus) !important;
|
|
126
|
-
}
|
|
127
122
|
}
|
|
128
123
|
|
|
129
124
|
.btn-signup-mktg {
|
|
@@ -137,9 +132,20 @@
|
|
|
137
132
|
background: linear-gradient(180deg, rgba(52, 183, 89, 0.15) 0%, rgba(46, 164, 79, 0) 100%) !important;
|
|
138
133
|
}
|
|
139
134
|
|
|
135
|
+
// fallback :focus state
|
|
140
136
|
&:focus {
|
|
141
|
-
|
|
142
|
-
|
|
137
|
+
@include focusOutline(2px, var(--color-accent-fg));
|
|
138
|
+
|
|
139
|
+
// remove fallback :focus if :focus-visible is supported
|
|
140
|
+
&:not(:focus-visible) {
|
|
141
|
+
outline: solid 1px transparent;
|
|
142
|
+
box-shadow: none;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// default focus state
|
|
147
|
+
&:focus-visible {
|
|
148
|
+
@include focusOutline(2px, var(--color-accent-fg));
|
|
143
149
|
}
|
|
144
150
|
}
|
|
145
151
|
|
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
text-decoration: none;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
&:active {
|
|
10
|
-
outline: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
&::after,
|
|
14
10
|
&.link-emphasis-mktg::before {
|
|
15
11
|
position: absolute;
|
|
@@ -35,13 +31,17 @@
|
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
&:hover,
|
|
38
|
-
&:focus,
|
|
39
34
|
&:active {
|
|
40
35
|
&::after {
|
|
41
36
|
transform: scaleX(1);
|
|
42
37
|
}
|
|
43
38
|
}
|
|
44
39
|
|
|
40
|
+
&:focus,
|
|
41
|
+
&:focus-visible {
|
|
42
|
+
outline-offset: 2px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
45
|
&.arrow-target-mktg {
|
|
46
46
|
.arrow-symbol-mktg {
|
|
47
47
|
margin-left: -$em-spacer-3;
|
|
@@ -15,17 +15,25 @@
|
|
|
15
15
|
|
|
16
16
|
@each $header, $sizes in $mktg-headers {
|
|
17
17
|
.h#{$header}-mktg {
|
|
18
|
+
// stylelint-disable-next-line function-no-unknown
|
|
18
19
|
$pairing: map-get($mktg-header-pairings, nth($sizes, 1));
|
|
20
|
+
// stylelint-disable-next-line function-no-unknown
|
|
19
21
|
$pairing-md: map-get($mktg-header-pairings, nth($sizes, 2));
|
|
22
|
+
// stylelint-disable-next-line function-no-unknown
|
|
20
23
|
$pairing-lg: map-get($mktg-header-pairings, nth($sizes, 3));
|
|
21
24
|
|
|
25
|
+
// stylelint-disable-next-line function-no-unknown
|
|
22
26
|
font-size: map-get($pairing, 'size') !important;
|
|
27
|
+
// stylelint-disable-next-line function-no-unknown
|
|
23
28
|
line-height: map-get($pairing, 'lh') !important;
|
|
29
|
+
|
|
24
30
|
@if (map-get($pairing, 'size') >= $mktg-header-weight-threshold) { font-weight: $mktg-header-weight-large !important; }
|
|
25
31
|
|
|
26
32
|
@if (nth($sizes, 1) != nth($sizes, 2)) {
|
|
27
33
|
@include breakpoint(md) {
|
|
34
|
+
// stylelint-disable-next-line function-no-unknown
|
|
28
35
|
font-size: map-get($pairing-md, 'size') !important;
|
|
36
|
+
// stylelint-disable-next-line function-no-unknown
|
|
29
37
|
line-height: map-get($pairing-md, 'lh') !important;
|
|
30
38
|
|
|
31
39
|
@if (map-get($pairing-md, 'size') >= $mktg-header-spacing-threshold and map-get($pairing, 'size') < $mktg-header-spacing-threshold) {
|
|
@@ -40,7 +48,9 @@
|
|
|
40
48
|
|
|
41
49
|
@if (nth($sizes, 2) != nth($sizes, 3)) {
|
|
42
50
|
@include breakpoint(lg) {
|
|
51
|
+
// stylelint-disable-next-line function-no-unknown
|
|
43
52
|
font-size: map-get($pairing-lg, 'size') !important;
|
|
53
|
+
// stylelint-disable-next-line function-no-unknown
|
|
44
54
|
line-height: map-get($pairing-lg, 'lh') !important;
|
|
45
55
|
|
|
46
56
|
@if (map-get($pairing-lg, 'size') >= $mktg-header-spacing-threshold and map-get($pairing-md, 'size') < $mktg-header-spacing-threshold) {
|
|
@@ -69,18 +79,27 @@
|
|
|
69
79
|
|
|
70
80
|
@each $body, $sizes in $mktg-bodies {
|
|
71
81
|
.f#{$body}-mktg {
|
|
82
|
+
// stylelint-disable-next-line function-no-unknown
|
|
72
83
|
$pairing: map-get($mktg-body-pairings, nth($sizes, 1));
|
|
84
|
+
// stylelint-disable-next-line function-no-unknown
|
|
73
85
|
$pairing-md: map-get($mktg-body-pairings, nth($sizes, 2));
|
|
86
|
+
// stylelint-disable-next-line function-no-unknown
|
|
74
87
|
$pairing-lg: map-get($mktg-body-pairings, nth($sizes, 3));
|
|
75
88
|
|
|
89
|
+
// stylelint-disable-next-line function-no-unknown
|
|
76
90
|
font-size: map-get($pairing, 'size') !important;
|
|
91
|
+
// stylelint-disable-next-line function-no-unknown
|
|
77
92
|
line-height: map-get($pairing, 'lh') !important;
|
|
93
|
+
|
|
78
94
|
@if (map-get($pairing, 'size') >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large !important; }
|
|
95
|
+
|
|
79
96
|
@if (map-get($pairing, 'size') >= $mktg-body-weight-threshold) { font-weight: $font-weight-semibold; }
|
|
80
97
|
|
|
81
98
|
@if (nth($sizes, 1) != nth($sizes, 2)) {
|
|
82
99
|
@include breakpoint(md) {
|
|
100
|
+
// stylelint-disable-next-line function-no-unknown
|
|
83
101
|
font-size: map-get($pairing-md, 'size') !important;
|
|
102
|
+
// stylelint-disable-next-line function-no-unknown
|
|
84
103
|
line-height: map-get($pairing-md, 'lh') !important;
|
|
85
104
|
|
|
86
105
|
@if (map-get($pairing-md, 'size') >= $mktg-body-spacing-threshold and map-get($pairing, 'size') < $mktg-body-spacing-threshold) {
|
|
@@ -95,7 +114,9 @@
|
|
|
95
114
|
|
|
96
115
|
@if (nth($sizes, 2) != nth($sizes, 3)) {
|
|
97
116
|
@include breakpoint(lg) {
|
|
117
|
+
// stylelint-disable-next-line function-no-unknown
|
|
98
118
|
font-size: map-get($pairing-lg, 'size') !important;
|
|
119
|
+
// stylelint-disable-next-line function-no-unknown
|
|
99
120
|
line-height: map-get($pairing-lg, 'lh') !important;
|
|
100
121
|
|
|
101
122
|
@if (map-get($pairing-lg, 'size') >= $mktg-body-spacing-threshold and map-get($pairing-md, 'size') < $mktg-body-spacing-threshold) {
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
@each $breakpoint, $variant in $responsive-variants {
|
|
28
28
|
@include breakpoint($breakpoint) {
|
|
29
29
|
@for $offset from 1 through 7 {
|
|
30
|
+
// stylelint-disable-next-line primer/spacing, function-no-unknown
|
|
30
31
|
.offset#{$variant}-n#{$offset} { margin-left: -($offset * 0.0833333333 * 100%); }
|
|
31
32
|
}
|
|
32
33
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// stylelint-disable selector-max-specificity
|
|
2
|
+
|
|
1
3
|
// Filters list
|
|
2
4
|
//
|
|
3
5
|
// A vertical list of filters.
|
|
@@ -41,10 +43,26 @@
|
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
&.selected,
|
|
44
|
-
&[aria-selected=true],
|
|
45
|
-
&[aria-current]:not([aria-current=false]) {
|
|
46
|
+
&[aria-selected='true'],
|
|
47
|
+
&[aria-current]:not([aria-current='false']) {
|
|
46
48
|
color: var(--color-fg-on-emphasis);
|
|
47
49
|
background-color: var(--color-accent-emphasis);
|
|
50
|
+
|
|
51
|
+
// fallback :focus state
|
|
52
|
+
&:focus {
|
|
53
|
+
@include focusOutlineOnEmphasis;
|
|
54
|
+
|
|
55
|
+
// remove fallback :focus if :focus-visible is supported
|
|
56
|
+
&:not(:focus-visible) {
|
|
57
|
+
outline: solid 1px transparent;
|
|
58
|
+
box-shadow: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// default focus state
|
|
63
|
+
&:focus-visible {
|
|
64
|
+
@include focusOutlineOnEmphasis;
|
|
65
|
+
}
|
|
48
66
|
}
|
|
49
67
|
|
|
50
68
|
.count {
|
package/navigation/menu.scss
CHANGED
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
border-top-left-radius: $border-radius;
|
|
23
23
|
border-top-right-radius: $border-radius;
|
|
24
24
|
|
|
25
|
-
&::before {
|
|
25
|
+
&::before {
|
|
26
|
+
border-top-left-radius: $border-radius;
|
|
27
|
+
}
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
&:last-child {
|
|
@@ -30,13 +32,9 @@
|
|
|
30
32
|
border-bottom-right-radius: $border-radius;
|
|
31
33
|
border-bottom-left-radius: $border-radius;
|
|
32
34
|
|
|
33
|
-
&::before {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
&:focus {
|
|
37
|
-
z-index: 1;
|
|
38
|
-
outline: none;
|
|
39
|
-
box-shadow: var(--color-primer-shadow-focus);
|
|
35
|
+
&::before {
|
|
36
|
+
border-bottom-left-radius: $border-radius;
|
|
37
|
+
}
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
&:hover {
|
|
@@ -49,8 +47,8 @@
|
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
&.selected,
|
|
52
|
-
&[aria-selected=true],
|
|
53
|
-
&[aria-current]:not([aria-current=false]) {
|
|
50
|
+
&[aria-selected='true'],
|
|
51
|
+
&[aria-current]:not([aria-current='false']) {
|
|
54
52
|
cursor: default;
|
|
55
53
|
background-color: var(--color-menu-bg-active);
|
|
56
54
|
|
package/navigation/sidenav.scss
CHANGED
|
@@ -43,23 +43,16 @@
|
|
|
43
43
|
|
|
44
44
|
// States
|
|
45
45
|
|
|
46
|
-
.SideNav-item:focus {
|
|
47
|
-
z-index: 1;
|
|
48
|
-
outline: none;
|
|
49
|
-
box-shadow: var(--color-primer-shadow-focus);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
46
|
.SideNav-item:hover {
|
|
53
47
|
text-decoration: none;
|
|
54
48
|
background-color: var(--color-neutral-subtle);
|
|
55
|
-
outline: none;
|
|
56
49
|
}
|
|
57
50
|
|
|
58
51
|
.SideNav-item:active {
|
|
59
52
|
background-color: var(--color-canvas-subtle);
|
|
60
53
|
}
|
|
61
54
|
|
|
62
|
-
.SideNav-item[aria-current]:not([aria-current=false]),
|
|
55
|
+
.SideNav-item[aria-current]:not([aria-current='false']),
|
|
63
56
|
.SideNav-item[aria-selected='true'] {
|
|
64
57
|
background-color: var(--color-sidenav-selected-bg);
|
|
65
58
|
|
|
@@ -94,14 +87,12 @@
|
|
|
94
87
|
border: 0;
|
|
95
88
|
}
|
|
96
89
|
|
|
97
|
-
.SideNav-subItem:hover
|
|
98
|
-
.SideNav-subItem:focus {
|
|
90
|
+
.SideNav-subItem:hover {
|
|
99
91
|
color: var(--color-fg-default);
|
|
100
92
|
text-decoration: none;
|
|
101
|
-
outline: none;
|
|
102
93
|
}
|
|
103
94
|
|
|
104
|
-
.SideNav-subItem[aria-current]:not([aria-current=false]),
|
|
95
|
+
.SideNav-subItem[aria-current]:not([aria-current='false']),
|
|
105
96
|
.SideNav-subItem[aria-selected='true'] {
|
|
106
97
|
font-weight: $font-weight-semibold;
|
|
107
98
|
color: var(--color-fg-default);
|
package/navigation/subnav.scss
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// stylelint-disable selector-max-specificity
|
|
2
|
+
|
|
1
3
|
// Needs refactoring
|
|
2
4
|
// Sub nav
|
|
3
5
|
.subnav {
|
|
@@ -40,12 +42,28 @@
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
&.selected,
|
|
43
|
-
&[aria-selected=true],
|
|
44
|
-
&[aria-current]:not([aria-current=false]) {
|
|
45
|
+
&[aria-selected='true'],
|
|
46
|
+
&[aria-current]:not([aria-current='false']) {
|
|
45
47
|
z-index: 2;
|
|
46
48
|
color: var(--color-fg-on-emphasis);
|
|
47
49
|
background-color: var(--color-accent-emphasis);
|
|
48
50
|
border-color: var(--color-accent-emphasis);
|
|
51
|
+
|
|
52
|
+
// fallback :focus state
|
|
53
|
+
&:focus {
|
|
54
|
+
@include focusOutlineOnEmphasis;
|
|
55
|
+
|
|
56
|
+
// remove fallback :focus if :focus-visible is supported
|
|
57
|
+
&:not(:focus-visible) {
|
|
58
|
+
outline: solid 1px transparent;
|
|
59
|
+
box-shadow: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// default focus state
|
|
64
|
+
&:focus-visible {
|
|
65
|
+
@include focusOutlineOnEmphasis;
|
|
66
|
+
}
|
|
49
67
|
}
|
|
50
68
|
|
|
51
69
|
&:first-child {
|
|
@@ -72,6 +90,7 @@
|
|
|
72
90
|
}
|
|
73
91
|
|
|
74
92
|
.subnav-search-input-wide {
|
|
93
|
+
// stylelint-disable-next-line primer/responsive-widths
|
|
75
94
|
width: 500px;
|
|
76
95
|
}
|
|
77
96
|
|
package/navigation/tabnav.scss
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
transition: color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
|
|
29
29
|
|
|
30
30
|
&.selected,
|
|
31
|
-
&[aria-selected=true],
|
|
32
|
-
&[aria-current]:not([aria-current=false]) {
|
|
31
|
+
&[aria-selected='true'],
|
|
32
|
+
&[aria-current]:not([aria-current='false']) {
|
|
33
33
|
color: var(--color-fg-default);
|
|
34
34
|
background-color: var(--color-canvas-default); // cover bottom border
|
|
35
35
|
border-color: var(--color-border-default);
|
|
@@ -40,13 +40,18 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
&:hover
|
|
44
|
-
&:focus {
|
|
43
|
+
&:hover {
|
|
45
44
|
color: var(--color-fg-default);
|
|
46
45
|
text-decoration: none;
|
|
47
46
|
transition-duration: 0.1s;
|
|
48
47
|
}
|
|
49
48
|
|
|
49
|
+
&:focus,
|
|
50
|
+
&:focus-visible {
|
|
51
|
+
border-radius: $border-radius $border-radius 0 0 !important;
|
|
52
|
+
outline-offset: -6px;
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
&:active {
|
|
51
56
|
color: var(--color-fg-muted);
|
|
52
57
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// stylelint-disable selector-max-specificity
|
|
1
2
|
$nav-height: $spacer-3 * 3 !default; // 48px
|
|
2
3
|
|
|
3
4
|
.UnderlineNav {
|
|
@@ -34,56 +35,61 @@ $nav-height: $spacer-3 * 3 !default; // 48px
|
|
|
34
35
|
border-radius: $border-radius;
|
|
35
36
|
align-items: center;
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
&:hover {
|
|
54
|
-
color: var(--color-fg-default);
|
|
55
|
-
text-decoration: none;
|
|
56
|
-
background: var(--color-action-list-item-default-hover-bg);
|
|
57
|
-
transition: background 0.12s ease-out;
|
|
38
|
+
&:hover,
|
|
39
|
+
&:focus,
|
|
40
|
+
&:focus-visible {
|
|
41
|
+
color: var(--color-fg-default);
|
|
42
|
+
text-decoration: none;
|
|
43
|
+
border-bottom-color: var(--color-neutral-muted);
|
|
44
|
+
outline-offset: -8px;
|
|
45
|
+
transition: border-bottom-color 0.12s ease-out;
|
|
46
|
+
|
|
47
|
+
// renders a visibly hidden "copy" of the label in bold, reserving box space for when label becomes bold on selected
|
|
48
|
+
[data-content]::before {
|
|
49
|
+
display: block;
|
|
50
|
+
height: 0;
|
|
51
|
+
font-weight: $font-weight-bold;
|
|
52
|
+
visibility: hidden;
|
|
53
|
+
content: attr(data-content);
|
|
58
54
|
}
|
|
59
|
-
}
|
|
60
55
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
color: var(--color-fg-default);
|
|
56
|
+
// increase touch target area
|
|
57
|
+
&::before {
|
|
58
|
+
@include minTouchTarget($min-height: $nav-height);
|
|
59
|
+
}
|
|
66
60
|
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
content: '';
|
|
76
|
-
background: var(--color-primer-border-active);
|
|
77
|
-
border-radius: $border-radius;
|
|
78
|
-
transform: translate(50%, -50%);
|
|
61
|
+
// hover state was "sticking" on mobile after click
|
|
62
|
+
@media (pointer: fine) {
|
|
63
|
+
&:hover {
|
|
64
|
+
color: var(--color-fg-default);
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
background: var(--color-action-list-item-default-hover-bg);
|
|
67
|
+
transition: background 0.12s ease-out;
|
|
68
|
+
}
|
|
79
69
|
}
|
|
80
|
-
}
|
|
81
70
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
71
|
+
&.selected,
|
|
72
|
+
&[role='tab'][aria-selected='true'],
|
|
73
|
+
&[aria-current]:not([aria-current='false']) {
|
|
74
|
+
font-weight: $font-weight-bold;
|
|
75
|
+
color: var(--color-fg-default);
|
|
76
|
+
border-bottom-color: var(--color-primer-border-active);
|
|
77
|
+
outline-offset: -8px;
|
|
78
|
+
|
|
79
|
+
// current/selected underline
|
|
80
|
+
&::after {
|
|
81
|
+
position: absolute;
|
|
82
|
+
right: 50%;
|
|
83
|
+
// 48px total height / 2 (24px) + 1px
|
|
84
|
+
bottom: calc(50% - 25px);
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 2px;
|
|
87
|
+
content: '';
|
|
88
|
+
background: var(--color-primer-border-active);
|
|
89
|
+
border-radius: $border-radius;
|
|
90
|
+
transform: translate(50%, -50%);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
87
93
|
}
|
|
88
94
|
|
|
89
95
|
.Counter {
|