Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-X: Phasing component visual bug #500

Merged
merged 2 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/css/styles.min.css

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/scss/00_functions/_typography_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,14 @@

@return $-line-height;
}

@function get-font-size($style, $unremify: false) {
$-path: 'font.#{$style}';
$-font-size: get('#{$-path}.font-size');

@if $unremify {
@return unremify($-font-size);
}

@return $-font-size;
}
10 changes: 7 additions & 3 deletions src/scss/06_components/paragraphs/_phasing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ $-circle-size--ol: 40px;
$-circle-size--ol-l: $spacing-triple;

.component--phasing {
--item-title-lineheight: 1.5; // As we have paragraph, its line-height must be at least 1.5
--item-title-lineheight: #{1.5 * get-font-size('h4')}; // As we have paragraph, its line-height must be at least 1.5
counter-reset: item;

@include breakpoint($breakpoint-l) {
--item-title-lineheight: #{1.5 * get-font-size('h4.breakpoint_l')};
}

.component__content {
padding-left: 0;
}
Expand Down Expand Up @@ -105,10 +109,10 @@ $-circle-size--ol-l: $spacing-triple;

// If phasing element is inside of an accordion
.component--accordion .component--phasing {
--item-title-lineheight: #{get-line-height('h5')};
--item-title-lineheight: #{1.5 * get-font-size('h5')}; // As we have paragraph, its line-height must be at least 1.5

@include breakpoint($breakpoint-l) {
--item-title-lineheight: #{get-line-height('h5.breakpoint_l')};
--item-title-lineheight: #{1.5 * get-font-size('h5.breakpoint_l')};
}

.phasing__item--with-numbers::after,
Expand Down