@primer/css 19.8.2 → 20.0.0-rc.04a33ecf

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/DEVELOP.md +26 -21
  3. package/actionlist/action-list-item.scss +10 -7
  4. package/autocomplete/autocomplete.scss +7 -3
  5. package/base/base.scss +63 -3
  6. package/base/normalize.scss +12 -52
  7. package/box/box-overlay.scss +2 -0
  8. package/buttons/button.scss +54 -27
  9. package/buttons/misc.scss +25 -19
  10. package/dist/actionlist.css +1 -1
  11. package/dist/actionlist.css.map +1 -1
  12. package/dist/alerts.css +1 -1
  13. package/dist/alerts.css.map +1 -1
  14. package/dist/autocomplete.css +1 -1
  15. package/dist/autocomplete.css.map +1 -1
  16. package/dist/avatars.css.map +1 -1
  17. package/dist/base.css +1 -1
  18. package/dist/base.css.map +1 -1
  19. package/dist/blankslate.css.map +1 -1
  20. package/dist/box.css.map +1 -1
  21. package/dist/branch-name.css.map +1 -1
  22. package/dist/breadcrumb.css.map +1 -1
  23. package/dist/buttons.css +1 -1
  24. package/dist/buttons.css.map +1 -1
  25. package/dist/color-modes.css.map +1 -1
  26. package/dist/core.css +1 -1
  27. package/dist/core.css.map +1 -1
  28. package/dist/dropdown.css +1 -1
  29. package/dist/dropdown.css.map +1 -1
  30. package/dist/forms.css +1 -1
  31. package/dist/forms.css.map +1 -1
  32. package/dist/header.css.map +1 -1
  33. package/dist/labels.css.map +1 -1
  34. package/dist/layout.css.map +1 -1
  35. package/dist/links.css +1 -1
  36. package/dist/links.css.map +1 -1
  37. package/dist/loaders.css.map +1 -1
  38. package/dist/markdown.css.map +1 -1
  39. package/dist/marketing-buttons.css +1 -1
  40. package/dist/marketing-buttons.css.map +1 -1
  41. package/dist/marketing-links.css +1 -1
  42. package/dist/marketing-links.css.map +1 -1
  43. package/dist/marketing-type.css +1 -1
  44. package/dist/marketing-type.css.map +1 -1
  45. package/dist/marketing-utilities.css.map +1 -1
  46. package/dist/marketing.css +1 -1
  47. package/dist/marketing.css.map +1 -1
  48. package/dist/meta.json +77 -77
  49. package/dist/navigation.css +1 -1
  50. package/dist/navigation.css.map +1 -1
  51. package/dist/pagination.css +1 -1
  52. package/dist/pagination.css.map +1 -1
  53. package/dist/popover.css.map +1 -1
  54. package/dist/primer.css +3 -3
  55. package/dist/primer.css.map +1 -1
  56. package/dist/product.css +1 -1
  57. package/dist/product.css.map +1 -1
  58. package/dist/progress.css.map +1 -1
  59. package/dist/select-menu.css.map +1 -1
  60. package/dist/stats/actionlist.json +1 -1
  61. package/dist/stats/alerts.json +1 -1
  62. package/dist/stats/autocomplete.json +1 -1
  63. package/dist/stats/base.json +1 -1
  64. package/dist/stats/buttons.json +1 -1
  65. package/dist/stats/core.json +1 -1
  66. package/dist/stats/dropdown.json +1 -1
  67. package/dist/stats/forms.json +1 -1
  68. package/dist/stats/links.json +1 -1
  69. package/dist/stats/marketing-buttons.json +1 -1
  70. package/dist/stats/marketing-links.json +1 -1
  71. package/dist/stats/marketing-type.json +1 -1
  72. package/dist/stats/marketing.json +1 -1
  73. package/dist/stats/navigation.json +1 -1
  74. package/dist/stats/pagination.json +1 -1
  75. package/dist/stats/primer.json +1 -1
  76. package/dist/stats/product.json +1 -1
  77. package/dist/stats/toasts.json +1 -1
  78. package/dist/stats/utilities.json +1 -1
  79. package/dist/subhead.css.map +1 -1
  80. package/dist/timeline.css.map +1 -1
  81. package/dist/toasts.css +1 -1
  82. package/dist/toasts.css.map +1 -1
  83. package/dist/tooltips.css.map +1 -1
  84. package/dist/truncate.css.map +1 -1
  85. package/dist/utilities.css +1 -1
  86. package/dist/utilities.css.map +1 -1
  87. package/dist/variables.json +27 -27
  88. package/dropdown/dropdown.scss +0 -2
  89. package/forms/form-control.scss +23 -5
  90. package/forms/form-group.scss +39 -13
  91. package/forms/form-validation.scss +11 -6
  92. package/forms/input-group.scss +8 -0
  93. package/links/link.scss +5 -0
  94. package/marketing/buttons/button.scss +32 -26
  95. package/marketing/links/link.scss +5 -5
  96. package/marketing/type/typography.scss +18 -29
  97. package/marketing/utilities/layout.scss +1 -1
  98. package/navigation/filter-list.scss +18 -0
  99. package/navigation/menu.scss +6 -8
  100. package/navigation/sidenav.scss +1 -10
  101. package/navigation/subnav.scss +19 -0
  102. package/navigation/tabnav.scss +7 -2
  103. package/navigation/underline-nav.scss +73 -23
  104. package/package.json +18 -16
  105. package/pagination/pagination.scss +24 -3
  106. package/popover/popover.scss +1 -0
  107. package/support/mixins/color-modes.scss +2 -0
  108. package/support/mixins/layout.scss +1 -0
  109. package/support/mixins/misc.scss +47 -1
  110. package/support/variables/layout.scss +1 -0
  111. package/timeline/timeline-item.scss +2 -0
  112. package/toasts/toasts.scss +7 -4
  113. package/utilities/details.scss +81 -4
@@ -13,11 +13,13 @@
13
13
  white-space: nowrap;
14
14
  vertical-align: middle;
15
15
  user-select: none;
16
- background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%), var(--color-mktg-btn-bg) !important;
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
- &:disabled {
59
- box-shadow: none !important;
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
- &:active {
64
- outline: none;
65
- // stylelint-disable-next-line primer/box-shadow
66
- box-shadow: 0 0 0 transparent;
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
- // stylelint-disable-next-line primer/box-shadow
142
- box-shadow: rgba(46, 164, 79, 0.45) 0 0 0 4px !important;
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,18 +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;
24
29
 
25
30
  @if (map-get($pairing, 'size') >= $mktg-header-weight-threshold) { font-weight: $mktg-header-weight-large !important; }
26
31
 
27
32
  @if (nth($sizes, 1) != nth($sizes, 2)) {
28
33
  @include breakpoint(md) {
34
+ // stylelint-disable-next-line function-no-unknown
29
35
  font-size: map-get($pairing-md, 'size') !important;
36
+ // stylelint-disable-next-line function-no-unknown
30
37
  line-height: map-get($pairing-md, 'lh') !important;
31
38
 
32
39
  @if (map-get($pairing-md, 'size') >= $mktg-header-spacing-threshold and map-get($pairing, 'size') < $mktg-header-spacing-threshold) {
@@ -41,7 +48,9 @@
41
48
 
42
49
  @if (nth($sizes, 2) != nth($sizes, 3)) {
43
50
  @include breakpoint(lg) {
51
+ // stylelint-disable-next-line function-no-unknown
44
52
  font-size: map-get($pairing-lg, 'size') !important;
53
+ // stylelint-disable-next-line function-no-unknown
45
54
  line-height: map-get($pairing-lg, 'lh') !important;
46
55
 
47
56
  @if (map-get($pairing-lg, 'size') >= $mktg-header-spacing-threshold and map-get($pairing-md, 'size') < $mktg-header-spacing-threshold) {
@@ -70,11 +79,16 @@
70
79
 
71
80
  @each $body, $sizes in $mktg-bodies {
72
81
  .f#{$body}-mktg {
82
+ // stylelint-disable-next-line function-no-unknown
73
83
  $pairing: map-get($mktg-body-pairings, nth($sizes, 1));
84
+ // stylelint-disable-next-line function-no-unknown
74
85
  $pairing-md: map-get($mktg-body-pairings, nth($sizes, 2));
86
+ // stylelint-disable-next-line function-no-unknown
75
87
  $pairing-lg: map-get($mktg-body-pairings, nth($sizes, 3));
76
88
 
89
+ // stylelint-disable-next-line function-no-unknown
77
90
  font-size: map-get($pairing, 'size') !important;
91
+ // stylelint-disable-next-line function-no-unknown
78
92
  line-height: map-get($pairing, 'lh') !important;
79
93
 
80
94
  @if (map-get($pairing, 'size') >= $mktg-body-spacing-threshold) { letter-spacing: $mktg-body-spacing-large !important; }
@@ -83,7 +97,9 @@
83
97
 
84
98
  @if (nth($sizes, 1) != nth($sizes, 2)) {
85
99
  @include breakpoint(md) {
100
+ // stylelint-disable-next-line function-no-unknown
86
101
  font-size: map-get($pairing-md, 'size') !important;
102
+ // stylelint-disable-next-line function-no-unknown
87
103
  line-height: map-get($pairing-md, 'lh') !important;
88
104
 
89
105
  @if (map-get($pairing-md, 'size') >= $mktg-body-spacing-threshold and map-get($pairing, 'size') < $mktg-body-spacing-threshold) {
@@ -98,7 +114,9 @@
98
114
 
99
115
  @if (nth($sizes, 2) != nth($sizes, 3)) {
100
116
  @include breakpoint(lg) {
117
+ // stylelint-disable-next-line function-no-unknown
101
118
  font-size: map-get($pairing-lg, 'size') !important;
119
+ // stylelint-disable-next-line function-no-unknown
102
120
  line-height: map-get($pairing-lg, 'lh') !important;
103
121
 
104
122
  @if (map-get($pairing-lg, 'size') >= $mktg-body-spacing-threshold and map-get($pairing-md, 'size') < $mktg-body-spacing-threshold) {
@@ -116,32 +134,3 @@
116
134
  .text-medium {
117
135
  font-weight: $font-weight-medium !important;
118
136
  }
119
-
120
- // Pullquote
121
-
122
- @mixin pullquote {
123
- padding-top: 0;
124
- padding-bottom: 0;
125
- // stylelint-disable-next-line primer/spacing
126
- padding-left: $spacer;
127
- margin-bottom: $spacer-4;
128
- font-family: $mono-font;
129
- font-size: $h4-size;
130
- line-height: 1.4;
131
- color: var(--color-color-text-secondary);
132
- border-left: 3px solid var(--color-border-default);
133
-
134
- @include breakpoint(md) {
135
- // stylelint-disable-next-line primer/spacing
136
- padding-left: $spacer * 1.5;
137
- margin-bottom: $spacer-5;
138
- // stylelint-disable-next-line primer/spacing
139
- margin-left: (-$spacer * 1.5) - 3px;
140
- font-size: 18px;
141
- line-height: $lh-default;
142
- }
143
- }
144
-
145
- .pullquote {
146
- @include pullquote;
147
- }
@@ -27,7 +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
+ // stylelint-disable-next-line primer/spacing, function-no-unknown
31
31
  .offset#{$variant}-n#{$offset} { margin-left: -($offset * 0.0833333333 * 100%); }
32
32
  }
33
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.
@@ -45,6 +47,22 @@
45
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 {
@@ -22,7 +22,9 @@
22
22
  border-top-left-radius: $border-radius;
23
23
  border-top-right-radius: $border-radius;
24
24
 
25
- &::before { border-top-left-radius: $border-radius; }
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 { border-bottom-left-radius: $border-radius; }
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 {
@@ -43,16 +43,9 @@
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 {
@@ -94,11 +87,9 @@
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
95
  .SideNav-subItem[aria-current]:not([aria-current='false']),
@@ -1,3 +1,5 @@
1
+ // stylelint-disable selector-max-specificity
2
+
1
3
  // Needs refactoring
2
4
  // Sub nav
3
5
  .subnav {
@@ -46,6 +48,22 @@
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
 
@@ -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,104 @@
1
+ $nav-height: $spacer-3 * 3 !default; // 48px
2
+
1
3
  .UnderlineNav {
2
4
  display: flex;
5
+ min-height: $nav-height;
3
6
  overflow-x: auto;
4
7
  overflow-y: hidden;
5
8
  // stylelint-disable-next-line primer/box-shadow
6
9
  box-shadow: inset 0 -1px 0 var(--color-border-muted);
10
+ -webkit-overflow-scrolling: auto;
7
11
  justify-content: space-between;
12
+
13
+ .Counter {
14
+ margin-left: $spacer-2;
15
+ color: var(--color-fg-default);
16
+ background-color: var(--color-neutral-muted);
17
+
18
+ &--primary {
19
+ color: var(--color-fg-on-emphasis);
20
+ background-color: var(--color-neutral-emphasis);
21
+ }
22
+ }
8
23
  }
9
24
 
10
25
  .UnderlineNav-body {
11
26
  display: flex;
27
+ align-items: center;
28
+ gap: $spacer-2;
29
+ list-style: none;
12
30
  }
13
31
 
14
32
  .UnderlineNav-item {
15
- padding: $spacer-2 $spacer-3;
33
+ position: relative;
34
+ display: flex;
35
+ padding: 0 $spacer-2;
16
36
  font-size: $body-font-size;
17
37
  // stylelint-disable-next-line primer/typography
18
38
  line-height: 30px;
19
39
  color: var(--color-fg-default);
20
40
  text-align: center;
21
41
  white-space: nowrap;
42
+ cursor: pointer;
22
43
  background-color: transparent;
23
44
  border: 0;
24
- // stylelint-disable-next-line primer/borders
25
- border-bottom: 2px $border-style transparent;
45
+ border-radius: $border-radius;
46
+ align-items: center;
26
47
 
27
48
  &:hover,
28
- &:focus {
49
+ &:focus,
50
+ &:focus-visible {
29
51
  color: var(--color-fg-default);
30
52
  text-decoration: none;
31
53
  border-bottom-color: var(--color-neutral-muted);
32
- outline: 1px dotted transparent; // Support Firefox custom colors
33
- outline-offset: -1px;
54
+ outline-offset: -2px;
34
55
  transition: border-bottom-color 0.12s ease-out;
35
56
  }
36
57
 
58
+ // renders a visibly hidden "copy" of the label in bold, reserving box space for when label becomes bold on selected
59
+ [data-content]::before {
60
+ display: block;
61
+ height: 0;
62
+ font-weight: $font-weight-bold;
63
+ visibility: hidden;
64
+ content: attr(data-content);
65
+ }
66
+
67
+ // increase touch target area
68
+ &::before {
69
+ @include minTouchTarget($min-height: $nav-height);
70
+ }
71
+
72
+ // hover state was "sticking" on mobile after click
73
+ @media (pointer: fine) {
74
+ &:hover {
75
+ color: var(--color-fg-default);
76
+ text-decoration: none;
77
+ background: var(--color-action-list-item-default-hover-bg);
78
+ transition: background 0.12s ease-out;
79
+ }
80
+ }
81
+
37
82
  &.selected,
38
83
  &[role='tab'][aria-selected='true'],
39
84
  &[aria-current]:not([aria-current='false']) {
40
85
  font-weight: $font-weight-bold;
41
86
  color: var(--color-fg-default);
42
87
  border-bottom-color: var(--color-primer-border-active);
43
- outline: 1px dotted transparent; // Support Firefox custom colors
44
- outline-offset: -1px;
88
+ outline-offset: -8px;
45
89
 
46
- .UnderlineNav-octicon {
47
- color: var(--color-fg-muted);
90
+ // current/selected underline
91
+ &::after {
92
+ position: absolute;
93
+ right: 50%;
94
+ // 48px total height / 2 (24px) + 1px
95
+ bottom: calc(50% - 25px);
96
+ width: 100%;
97
+ height: 2px;
98
+ content: '';
99
+ background: var(--color-primer-border-active);
100
+ border-radius: $border-radius;
101
+ transform: translate(50%, -50%);
48
102
  }
49
103
  }
50
104
  }
@@ -63,22 +117,18 @@
63
117
 
64
118
  .UnderlineNav--full {
65
119
  display: block;
66
- }
67
120
 
68
- .UnderlineNav-octicon {
69
- margin-right: $spacer-1;
70
- color: var(--color-fg-subtle);
121
+ // required for underline to align with additional wrapper element
122
+ .UnderlineNav-body {
123
+ min-height: $nav-height;
124
+ }
71
125
  }
72
126
 
73
- .UnderlineNav .Counter {
74
- margin-left: $spacer-1;
75
- color: var(--color-fg-default);
76
- background-color: var(--color-neutral-muted);
77
-
78
- &--primary {
79
- color: var(--color-fg-on-emphasis);
80
- background-color: var(--color-neutral-emphasis);
81
- }
127
+ .UnderlineNav-octicon {
128
+ display: inline !important;
129
+ margin-right: $spacer-2;
130
+ color: var(--color-fg-muted);
131
+ fill: var(--color-fg-muted);
82
132
  }
83
133
 
84
134
  .UnderlineNav-container {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/css",
3
- "version": "19.8.2",
3
+ "version": "20.0.0-rc.04a33ecf",
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,6 +23,8 @@
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\"",
28
30
  "stylelint": "stylelint --quiet --rd 'src/**/*.scss'",
@@ -43,33 +45,33 @@
43
45
  },
44
46
  "devDependencies": {
45
47
  "@changesets/changelog-github": "0.4.4",
46
- "@changesets/cli": "2.20.0",
48
+ "@changesets/cli": "2.22.0",
47
49
  "@github/prettier-config": "0.0.4",
48
50
  "@koddsson/postcss-sass": "5.0.1",
49
- "@primer/stylelint-config": "^12.3.3",
50
- "autoprefixer": "10.4.2",
51
+ "@primer/stylelint-config": "^12.4.0",
52
+ "autoprefixer": "10.4.4",
51
53
  "chokidar-cli": "3.0.0",
52
- "cssstats": "4.0.2",
53
- "eslint": "8.10.0",
54
- "eslint-plugin-github": "4.3.5",
54
+ "cssstats": "4.0.5",
55
+ "eslint": "8.13.0",
56
+ "eslint-plugin-github": "4.3.6",
55
57
  "eslint-plugin-jest": "26.0.0",
56
58
  "eslint-plugin-prettier": "4.0.0",
57
59
  "filesize": "8.0.7",
58
60
  "front-matter": "4.0.2",
59
61
  "fs-extra": "10.0.1",
60
- "globby": "13.1.0",
61
- "jest": "27.4.7",
62
+ "globby": "13.1.1",
63
+ "jest": "27.5.1",
62
64
  "js-yaml": "4.1.0",
63
- "postcss": "8.4.7",
65
+ "postcss": "8.4.12",
64
66
  "postcss-calc": "8.2.4",
65
- "postcss-import": "14.0.2",
66
- "postcss-load-config": "3.1.0",
67
+ "postcss-import": "14.1.0",
68
+ "postcss-load-config": "3.1.4",
67
69
  "postcss-scss": "4.0.3",
68
70
  "postcss-simple-vars": "6.0.3",
69
- "prettier": "2.5.1",
70
- "semver": "7.3.5",
71
- "stylelint": "14.5.3",
72
- "table": "6.7.5"
71
+ "prettier": "2.6.2",
72
+ "semver": "7.3.7",
73
+ "stylelint": "14.6.1",
74
+ "table": "6.8.0"
73
75
  },
74
76
  "jest": {
75
77
  "testEnvironment": "node",
@@ -24,7 +24,6 @@
24
24
  &:focus {
25
25
  text-decoration: none;
26
26
  border-color: var(--color-border-default);
27
- outline: 0;
28
27
  transition-duration: 0.1s;
29
28
  }
30
29
 
@@ -74,13 +73,35 @@
74
73
  // chevron-left
75
74
  .previous_page::before {
76
75
  margin-right: $spacer-1;
77
- clip-path: polygon(9.8px 12.8px, 8.7px 12.8px, 4.5px 8.5px, 4.5px 7.5px, 8.7px 3.2px, 9.8px 4.3px, 6.1px 8px, 9.8px 11.7px, 9.8px 12.8px);
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
+ );
78
88
  }
79
89
 
80
90
  // chevron-right
81
91
  .next_page::after {
82
92
  margin-left: $spacer-1;
83
- clip-path: polygon(6.2px 3.2px, 7.3px 3.2px, 11.5px 7.5px, 11.5px 8.5px, 7.3px 12.8px, 6.2px 11.7px, 9.9px 8px, 6.2px 4.3px, 6.2px 3.2px);
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
+ );
84
105
  }
85
106
  }
86
107
 
@@ -122,6 +122,7 @@
122
122
  }
123
123
 
124
124
  &::before {
125
+ // stylelint-disable-next-line function-no-unknown
125
126
  margin-top: -($spacer-2 + 1);
126
127
  }
127
128
 
@@ -84,10 +84,12 @@
84
84
  @each $name, $value in $color-map {
85
85
  @each $type, $color in $value {
86
86
  @if $type == dark {
87
+ // stylelint-disable-next-line function-no-unknown
87
88
  $dark-colors: append($dark-colors, (--color-#{$name}, #{$color}));
88
89
  }
89
90
 
90
91
  @else {
92
+ // stylelint-disable-next-line function-no-unknown
91
93
  $light-colors: append($light-colors, (--color-#{$name}, #{$color}));
92
94
  }
93
95
  }
@@ -7,6 +7,7 @@
7
7
 
8
8
  @else {
9
9
  // Retrieves the value from the key
10
+ // stylelint-disable-next-line function-no-unknown
10
11
  $value: map-get($breakpoints, $breakpoint);
11
12
 
12
13
  // If the key exists in the map