@primer/css 20.0.0-rc.f7fbc78b → 20.1.0-rc.c155977b

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.
@@ -80,6 +80,11 @@
80
80
  h5,
81
81
  h6 {
82
82
  display: inline-block;
83
+
84
+ .anchor {
85
+ // stylelint-disable-next-line primer/spacing
86
+ margin-left: -40px;
87
+ }
83
88
  }
84
89
 
85
90
  h1,
@@ -1,4 +1,3 @@
1
- // stylelint-disable selector-max-specificity
2
1
  $nav-height: $spacer-3 * 3 !default; // 48px
3
2
 
4
3
  .UnderlineNav {
@@ -10,6 +9,17 @@ $nav-height: $spacer-3 * 3 !default; // 48px
10
9
  box-shadow: inset 0 -1px 0 var(--color-border-muted);
11
10
  -webkit-overflow-scrolling: auto;
12
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
+ }
13
23
  }
14
24
 
15
25
  .UnderlineNav-body {
@@ -41,65 +51,54 @@ $nav-height: $spacer-3 * 3 !default; // 48px
41
51
  color: var(--color-fg-default);
42
52
  text-decoration: none;
43
53
  border-bottom-color: var(--color-neutral-muted);
44
- outline-offset: -8px;
54
+ outline-offset: -2px;
45
55
  transition: border-bottom-color 0.12s ease-out;
56
+ }
46
57
 
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
- }
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
+ }
60
66
 
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
- }
67
+ // increase touch target area
68
+ &::before {
69
+ @include minTouchTarget($min-height: $nav-height);
70
+ }
70
71
 
71
- &.selected,
72
- &[role='tab'][aria-selected='true'],
73
- &[aria-current]:not([aria-current='false']) {
74
- font-weight: $font-weight-bold;
72
+ // hover state was "sticking" on mobile after click
73
+ @media (pointer: fine) {
74
+ &:hover {
75
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
- }
76
+ text-decoration: none;
77
+ background: var(--color-action-list-item-default-hover-bg);
78
+ transition: background 0.12s ease-out;
92
79
  }
93
80
  }
94
81
 
95
- .Counter {
96
- margin-left: $spacer-2;
82
+ &.selected,
83
+ &[role='tab'][aria-selected='true'],
84
+ &[aria-current]:not([aria-current='false']) {
85
+ font-weight: $font-weight-bold;
97
86
  color: var(--color-fg-default);
98
- background-color: var(--color-neutral-muted);
87
+ border-bottom-color: var(--color-primer-border-active);
88
+ outline-offset: -8px;
99
89
 
100
- &--primary {
101
- color: var(--color-fg-on-emphasis);
102
- background-color: var(--color-neutral-emphasis);
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%);
103
102
  }
104
103
  }
105
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/css",
3
- "version": "20.0.0-rc.f7fbc78b",
3
+ "version": "20.1.0-rc.c155977b",
4
4
  "description": "The CSS implementation of GitHub's Primer Design System",
5
5
  "homepage": "https://primer.style/css",
6
6
  "author": "GitHub, Inc.",
@@ -49,12 +49,12 @@
49
49
  "@github/prettier-config": "0.0.4",
50
50
  "@koddsson/postcss-sass": "5.0.1",
51
51
  "@primer/stylelint-config": "^12.4.0",
52
- "autoprefixer": "10.4.4",
52
+ "autoprefixer": "10.4.6",
53
53
  "chokidar-cli": "3.0.0",
54
54
  "cssstats": "4.0.5",
55
- "eslint": "8.13.0",
55
+ "eslint": "8.14.0",
56
56
  "eslint-plugin-github": "4.3.6",
57
- "eslint-plugin-jest": "26.0.0",
57
+ "eslint-plugin-jest": "26.1.5",
58
58
  "eslint-plugin-prettier": "4.0.0",
59
59
  "filesize": "8.0.7",
60
60
  "front-matter": "4.0.2",
@@ -62,11 +62,11 @@
62
62
  "globby": "13.1.1",
63
63
  "jest": "27.5.1",
64
64
  "js-yaml": "4.1.0",
65
- "postcss": "8.4.12",
65
+ "postcss": "8.4.13",
66
66
  "postcss-calc": "8.2.4",
67
67
  "postcss-import": "14.1.0",
68
68
  "postcss-load-config": "3.1.4",
69
- "postcss-scss": "4.0.3",
69
+ "postcss-scss": "4.0.4",
70
70
  "postcss-simple-vars": "6.0.3",
71
71
  "prettier": "2.6.2",
72
72
  "semver": "7.3.7",
@@ -243,3 +243,8 @@
243
243
  .user-select-none {
244
244
  user-select: none !important;
245
245
  }
246
+
247
+ /* Make text capitalized (transforms first character to uppercase) */
248
+ .text-capitalize {
249
+ text-transform: capitalize !important;
250
+ }