Skip to content

Commit

Permalink
Merge pull request #648 from City-of-Helsinki/UHF-7418_phasing_compon…
Browse files Browse the repository at this point in the history
…ent_accessibility_changes

UHF-7418 Phasing component accessibility changes
  • Loading branch information
teroelonen authored Apr 28, 2023
2 parents 4e093b2 + a081eb3 commit fb42a77
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/css/styles.min.css

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions src/scss/06_components/paragraphs/_phasing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,37 @@ $-circle-size--ol-l: $spacing-triple;
position: absolute;
}

&::before {
&::after {
background-color: $color-black;
height: calc(100% + $-item-gap + $spacing-half); // Height of the line should overlap 16px with the one below it.
top: 0;
transform: translateX(calc(var(--lang-direction) * -50%));
width: 2px;
z-index: 0;
}

&:first-of-type::before {
&:first-of-type::after {
height: 100%;
top: calc($-item-padding + var(--item-title-lineheight) * 0.5);
}

&:last-of-type::before {
&:last-of-type::after {
height: calc($-item-padding + var(--item-title-lineheight) * 0.5);
}

&:only-child::before {
&:only-child::after {
display: none;
}

&::after {
&::before {
background-color: $color-white;
border: 3px solid $color-black;
border-radius: 50%;
height: var(--circle-size);
top: calc($-item-padding + var(--item-title-lineheight) * 0.5);
transform: translate(calc(var(--lang-direction) * -50%), -50%);
width: var(--circle-size);
z-index: 1;
}
}

Expand All @@ -82,7 +84,7 @@ $-circle-size--ol-l: $spacing-triple;
--p-left: #{$-item-padding-left--ol-l};
}

&::after {
&::before {
align-items: center;
content: counter(item);
counter-increment: item;
Expand Down
2 changes: 1 addition & 1 deletion templates/paragraphs/paragraph--phasing.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
component_title_level: phasing_title_level,
component_description: content.field_description,
component_content_class: 'phasing',
component_content_tag: 'ul',
component_content_tag: 'ol',
}
%}
{% block component_content %}
Expand Down

0 comments on commit fb42a77

Please sign in to comment.