Skip to content

Commit bf92d87

Browse files
Blankslate: make compact styling the default (#4110)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8b8d542 commit bf92d87

2 files changed

Lines changed: 7 additions & 53 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/view-components": minor
3+
---
4+
5+
`Blankslate`: The heading and body text now use the smaller compact sizes by default, and the redundant responsive `@container` block has been removed since the compact typography it produced is now the default

app/components/primer/beta/blankslate.pcss

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* stylelint-disable-next-line selector-max-type */
1818
& p {
19-
font-size: var(--text-body-size-large);
19+
font-size: var(--text-body-size-medium);
2020
color: var(--fgColor-muted);
2121
}
2222

@@ -37,23 +37,19 @@
3737
}
3838

3939
.blankslate-icon {
40-
/* stylelint-disable-next-line primer/spacing */
4140
margin-right: var(--control-small-gap);
42-
/* stylelint-disable-next-line primer/spacing */
4341
margin-bottom: var(--stack-gap-condensed);
44-
/* stylelint-disable-next-line primer/spacing */
4542
margin-left: var(--control-small-gap);
4643
color: var(--fgColor-muted);
4744
}
4845

4946
.blankslate-image {
50-
/* stylelint-disable-next-line primer/spacing */
5147
margin-bottom: var(--stack-gap-normal);
5248
}
5349

5450
.blankslate-heading {
5551
margin-bottom: var(--base-size-4);
56-
font-size: var(--text-title-size-medium);
52+
font-size: var(--text-title-size-small);
5753
font-weight: var(--text-title-weight-medium);
5854
text-wrap: balance;
5955
}
@@ -63,16 +59,13 @@
6359
}
6460

6561
.blankslate-action {
66-
/* stylelint-disable-next-line primer/spacing */
6762
margin-top: var(--stack-gap-normal);
6863

6964
&:first-of-type {
70-
/* stylelint-disable-next-line primer/spacing */
7165
margin-top: var(--stack-gap-spacious);
7266
}
7367

7468
&:last-of-type {
75-
/* stylelint-disable-next-line primer/spacing */
7669
margin-bottom: var(--stack-gap-condensed);
7770
}
7871
}
@@ -102,7 +95,6 @@
10295

10396
/* stylelint-disable-next-line selector-max-type */
10497
& h3 {
105-
/* stylelint-disable-next-line primer/spacing */
10698
margin: var(--stack-gap-normal) 0;
10799

108100
/* font-size: $h3-size; // This doesn't actually make the text larger. Should this be $h2-size? */
@@ -121,46 +113,3 @@
121113
.blankslate-clean-background {
122114
border: 0;
123115
}
124-
125-
/* At the time these styles were written,
126-
`34rem` was our "small" breakpoint width */
127-
@container (max-width: 34rem) {
128-
.blankslate {
129-
--blankslate-outer-padding-block: var(--base-size-20);
130-
--blankslate-outer-padding-inline: var(--base-size-20);
131-
}
132-
133-
.blankslate-spacious {
134-
--blankslate-outer-padding-block: var(--base-size-44);
135-
--blankslate-outer-padding-inline: var(--base-size-28);
136-
}
137-
138-
.blankslate-icon {
139-
/* stylelint-disable-next-line primer/spacing */
140-
margin-bottom: var(--stack-gap-condensed);
141-
}
142-
143-
.blankslate-heading {
144-
font-size: var(--text-title-size-small);
145-
}
146-
147-
/* stylelint-disable-next-line selector-max-type */
148-
.blankslate p {
149-
font-size: var(--text-body-size-medium);
150-
}
151-
152-
.blankslate-action {
153-
/* stylelint-disable-next-line primer/spacing */
154-
margin-top: var(--stack-gap-condensed);
155-
156-
&:first-of-type {
157-
/* stylelint-disable-next-line primer/spacing */
158-
margin-top: var(--stack-gap-normal);
159-
}
160-
161-
&:last-of-type {
162-
/* stylelint-disable-next-line primer/spacing */
163-
margin-bottom: calc(var(--stack-gap-condensed) / 2);
164-
}
165-
}
166-
}

0 commit comments

Comments
 (0)