Skip to content

Commit 6e853a1

Browse files
committed
Add responsive variants to line-height utilities
1 parent b1d37d1 commit 6e853a1

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/utilities/typography.scss

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,19 @@
161161
// Close to commonly used line-heights. Most line-heights
162162
// combined with type size equate to whole pixels.
163163
// Will be improved with future typography scale updates.
164-
/* Set the line height to ultra condensed */
165-
.lh-condensed-ultra { line-height: $lh-condensed-ultra !important; }
166-
/* Set the line height to condensed */
167-
.lh-condensed { line-height: $lh-condensed !important; }
168-
/* Set the line height to default */
169-
.lh-default { line-height: $lh-default !important; }
170-
/* Set the line height to zero */
171-
.lh-0 { line-height: 0 !important; }
164+
// Responsive line-height
165+
@each $breakpoint, $variant in $responsive-variants {
166+
@include breakpoint($breakpoint) {
167+
/* Set the line height to ultra condensed */
168+
.lh#{$variant}-condensed-ultra { line-height: $lh-condensed-ultra !important; }
169+
/* Set the line height to condensed */
170+
.lh#{$variant}-condensed { line-height: $lh-condensed !important; }
171+
/* Set the line height to default */
172+
.lh#{$variant}-default { line-height: $lh-default !important; }
173+
/* Set the line height to zero */
174+
.lh#{$variant}-0 { line-height: 0 !important; }
175+
}
176+
}
172177

173178
// Text alignments
174179
// Responsive text alignment

0 commit comments

Comments
 (0)