@primer/brand-css 0.74.0-rc.817e3cc4 → 0.74.0-rc.ad4a6851

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.
@@ -281,41 +281,21 @@
281
281
 
282
282
  .CTABanner-heading code,
283
283
  .CTABanner-description code {
284
- font-size: inherit;
285
284
  font-family: var(--brand-fontStack-monospace);
286
- background-color: var(--brand-color-canvas-default);
287
- padding: 0 var(--base-size-4) 0;
288
- margin-inline: var(--base-size-2);
289
- border: var(--brand-borderWidth-thin) solid var(--brand-color-border-default);
290
- border-radius: var(--brand-borderRadius-small);
291
- box-shadow: var(--brand-borderWidth-thin) var(--brand-borderWidth-thin) 0 0 var(--brand-color-border-default);
292
- }
293
-
294
- .CTABanner--bgColor-default .CTABanner-heading code,
295
- .CTABanner--bgColor-default .CTABanner-description code {
296
- background-color: var(--brand-color-canvas-subtle);
297
- }
298
-
299
- .CTABanner-description code {
300
- padding: 0 var(--base-size-4) 0;
301
- }
302
-
303
- .CTABanner-heading.CTABanner-heading:has(code) {
304
- line-height: calc(1lh * 2);
305
- }
306
-
307
- @media screen and (min-width: 63.25rem) {
308
- .CTABanner--variant-balanced .CTABanner-heading.CTABanner-heading:has(code) {
309
- line-height: calc(1lh * 2.8);
310
- }
311
- }
312
-
313
- .CTABanner--variant-minimal .CTABanner-heading.CTABanner-heading:has(code) {
314
- line-height: calc(1lh * 1.9);
315
- }
316
-
317
- .CTABanner-description.CTABanner-description:has(code) {
318
- line-height: calc(1lh * 1.25);
285
+ /* optical resize relative to parent. monospace tends to be a little taller than sans-serif */
286
+ font-size: calc(1em - 1px);
287
+ font-weight: var(--base-text-weight-regular);
288
+ /* Keep the background clear of adjacent lines when large text wraps. */
289
+ line-height: 1.6;
290
+ color: var(--brand-InlineCode-color-fg-default);
291
+ background-color: var(--brand-InlineCode-bgColor);
292
+ padding-block: 0;
293
+ padding-inline: var(--base-size-4);
294
+ border-radius: var(--base-size-2);
295
+ white-space: normal;
296
+ overflow-wrap: anywhere;
297
+ -webkit-box-decoration-break: clone;
298
+ box-decoration-break: clone;
319
299
  }
320
300
 
321
301
  .CTABanner-buttonGroup {
@@ -192,25 +192,21 @@
192
192
 
193
193
  .Card__link code,
194
194
  .Card__description code {
195
- font-size: inherit;
196
195
  font-family: var(--brand-fontStack-monospace);
197
- background-color: var(--brand-color-canvas-subtle);
198
- padding: 0 var(--base-size-4) var(--base-size-2);
199
- margin-inline: var(--base-size-2);
200
- border: var(--brand-borderWidth-thin) solid var(--brand-color-border-default);
201
- border-radius: var(--brand-borderRadius-small);
202
- box-shadow: var(--brand-borderWidth-thin) var(--brand-borderWidth-thin) 0 0 var(--brand-color-border-default);
203
- }
204
-
205
- .Card__description code {
206
- padding: var(--base-size-2) var(--base-size-4) 0;
207
- }
208
- .Card__link:has(code) {
209
- line-height: calc(1lh * 1.4);
210
- }
211
-
212
- .Card__description.Card__description:has(code) {
213
- line-height: calc(1lh * 1.25);
196
+ /* optical resize relative to parent. monospace tends to be a little taller than sans-serif */
197
+ font-size: calc(1em - 1px);
198
+ font-weight: var(--base-text-weight-regular);
199
+ /* Keep the background clear of adjacent lines when large text wraps. */
200
+ line-height: 1.6;
201
+ color: var(--brand-InlineCode-color-fg-default);
202
+ background-color: var(--brand-InlineCode-bgColor);
203
+ padding-block: 0;
204
+ padding-inline: var(--base-size-4);
205
+ border-radius: var(--base-size-2);
206
+ white-space: normal;
207
+ overflow-wrap: anywhere;
208
+ -webkit-box-decoration-break: clone;
209
+ box-decoration-break: clone;
214
210
  }
215
211
 
216
212
  .Card--disableAnimation:hover .Card__link {
@@ -0,0 +1,38 @@
1
+ .InlineCode {
2
+ font-family: var(--brand-fontStack-monospace);
3
+ /* optical resize relative to parent. monospace tends to be a little taller than sans-serif */
4
+ font-size: calc(1em - 1px);
5
+ font-weight: var(--base-text-weight-regular);
6
+ /* Keep the background clear of adjacent lines when large text wraps. */
7
+ line-height: 1.6;
8
+ color: var(--brand-InlineCode-color-fg-default);
9
+ background-color: var(--brand-InlineCode-bgColor);
10
+ padding-block: 0;
11
+ padding-inline: var(--base-size-4);
12
+ border-radius: var(--base-size-2);
13
+ -webkit-box-decoration-break: clone;
14
+ box-decoration-break: clone;
15
+ white-space: normal;
16
+ overflow-wrap: anywhere;
17
+ }
18
+
19
+ .InlineCode.InlineCode--nowrap {
20
+ white-space: nowrap;
21
+ overflow-wrap: normal;
22
+ }
23
+
24
+ :where(h1, h2, h3, h4, h5, h6) .InlineCode {
25
+ border-radius: var(--base-size-4);
26
+ }
27
+
28
+ :where(h1, h2, h3, h4, h5, h6) .InlineCode__text {
29
+ color: var(--brand-InlineCode-color-fg-heading);
30
+ }
31
+
32
+ .InlineCode__text {
33
+ position: relative;
34
+ /* TODO: this is some optical correction, but doesn't work well for uppercase. */
35
+ inset-block-start: -0.03em;
36
+ -webkit-font-smoothing: antialiased;
37
+ -moz-osx-font-smoothing: auto;
38
+ }
@@ -1,44 +1,160 @@
1
- .Footer {
1
+ .MinimalFooter {
2
2
  position: relative;
3
+ border-top: var(--brand-borderWidth-thick) solid var(--brand-footer-borderColor);
3
4
  background-color: var(--brand-footer-bg-color);
4
5
  }
5
6
 
7
+ .MinimalFooter--withFootnotes {
8
+ border-top: 0;
9
+ }
10
+
6
11
  /**
7
- * Footer shared styles
12
+ * MinimalFooter shared styles
8
13
  */
9
- .Footer__container {
14
+ .MinimalFooter__container {
10
15
  max-width: var(--brand-footer-max-width, 1280px);
11
- padding: 0 28px; /* should match SubdomainNavBar */
16
+ padding-inline: var(--base-size-20);
12
17
  margin-right: auto;
13
18
  margin-left: auto;
14
19
  }
15
20
 
21
+ @media screen and (min-width: 48rem) {
22
+ .MinimalFooter__container {
23
+ padding-inline: var(--base-size-32);
24
+ }
25
+ }
26
+
16
27
  /**
17
- * Footer terms section
28
+ * MinimalFooter terms section
18
29
  */
19
- .Footer__terms {
30
+ .MinimalFooter__terms {
20
31
  padding: var(--base-size-48) 0;
21
32
  }
22
33
 
23
- .Footer__terms-item {
34
+ .MinimalFooter__terms-item {
24
35
  margin-bottom: var(--base-size-24);
25
36
  }
26
37
 
27
- .Footer__terms-item sup {
38
+ .MinimalFooter__terms-item sup {
28
39
  font-size: var(--base-size-12);
29
40
  vertical-align: super;
30
41
  display: inline-block;
31
42
  margin-right: var(--base-size-4);
32
43
  }
33
44
 
34
- .Footer__terms-item:last-child {
45
+ .MinimalFooter__terms-item:last-child {
35
46
  margin-bottom: 0;
36
47
  }
37
48
 
38
49
  /**
39
- * Footer social and logomarks section
50
+ * MinimalFooter top section
51
+ */
52
+ .MinimalFooter__top {
53
+ padding-top: var(--base-size-48);
54
+ padding-bottom: var(--base-size-32);
55
+ border-bottom: var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle);
56
+ }
57
+
58
+ .MinimalFooter__top-row {
59
+ display: grid;
60
+ grid-template-columns: auto 1fr;
61
+ align-items: center;
62
+ gap: var(--base-size-24);
63
+ }
64
+
65
+ .MinimalFooter__top-actions {
66
+ display: contents;
67
+ }
68
+
69
+ .MinimalFooter__top-actions > .MinimalFooter__links {
70
+ grid-column: 1 / -1;
71
+ grid-row: 2;
72
+ justify-content: flex-start;
73
+ }
74
+
75
+ .MinimalFooter__top-actions > .MinimalFooter__backToTop {
76
+ grid-column: 2;
77
+ grid-row: 1;
78
+ justify-self: flex-end;
79
+ }
80
+
81
+ .MinimalFooter__logo {
82
+ display: inline-flex;
83
+ color: var(--brand-color-text-default);
84
+ }
85
+
86
+ .MinimalFooter__logo > svg {
87
+ width: var(--base-size-24);
88
+ height: var(--base-size-24);
89
+ }
90
+
91
+ .MinimalFooter__bottom {
92
+ padding-top: var(--base-size-32);
93
+ padding-bottom: var(--base-size-32);
94
+ }
95
+
96
+ @media screen and (min-width: 80rem) {
97
+ .MinimalFooter__top {
98
+ padding-top: var(--base-size-32);
99
+ }
100
+
101
+ .MinimalFooter__top-row {
102
+ display: flex;
103
+ justify-content: space-between;
104
+ }
105
+
106
+ .MinimalFooter__top-actions {
107
+ display: flex;
108
+ flex: 1;
109
+ flex-wrap: wrap;
110
+ align-items: center;
111
+ justify-content: flex-end;
112
+ gap: var(--base-size-20);
113
+ min-width: 0;
114
+ }
115
+
116
+ .MinimalFooter__top-actions > .MinimalFooter__links {
117
+ justify-content: flex-end;
118
+ }
119
+
120
+ .MinimalFooter__logo > svg {
121
+ width: var(--base-size-32);
122
+ height: var(--base-size-32);
123
+ }
124
+ }
125
+
126
+ .MinimalFooter__section {
127
+ min-width: 0;
128
+ }
129
+
130
+ .MinimalFooter__section--footnotes {
131
+ border-bottom: var(--brand-borderWidth-thick) solid var(--brand-footer-borderColor);
132
+ background-color: var(--brand-color-canvas-default);
133
+ }
134
+
135
+ .MinimalFooter__section--center > .MinimalFooter__container {
136
+ padding-top: var(--base-size-32);
137
+ padding-bottom: var(--base-size-32);
138
+ }
139
+
140
+ .MinimalFooter__section--center + .MinimalFooter__section--bottom {
141
+ border-top: var(--brand-borderWidth-thin) solid var(--brand-color-border-subtle);
142
+ }
143
+
144
+ /**
145
+ * MinimalFooter bottom section
40
146
  */
41
- .Footer__social-links {
147
+ .MinimalFooter__bottom-row {
148
+ display: flex;
149
+ }
150
+
151
+ .MinimalFooter__bottom-row {
152
+ flex-direction: column;
153
+ align-items: flex-start;
154
+ gap: var(--base-size-24);
155
+ }
156
+
157
+ .MinimalFooter__social-links {
42
158
  display: flex;
43
159
  padding: 0;
44
160
  margin: 0;
@@ -48,96 +164,131 @@
48
164
  gap: var(--base-size-16);
49
165
  }
50
166
 
51
- .Footer__logomarks {
52
- border-top: var(--brand-borderWidth-thin) solid var(--brand-color-border-default);
53
- border-bottom: var(--brand-borderWidth-thin) solid var(--brand-color-border-default);
54
- }
55
-
56
- .Footer__logomarks,
57
- .Footer__legal-and-links {
58
- padding-top: var(--base-size-48);
59
- padding-bottom: var(--base-size-48);
60
- }
61
-
62
- .Footer__social-link {
167
+ .MinimalFooter__social-link {
63
168
  position: relative;
64
- }
65
-
66
- .Footer__social-link::before {
67
- content: '';
68
- display: block;
69
- position: absolute;
169
+ display: flex;
170
+ align-items: center;
171
+ justify-content: center;
70
172
  min-width: var(--base-size-24);
71
173
  min-height: var(--base-size-24);
72
174
  }
73
175
 
74
- .Footer__social-link:hover .Footer__social-icon,
75
- .Footer__social-link:focus-visible .Footer__social-icon {
176
+ .MinimalFooter__social-link:hover .MinimalFooter__social-icon,
177
+ .MinimalFooter__social-link:focus-visible .MinimalFooter__social-icon {
76
178
  filter: var(--brand-footer-socialIcon-hoverFilter);
77
179
  }
78
180
 
79
- .Footer__social-icon {
181
+ .MinimalFooter__social-icon {
80
182
  display: block;
81
- width: 24px;
183
+ width: auto;
82
184
  height: auto;
185
+ max-height: var(--base-size-20);
186
+ filter: var(--brand-footer-socialIcon-restFilter);
83
187
  }
84
188
 
85
- [data-color-mode='light'] .Footer__social-icon {
86
- filter: brightness(95%) saturate(100%);
189
+ .MinimalFooter__copyright {
190
+ margin: 0;
191
+ text-transform: uppercase;
87
192
  }
88
193
 
89
- /**
90
- * Footer legal section
91
- */
194
+ /* Keep the size-100 text rhythm, but use the approved 12px size token for footer chrome. */
195
+ .MinimalFooter__metaText {
196
+ font-size: var(--base-size-12);
197
+ }
92
198
 
93
- .Footer__copyright {
199
+ .MinimalFooter__links {
94
200
  display: flex;
95
- order: 2;
96
- padding-bottom: var(--base-size-4);
201
+ flex-wrap: wrap;
202
+ align-items: center;
203
+ gap: var(--base-size-20);
97
204
  }
98
205
 
99
- @media screen and (min-width: 48rem) {
100
- .Footer__copyright {
101
- order: 1;
102
- }
206
+ .MinimalFooter__link {
207
+ align-self: center;
208
+ color: var(--brand-color-text-muted);
209
+ text-decoration: none;
210
+ border: 0;
211
+ background-color: transparent;
212
+ cursor: pointer;
213
+ padding: 0;
214
+ text-transform: uppercase;
103
215
  }
104
216
 
105
- .Footer__links {
106
- order: 1;
217
+ .MinimalFooter__link:hover {
218
+ text-decoration: underline;
107
219
  }
108
220
 
109
221
  @media screen and (min-width: 48rem) {
110
- .Footer__links {
111
- order: 2;
222
+ .MinimalFooter__social-links {
223
+ gap: var(--base-size-20);
112
224
  }
113
225
  }
114
226
 
115
- .Footer__link {
116
- align-self: flex-start;
117
- color: var(--brand-color-text-muted);
118
- text-decoration: none;
119
- border-top: none;
120
- border-right: none;
121
- border-left: none;
122
- border-bottom: var(--brand-borderWidth-thin) solid transparent;
123
- background-color: inherit;
124
- cursor: pointer;
125
- padding: 0 0 var(--base-size-4) 0;
126
- transition: border var(--brand-animation-duration-fast) var(--brand-animation-easing-glide);
227
+ @media screen and (min-width: 80rem) {
228
+ .MinimalFooter__bottom-row {
229
+ flex-direction: row;
230
+ align-items: center;
231
+ justify-content: space-between;
232
+ }
127
233
  }
128
234
 
129
- .Footer__link:hover {
235
+ .MinimalFooter__backToTop {
236
+ -webkit-appearance: none;
237
+ -moz-appearance: none;
238
+ appearance: none;
239
+ display: inline-flex;
240
+ padding: 0;
241
+ border: 0;
130
242
  color: var(--brand-color-text-default);
131
- border-bottom-color: var(--brand-color-text-muted);
132
- text-decoration: none;
243
+ background: none;
244
+ cursor: pointer;
245
+ }
246
+
247
+ .MinimalFooter__backToTop:focus-visible {
248
+ outline: var(--base-size-4) solid var(--brand-color-focus);
249
+ outline-offset: var(--base-size-2);
250
+ }
251
+
252
+ .MinimalFooter__backToTop:disabled,
253
+ .MinimalFooter__backToTop[aria-disabled='true'] {
254
+ cursor: not-allowed;
255
+ }
256
+
257
+ .MinimalFooter__backToTop-content {
258
+ display: inline-flex;
259
+ align-items: center;
260
+ gap: var(--base-size-12);
261
+ }
262
+
263
+ .MinimalFooter__backToTop-icon {
264
+ display: inline-flex;
265
+ align-items: center;
266
+ justify-content: center;
267
+ border: var(--brand-borderWidth-thin) solid var(--brand-footer-backToTop-borderColor-rest);
268
+ border-radius: var(--base-size-6);
269
+ background-color: var(--brand-footer-backToTop-bgColor-rest);
270
+ min-width: var(--brand-footer-backToTop-minTarget);
271
+ min-height: var(--brand-footer-backToTop-minTarget);
272
+ transition: background-color var(--brand-animation-duration-fast) var(--brand-animation-easing-glide),
273
+ border-color var(--brand-animation-duration-fast) var(--brand-animation-easing-glide);
274
+ }
275
+
276
+ .MinimalFooter__backToTop:not([disabled], [aria-disabled='true']):hover .MinimalFooter__backToTop-icon {
277
+ border-color: var(--brand-footer-backToTop-borderColor-hover);
278
+ background-color: var(--brand-footer-backToTop-bgColor-hover);
279
+ }
280
+
281
+ .MinimalFooter__backToTop:not([disabled], [aria-disabled='true']):active .MinimalFooter__backToTop-icon {
282
+ border-color: var(--brand-footer-backToTop-borderColor-active);
283
+ background-color: var(--brand-footer-backToTop-bgColor-active);
133
284
  }
134
285
 
135
286
  /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
136
287
  @media (prefers-reduced-motion: reduce) {
137
- .Footer,
138
- .Footer::before,
139
- .Footer::after,
140
- .Footer * {
288
+ .MinimalFooter,
289
+ .MinimalFooter::before,
290
+ .MinimalFooter::after,
291
+ .MinimalFooter * {
141
292
  animation: none !important;
142
293
  transition: none !important;
143
294
  scroll-behavior: auto !important;
@@ -131,32 +131,21 @@
131
131
 
132
132
  .River__heading code,
133
133
  .River__text code {
134
- font-size: inherit;
135
- font-family: var(--brand-fontStack-monospace) !important;
136
- background-color: var(--brand-color-canvas-subtle);
137
- padding: 0 var(--base-size-4) var(--base-size-2);
138
- margin-inline: var(--base-size-2);
139
- border: var(--brand-borderWidth-thin) solid var(--brand-color-border-default);
140
- border-radius: var(--brand-borderRadius-small);
141
- box-shadow: var(--brand-borderWidth-thin) var(--brand-borderWidth-thin) 0 0 var(--brand-color-border-default);
142
- }
143
-
144
- .River__text code {
145
- padding: var(--base-size-2) var(--base-size-4) 0;
146
- }
147
-
148
- .River__heading-inner:has(code) {
149
- line-height: calc(1lh * 1.8);
150
- }
151
-
152
- @media screen and (min-width: 64rem) {
153
- .River__heading-inner:has(code) {
154
- line-height: calc(1lh * 2.1);
155
- }
156
- }
157
-
158
- .River__text:has(code) {
159
- line-height: calc(1lh * 1.1);
134
+ font-family: var(--brand-fontStack-monospace);
135
+ /* optical resize relative to parent. monospace tends to be a little taller than sans-serif */
136
+ font-size: calc(1em - 1px);
137
+ font-weight: var(--base-text-weight-regular);
138
+ /* Keep the background clear of adjacent lines when large text wraps. */
139
+ line-height: 1.6;
140
+ color: var(--brand-InlineCode-color-fg-default);
141
+ background-color: var(--brand-InlineCode-bgColor);
142
+ padding-block: 0;
143
+ padding-inline: var(--base-size-4);
144
+ border-radius: var(--base-size-2);
145
+ white-space: normal;
146
+ overflow-wrap: anywhere;
147
+ -webkit-box-decoration-break: clone;
148
+ box-decoration-break: clone;
160
149
  }
161
150
 
162
151
  .River__leadingComponent :is(img, picture),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/brand-css",
3
- "version": "0.74.0-rc.817e3cc4",
3
+ "version": "0.74.0-rc.ad4a6851",
4
4
  "description": "CSS stylesheets for Primer Brand components",
5
5
  "keywords": [
6
6
  "primer",