Skip to content

Commit e5f84f0

Browse files
authored
[Text] Add responsive styling for headingXl and headingLg variants (#7546)
### WHY are these changes introduced? There seems to be missing responsive styles for the `headingLg` Text variant so that it can map to `<DisplayText as="small">`. Also adds responsive styling to `headingXl`. ### WHAT is this pull request doing? Adds responsive styling to the `headingXl` and `headingLg` variants for the `mdUp` breakpoint. [Storybook URL](https://5d559397bae39100201eedc1-erawlsvvlo.chromatic.com/?path=/story/all-components-text--variants) — use the breakpointSm to see changes. <!-- ℹ️ 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](https://5d559397bae39100201eedc1-erawlsvvlo.chromatic.com/?path=/story/all-components-text--variants) — use the breakpointSm to see changes. ### 🎩 checklist - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] 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 e53f790 commit e5f84f0

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.changeset/long-bugs-behave.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 the `Text` `headingXl` and `headingLg` variants

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,23 @@
8383
}
8484

8585
.headingLg {
86-
font-size: var(--p-font-size-300);
87-
line-height: var(--p-font-line-height-3);
86+
font-size: var(--p-font-size-200);
87+
line-height: var(--p-font-line-height-2);
88+
89+
@media #{$p-breakpoints-md-up} {
90+
font-size: var(--p-font-size-300);
91+
line-height: var(--p-font-line-height-3);
92+
}
8893
}
8994

9095
.headingXl {
91-
font-size: var(--p-font-size-400);
92-
line-height: var(--p-font-line-height-4);
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-400);
101+
line-height: var(--p-font-line-height-4);
102+
}
93103
}
94104

95105
.heading2xl {

0 commit comments

Comments
 (0)