@primer/css 20.0.0-rc.8702fd9a → 20.0.0-rc.e6f567ec
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 +166 -3
- 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.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 +73 -73
- 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 +7 -7
- package/dropdown/dropdown.scss +0 -2
- package/forms/form-control.scss +26 -5
- package/forms/form-group.scss +47 -13
- package/forms/form-validation.scss +1 -1
- package/forms/input-group.scss +18 -0
- package/labels/counters.scss +1 -1
- 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 +3 -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 +20 -2
- package/navigation/tabnav.scss +9 -4
- package/navigation/underline-nav.scss +79 -28
- package/package.json +32 -26
- package/pagination/pagination.scss +65 -7
- package/popover/popover.scss +1 -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 +3 -0
- package/support/mixins/misc.scss +48 -1
- package/support/mixins/typography.scss +3 -2
- package/support/variables/layout.scss +2 -3
- package/table-object/table-object.scss +3 -0
- package/timeline/timeline-item.scss +0 -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
|
@@ -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;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
font-size: map-get($pairing, 'size') !important;
|
|
23
23
|
line-height: map-get($pairing, 'lh') !important;
|
|
24
|
+
|
|
24
25
|
@if (map-get($pairing, 'size') >= $mktg-header-weight-threshold) { font-weight: $mktg-header-weight-large !important; }
|
|
25
26
|
|
|
26
27
|
@if (nth($sizes, 1) != nth($sizes, 2)) {
|
|
@@ -75,7 +76,9 @@
|
|
|
75
76
|
|
|
76
77
|
font-size: map-get($pairing, 'size') !important;
|
|
77
78
|
line-height: map-get($pairing, 'lh') !important;
|
|
79
|
+
|
|
78
80
|
@if (map-get($pairing, 'size') >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large !important; }
|
|
81
|
+
|
|
79
82
|
@if (map-get($pairing, 'size') >= $mktg-body-weight-threshold) { font-weight: $font-weight-semibold; }
|
|
80
83
|
|
|
81
84
|
@if (nth($sizes, 1) != nth($sizes, 2)) {
|
|
@@ -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
|
|
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 {
|
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,50 +1,105 @@
|
|
|
1
|
+
// stylelint-disable selector-max-specificity
|
|
2
|
+
$nav-height: $spacer-3 * 3 !default; // 48px
|
|
3
|
+
|
|
1
4
|
.UnderlineNav {
|
|
2
5
|
display: flex;
|
|
6
|
+
min-height: $nav-height;
|
|
3
7
|
overflow-x: auto;
|
|
4
8
|
overflow-y: hidden;
|
|
5
9
|
// stylelint-disable-next-line primer/box-shadow
|
|
6
10
|
box-shadow: inset 0 -1px 0 var(--color-border-muted);
|
|
11
|
+
-webkit-overflow-scrolling: auto;
|
|
7
12
|
justify-content: space-between;
|
|
8
13
|
}
|
|
9
14
|
|
|
10
15
|
.UnderlineNav-body {
|
|
11
16
|
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: $spacer-2;
|
|
19
|
+
list-style: none;
|
|
12
20
|
}
|
|
13
21
|
|
|
14
22
|
.UnderlineNav-item {
|
|
15
|
-
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
25
|
+
padding: 0 $spacer-2;
|
|
16
26
|
font-size: $body-font-size;
|
|
17
27
|
// stylelint-disable-next-line primer/typography
|
|
18
28
|
line-height: 30px;
|
|
19
29
|
color: var(--color-fg-default);
|
|
20
30
|
text-align: center;
|
|
21
31
|
white-space: nowrap;
|
|
32
|
+
cursor: pointer;
|
|
22
33
|
background-color: transparent;
|
|
23
34
|
border: 0;
|
|
24
|
-
|
|
25
|
-
|
|
35
|
+
border-radius: $border-radius;
|
|
36
|
+
align-items: center;
|
|
26
37
|
|
|
27
38
|
&:hover,
|
|
28
|
-
&:focus
|
|
39
|
+
&:focus,
|
|
40
|
+
&:focus-visible {
|
|
29
41
|
color: var(--color-fg-default);
|
|
30
42
|
text-decoration: none;
|
|
31
43
|
border-bottom-color: var(--color-neutral-muted);
|
|
32
|
-
outline:
|
|
33
|
-
outline-offset: -1px;
|
|
44
|
+
outline-offset: -8px;
|
|
34
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);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// increase touch target area
|
|
57
|
+
&::before {
|
|
58
|
+
@include minTouchTarget($min-height: $nav-height);
|
|
59
|
+
}
|
|
60
|
+
|
|
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
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
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
|
+
}
|
|
35
93
|
}
|
|
36
94
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
&[aria-current]:not([aria-current=false]) {
|
|
40
|
-
font-weight: $font-weight-bold;
|
|
95
|
+
.Counter {
|
|
96
|
+
margin-left: $spacer-2;
|
|
41
97
|
color: var(--color-fg-default);
|
|
42
|
-
|
|
43
|
-
outline: 1px dotted transparent; // Support Firefox custom colors
|
|
44
|
-
outline-offset: -1px;
|
|
98
|
+
background-color: var(--color-neutral-muted);
|
|
45
99
|
|
|
46
|
-
|
|
47
|
-
color: var(--color-fg-
|
|
100
|
+
&--primary {
|
|
101
|
+
color: var(--color-fg-on-emphasis);
|
|
102
|
+
background-color: var(--color-neutral-emphasis);
|
|
48
103
|
}
|
|
49
104
|
}
|
|
50
105
|
}
|
|
@@ -63,22 +118,18 @@
|
|
|
63
118
|
|
|
64
119
|
.UnderlineNav--full {
|
|
65
120
|
display: block;
|
|
66
|
-
}
|
|
67
121
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
122
|
+
// required for underline to align with additional wrapper element
|
|
123
|
+
.UnderlineNav-body {
|
|
124
|
+
min-height: $nav-height;
|
|
125
|
+
}
|
|
71
126
|
}
|
|
72
127
|
|
|
73
|
-
.UnderlineNav
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
&--primary {
|
|
79
|
-
color: var(--color-fg-on-emphasis);
|
|
80
|
-
background-color: var(--color-neutral-emphasis);
|
|
81
|
-
}
|
|
128
|
+
.UnderlineNav-octicon {
|
|
129
|
+
display: inline !important;
|
|
130
|
+
margin-right: $spacer-2;
|
|
131
|
+
color: var(--color-fg-muted);
|
|
132
|
+
fill: var(--color-fg-muted);
|
|
82
133
|
}
|
|
83
134
|
|
|
84
135
|
.UnderlineNav-container {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/css",
|
|
3
|
-
"version": "20.0.0-rc.
|
|
3
|
+
"version": "20.0.0-rc.e6f567ec",
|
|
4
4
|
"description": "The CSS implementation of GitHub's Primer Design System",
|
|
5
5
|
"homepage": "https://primer.style/css",
|
|
6
6
|
"author": "GitHub, Inc.",
|
|
@@ -23,8 +23,14 @@
|
|
|
23
23
|
"design-system"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
+
"build:docs": "script/build-docs",
|
|
27
|
+
"build:docs:preview": "script/build-docs preview",
|
|
26
28
|
"dist": "script/dist.js",
|
|
27
|
-
"
|
|
29
|
+
"dist:watch": "chokidar \"src/**/*.scss\" -c \"script/dist.js\"",
|
|
30
|
+
"stylelint": "stylelint --quiet --rd 'src/**/*.scss'",
|
|
31
|
+
"stylelint:fix": "yarn stylelint -- --fix",
|
|
32
|
+
"stylelint:remove-disables": "script/stylelint-remove-disables.js 'src/**/*.scss'",
|
|
33
|
+
"stylelint:add-disables": "script/stylelint-add-disables.js 'src/**/*.scss'",
|
|
28
34
|
"eslint": "eslint deprecations.js __tests__ script",
|
|
29
35
|
"prepublishOnly": "script/prepublish",
|
|
30
36
|
"start": "yarn dev",
|
|
@@ -35,37 +41,37 @@
|
|
|
35
41
|
"storybook": "cd docs && yarn && yarn storybook"
|
|
36
42
|
},
|
|
37
43
|
"dependencies": {
|
|
38
|
-
"@primer/primitives": "^7.
|
|
44
|
+
"@primer/primitives": "^7.7.0"
|
|
39
45
|
},
|
|
40
46
|
"devDependencies": {
|
|
41
|
-
"@changesets/changelog-github": "0.4.
|
|
42
|
-
"@changesets/cli": "2.
|
|
47
|
+
"@changesets/changelog-github": "0.4.4",
|
|
48
|
+
"@changesets/cli": "2.22.0",
|
|
43
49
|
"@github/prettier-config": "0.0.4",
|
|
44
|
-
"@koddsson/postcss-sass": "5.0.
|
|
45
|
-
"@primer/stylelint-config": "12.
|
|
46
|
-
"autoprefixer": "10.4.
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"eslint
|
|
50
|
-
"eslint-plugin-
|
|
50
|
+
"@koddsson/postcss-sass": "5.0.1",
|
|
51
|
+
"@primer/stylelint-config": "^12.3.3",
|
|
52
|
+
"autoprefixer": "10.4.4",
|
|
53
|
+
"chokidar-cli": "3.0.0",
|
|
54
|
+
"cssstats": "4.0.5",
|
|
55
|
+
"eslint": "8.13.0",
|
|
56
|
+
"eslint-plugin-github": "4.3.6",
|
|
57
|
+
"eslint-plugin-jest": "26.0.0",
|
|
51
58
|
"eslint-plugin-prettier": "4.0.0",
|
|
52
|
-
"filesize": "8.0.
|
|
59
|
+
"filesize": "8.0.7",
|
|
53
60
|
"front-matter": "4.0.2",
|
|
54
|
-
"fs-extra": "10.0.
|
|
55
|
-
"globby": "
|
|
56
|
-
"jest": "27.
|
|
61
|
+
"fs-extra": "10.0.1",
|
|
62
|
+
"globby": "13.1.1",
|
|
63
|
+
"jest": "27.5.1",
|
|
57
64
|
"js-yaml": "4.1.0",
|
|
58
|
-
"postcss": "8.4.
|
|
59
|
-
"postcss-calc": "8.
|
|
60
|
-
"postcss-import": "14.0
|
|
61
|
-
"postcss-load-config": "3.1.
|
|
62
|
-
"postcss-scss": "4.0.
|
|
65
|
+
"postcss": "8.4.12",
|
|
66
|
+
"postcss-calc": "8.2.4",
|
|
67
|
+
"postcss-import": "14.1.0",
|
|
68
|
+
"postcss-load-config": "3.1.4",
|
|
69
|
+
"postcss-scss": "4.0.3",
|
|
63
70
|
"postcss-simple-vars": "6.0.3",
|
|
64
|
-
"prettier": "2.
|
|
65
|
-
"semver": "7.3.
|
|
66
|
-
"stylelint": "14.1
|
|
67
|
-
"
|
|
68
|
-
"table": "6.7.5"
|
|
71
|
+
"prettier": "2.6.2",
|
|
72
|
+
"semver": "7.3.7",
|
|
73
|
+
"stylelint": "14.6.1",
|
|
74
|
+
"table": "6.8.0"
|
|
69
75
|
},
|
|
70
76
|
"jest": {
|
|
71
77
|
"testEnvironment": "node",
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
a,
|
|
5
5
|
span,
|
|
6
6
|
em {
|
|
7
|
-
display: inline-block;
|
|
8
7
|
min-width: 32px;
|
|
9
8
|
// stylelint-disable-next-line primer/spacing
|
|
10
9
|
padding: 5px 10px;
|
|
@@ -25,7 +24,6 @@
|
|
|
25
24
|
&:focus {
|
|
26
25
|
text-decoration: none;
|
|
27
26
|
border-color: var(--color-border-default);
|
|
28
|
-
outline: 0;
|
|
29
27
|
transition-duration: 0.1s;
|
|
30
28
|
}
|
|
31
29
|
|
|
@@ -42,7 +40,7 @@
|
|
|
42
40
|
|
|
43
41
|
.current,
|
|
44
42
|
.current:hover,
|
|
45
|
-
[aria-current]:not([aria-current=false]) {
|
|
43
|
+
[aria-current]:not([aria-current='false']) {
|
|
46
44
|
color: var(--color-fg-on-emphasis);
|
|
47
45
|
background-color: var(--color-accent-emphasis);
|
|
48
46
|
border-color: transparent;
|
|
@@ -50,10 +48,10 @@
|
|
|
50
48
|
|
|
51
49
|
.gap,
|
|
52
50
|
.disabled,
|
|
53
|
-
[aria-disabled=true],
|
|
51
|
+
[aria-disabled='true'],
|
|
54
52
|
.gap:hover,
|
|
55
53
|
.disabled:hover,
|
|
56
|
-
[aria-disabled=true]:hover {
|
|
54
|
+
[aria-disabled='true']:hover {
|
|
57
55
|
color: var(--color-primer-fg-disabled);
|
|
58
56
|
cursor: default;
|
|
59
57
|
border-color: transparent;
|
|
@@ -75,13 +73,73 @@
|
|
|
75
73
|
// chevron-left
|
|
76
74
|
.previous_page::before {
|
|
77
75
|
margin-right: $spacer-1;
|
|
78
|
-
clip-path:
|
|
76
|
+
clip-path:
|
|
77
|
+
polygon(
|
|
78
|
+
9.8px 12.8px,
|
|
79
|
+
8.7px 12.8px,
|
|
80
|
+
4.5px 8.5px,
|
|
81
|
+
4.5px 7.5px,
|
|
82
|
+
8.7px 3.2px,
|
|
83
|
+
9.8px 4.3px,
|
|
84
|
+
6.1px 8px,
|
|
85
|
+
9.8px 11.7px,
|
|
86
|
+
9.8px 12.8px
|
|
87
|
+
);
|
|
79
88
|
}
|
|
80
89
|
|
|
81
90
|
// chevron-right
|
|
82
91
|
.next_page::after {
|
|
83
92
|
margin-left: $spacer-1;
|
|
84
|
-
clip-path:
|
|
93
|
+
clip-path:
|
|
94
|
+
polygon(
|
|
95
|
+
6.2px 3.2px,
|
|
96
|
+
7.3px 3.2px,
|
|
97
|
+
11.5px 7.5px,
|
|
98
|
+
11.5px 8.5px,
|
|
99
|
+
7.3px 12.8px,
|
|
100
|
+
6.2px 11.7px,
|
|
101
|
+
9.9px 8px,
|
|
102
|
+
6.2px 4.3px,
|
|
103
|
+
6.2px 3.2px
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Responsive
|
|
109
|
+
|
|
110
|
+
// Hide everything by default
|
|
111
|
+
> * {
|
|
112
|
+
display: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 0 -> sm
|
|
116
|
+
// Only show [Previous] [Next]
|
|
117
|
+
|
|
118
|
+
> :first-child,
|
|
119
|
+
> :last-child,
|
|
120
|
+
> .previous_page,
|
|
121
|
+
> .next_page {
|
|
122
|
+
display: inline-block;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// sm -> md
|
|
126
|
+
// Also show [first] [last] [current number] and [...]
|
|
127
|
+
|
|
128
|
+
@include breakpoint(sm) {
|
|
129
|
+
> :nth-child(2),
|
|
130
|
+
> :nth-last-child(2),
|
|
131
|
+
> .current,
|
|
132
|
+
> .gap {
|
|
133
|
+
display: inline-block;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// md -> or more
|
|
138
|
+
// Show everything
|
|
139
|
+
|
|
140
|
+
@include breakpoint(md) {
|
|
141
|
+
> * {
|
|
142
|
+
display: inline-block;
|
|
85
143
|
}
|
|
86
144
|
}
|
|
87
145
|
}
|
package/popover/popover.scss
CHANGED
|
@@ -122,7 +122,6 @@
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
&::before {
|
|
125
|
-
// stylelint-disable-next-line primer/spacing
|
|
126
125
|
margin-top: -($spacer-2 + 1);
|
|
127
126
|
}
|
|
128
127
|
|
|
@@ -196,7 +195,7 @@
|
|
|
196
195
|
// Responsive Popover
|
|
197
196
|
// For < md it will show full-width anchored to the bottom
|
|
198
197
|
|
|
199
|
-
@media (max-width: ($width-md -
|
|
198
|
+
@media (max-width: ($width-md - 0.02px)) {
|
|
200
199
|
.Popover {
|
|
201
200
|
position: fixed;
|
|
202
201
|
top: auto !important;
|
|
@@ -31,7 +31,7 @@ $SelectMenu-max-height: 480px !default;
|
|
|
31
31
|
|
|
32
32
|
// Backdrop
|
|
33
33
|
//
|
|
34
|
-
// Adds a dark, semi transparent "cover"
|
|
34
|
+
// Adds a dark, semi transparent "cover" underneath the modal. Only visible for xs.
|
|
35
35
|
|
|
36
36
|
.SelectMenu::before {
|
|
37
37
|
position: absolute;
|
|
@@ -386,7 +386,7 @@ $SelectMenu-max-height: 480px !default;
|
|
|
386
386
|
//
|
|
387
387
|
// Visible when a user clicks/taps on a list item
|
|
388
388
|
|
|
389
|
-
.SelectMenu-item[aria-checked=true] {
|
|
389
|
+
.SelectMenu-item[aria-checked='true'] {
|
|
390
390
|
font-weight: $font-weight-semibold;
|
|
391
391
|
color: var(--color-fg-default);
|
|
392
392
|
|
|
@@ -402,7 +402,7 @@ $SelectMenu-max-height: 480px !default;
|
|
|
402
402
|
// Prevent list items to be selected
|
|
403
403
|
|
|
404
404
|
.SelectMenu-item:disabled,
|
|
405
|
-
.SelectMenu-item[aria-disabled=true] {
|
|
405
|
+
.SelectMenu-item[aria-disabled='true'] {
|
|
406
406
|
color: var(--color-primer-fg-disabled);
|
|
407
407
|
pointer-events: none;
|
|
408
408
|
}
|
package/stylelint.config.cjs
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: ['@primer/stylelint-config'],
|
|
3
|
-
|
|
4
|
-
customSyntax: require('postcss-scss'),
|
|
5
|
-
ignoreFiles: ['src/fonts/**/*'],
|
|
3
|
+
ignoreFiles: ['**/*.js', '**/*.cjs'],
|
|
6
4
|
rules: {
|
|
7
|
-
'
|
|
8
|
-
'primer/no-override': false,
|
|
9
|
-
'primer/colors': true,
|
|
10
|
-
'primer/borders': true,
|
|
11
|
-
'primer/spacing': true,
|
|
12
|
-
'primer/typography': true,
|
|
13
|
-
'primer/box-shadow': true,
|
|
14
|
-
'primer/no-undefined-vars': [true, {files: 'node_modules/@primer/primitives/dist/scss/colors*/*.scss'}]
|
|
5
|
+
'primer/no-override': false
|
|
15
6
|
}
|
|
16
7
|
}
|
package/subhead/subhead.scss
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
font-size: $h2-size;
|
|
19
19
|
font-weight: $font-weight-normal;
|
|
20
20
|
flex: 1 1 auto;
|
|
21
|
+
order: 0;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
// Make the text bold and red for dangerous content
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
font-size: $body-font-size;
|
|
32
33
|
color: var(--color-fg-muted);
|
|
33
34
|
flex: 1 100%;
|
|
35
|
+
order: 2;
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
// Add 1 or 2 buttons to the right of the heading
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
margin: $spacer-1 0 $spacer-1 $spacer-1;
|
|
39
41
|
align-self: center;
|
|
40
42
|
justify-content: flex-end;
|
|
43
|
+
order: 1;
|
|
41
44
|
|
|
42
45
|
+ .Subhead-description {
|
|
43
46
|
margin-top: $spacer-1;
|