Skip to content

Commit

Permalink
Merge pull request #500 from City-of-Helsinki/UHF-X_phasing_component…
Browse files Browse the repository at this point in the history
…_bug

UHF-X: Phasing component visual bug
  • Loading branch information
Arkkimaagi authored Dec 7, 2022
2 parents 2113fe6 + bca68db commit d68a44a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
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

0 comments on commit d68a44a

Please sign in to comment.