Skip to content

Commit a595fa3

Browse files
authored
[Text] Add responsive styling to heading2xl-heading4xl variants (#7538)
### WHY are these changes introduced? [Storybook url](https://5d559397bae39100201eedc1-yvdsjjnrsr.chromatic.com/?path=/story/all-components-text--variants). This was originally reviewed and approved in the `typography-beta-release` [PR](#7068) but needs to ship first to unblock migrations. ### WHAT is this pull request doing? Adds responsive styling to `heading2xl` to `heading4xl` variants to support the functionality that `DisplayText` originally supported. <!-- ℹ️ Delete the following for small / trivial changes --> ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) Storybook url. ### 🎩 checklist - [x] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [x] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
1 parent 77d75f9 commit a595fa3

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

.changeset/eighty-pumas-repair.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': minor
3+
---
4+
5+
Added responsive styling to `Text` for `heading2xl`, `heading3xl`, and `heading4xl` variants

polaris-react/src/components/Text/Text.scss

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,33 @@
9393
}
9494

9595
.heading2xl {
96-
font-size: var(--p-font-size-500);
97-
line-height: var(--p-font-line-height-5);
96+
font-size: var(--p-font-size-300);
97+
line-height: var(--p-font-line-height-3);
98+
99+
@media #{$p-breakpoints-md-up} {
100+
font-size: var(--p-font-size-500);
101+
line-height: var(--p-font-line-height-5);
102+
}
98103
}
99104

100105
.heading3xl {
101-
font-size: var(--p-font-size-600);
102-
line-height: var(--p-font-line-height-6);
106+
font-size: var(--p-font-size-400);
107+
line-height: var(--p-font-line-height-4);
108+
109+
@media #{$p-breakpoints-md-up} {
110+
font-size: var(--p-font-size-600);
111+
line-height: var(--p-font-line-height-6);
112+
}
103113
}
104114

105115
.heading4xl {
106-
font-size: var(--p-font-size-700);
107-
line-height: var(--p-font-line-height-7);
116+
font-size: var(--p-font-size-600);
117+
line-height: var(--p-font-line-height-6);
118+
119+
@media #{$p-breakpoints-md-up} {
120+
font-size: var(--p-font-size-700);
121+
line-height: var(--p-font-line-height-7);
122+
}
108123
}
109124

110125
.bodySm {

0 commit comments

Comments
 (0)