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

SHS 5130 Use <hr> when there is no color band text #1398

Merged
merged 4 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docroot/themes/humsci/humsci_airy/css/humsci_airy.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,8 @@
padding: hb-calculate-rems(20px);
}
}

hr {
border: 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mndonx We're almost there, just a little extra thing to fix. The top and bottom margin is different in the hr. There are not explicit rules in the theme for that, but the browser is adding some default styles. I checked in multiple browsers and it's consistent, so it should be fixed adding this to the hr styles:

margin-block-start: 0.83em;
margin-block-end: 0.83em;
font-size: 3.6rem;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cienvaras Good eye, thank you! I also found another instance where the logic needed to be applied (in the original pattern.) Let me know if you spot anything else. Thank you!

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
{%- set attributes = attributes.addClass(classes) -%}

{% if variant %}
{% set variant_class = "hb-color-band--#{variant}" %}
{% set variant_class = "hb-color-band--#{variant}" %}
{% set attributes = attributes.addClass(variant_class) %}
{% endif %}

<div{{ attributes }}>
<h2 class="hb-color-band--text">{{ color_band_text }}</h2>
{% if color_band_text %}
<h2 class="hb-color-band--text">{{ color_band_text }}</h2>
{% else %}
<hr class="hb-color-band--text" />
{% endif %}
</div>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.