-
Notifications
You must be signed in to change notification settings - Fork 3
UHF-10909 & UHF-9717: Contact card design change, accessibility improvements #1212
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4a5aa9e
Fix typo in announcement body class
teroelonen bccd0e6
Fix button and link sizes to comply with the a11y regulation minimun …
teroelonen d103d2d
Add a bit spacing for the accordion button on district and project se…
teroelonen 09a536f
Contact card adjustments to make clickable area large enough
teroelonen 90b86ae
Restyle the contact cards
teroelonen e0264c6
Added functionality that compares social media domains against list o…
teroelonen 331ebd8
Fixed whitespace issue with links that have icons in front.
teroelonen de6078e
Moved preprocess function to bundle class in Social Media Link, style…
teroelonen 642f2b1
Add both new and old social media links visible
teroelonen 3d84689
Change pixel value to variable
teroelonen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
src/scss/06_components/paragraphs/_contact-card-listing.scss
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,76 +1,126 @@ | ||
| $contact-card-image-size: 200px; | ||
| $contact-card-color-line-width: 4px; | ||
| $contact-card-max-width: $contact-card-image-size; | ||
| $-contact-card-font: body; | ||
| $-contact-card-padding: $spacing-and-half; | ||
| $-contact-card-max-width: calc(250px + $-contact-card-padding * 2); | ||
| $-contact-card-link-padding: calc((44px - get-line-height($-contact-card-font, true)) / 2); | ||
|
|
||
| .contact-card { | ||
| $-contact-card-gap: $spacing-and-half; | ||
| $-contact-card-two-columns: calc(100% / 2); | ||
| $-contact-card-two-columns-spacing: calc($-contact-card-gap / 2); | ||
| $-contact-card-three-columns: calc(100% / 3); | ||
| $-contact-card-three-columns-spacing: calc(($-contact-card-gap / 3) * 2); | ||
| $-contact-card-four-columns: calc(100% / 4); | ||
| $-contact-card-four-columns-spacing: calc(($-contact-card-gap / 4) * 3); | ||
|
|
||
| .contact-card-listing--container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: $-contact-card-gap; | ||
|
|
||
| @include breakpoint($breakpoint-s) { | ||
| flex-direction: row; | ||
| flex-wrap: wrap; | ||
| } | ||
| } | ||
|
|
||
| .contact-card--with-image { | ||
| .contact-card { | ||
| background-color: $color-black-5; | ||
| display: flex; | ||
| flex-direction: column; | ||
| max-width: $-contact-card-max-width; | ||
| padding: $-contact-card-padding; | ||
| width: 100%; | ||
|
|
||
| @include breakpoint($breakpoint-s) { | ||
| width: calc($-contact-card-two-columns - $-contact-card-two-columns-spacing); | ||
| } | ||
|
|
||
| @include breakpoint($breakpoint-m) { | ||
| width: calc($-contact-card-three-columns - $-contact-card-three-columns-spacing); | ||
| } | ||
|
|
||
| @include breakpoint($breakpoint-xl) { | ||
| width: calc($-contact-card-four-columns - $-contact-card-four-columns-spacing); | ||
| } | ||
| } | ||
|
|
||
| // Column rules when the contact card listing is in the components upper region. | ||
| .components--upper .contact-card-listing--container { | ||
| .contact-card { | ||
| @include breakpoint($breakpoint-xl) { | ||
| width: calc($-contact-card-three-columns - $-contact-card-three-columns-spacing); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // Column rules when the contact card listing is in the components upper region | ||
| // AND there is sidebar visible. | ||
| .has-sidebar--first .components--upper .contact-card-listing--container { | ||
| .contact-card { | ||
| @include breakpoint($breakpoint-l) { | ||
| width: calc($-contact-card-two-columns - $-contact-card-two-columns-spacing); | ||
| } | ||
|
|
||
| @include breakpoint($breakpoint-xl) { | ||
| width: calc($-contact-card-three-columns - $-contact-card-three-columns-spacing); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .contact-card__image-container { | ||
| margin-bottom: $spacing; | ||
| margin-bottom: $spacing-and-half; | ||
| margin-right: 0; | ||
|
|
||
| picture, | ||
| img { | ||
| height: $contact-card-image-size; | ||
| width: $contact-card-image-size; | ||
| @include image-defaults; | ||
| height: auto; | ||
| width: 100%; | ||
| } | ||
| } | ||
|
|
||
| .contact-card__person-phone-number a:not(:last-of-type)::after { | ||
| content: ','; | ||
| margin-right: 2px; | ||
| .contact-card__person-name { | ||
| @include font('h4'); | ||
| margin-top: 0; | ||
| } | ||
|
|
||
| .contact-card__person-title { | ||
| @include font($-contact-card-font); | ||
| } | ||
|
|
||
| .contact-card__person-links { | ||
| margin-top: $-contact-card-gap; | ||
| } | ||
|
|
||
| .contact-card__person-information { | ||
| @include font(small); | ||
| .contact-card__person-link { | ||
| @include font($-contact-card-font); | ||
| word-wrap: break-word; | ||
| hyphens: auto; | ||
| margin-bottom: $spacing-half; | ||
| overflow-wrap: break-word; | ||
|
|
||
| @include breakpoint($breakpoint-s) { | ||
| min-width: $contact-card-max-width; | ||
| a { | ||
| // This is not very nice but it gets us the phone numbers to remain | ||
| // inline and each on a new line. | ||
| display: table; | ||
| padding-block: $-contact-card-link-padding; | ||
| } | ||
| } | ||
| .contact-card--color-line .contact-card__person-information { | ||
| min-width: calc($contact-card-image-size - $spacing-and-half - $spacing-quarter); | ||
| } | ||
|
|
||
| .contact-card__person-name { | ||
| @include font('h5'); | ||
| margin-top: 0; | ||
| } | ||
|
|
||
| .contact-card__person-email { | ||
| .contact-card__person-link--email { | ||
| // This is because there are sometimes long emails and limited space. | ||
| // We don't want the email to break out of the box. | ||
| word-break: break-all; | ||
| } | ||
|
|
||
| .contact-card__person-social-media { | ||
| .contact-card__person-link--social-media { | ||
| display: flex; | ||
| margin-bottom: $spacing; | ||
| margin-top: $spacing; | ||
| flex-direction: column; | ||
|
|
||
| .hel-icon { | ||
| height: $spacing-and-half; | ||
| margin-right: $spacing-half; | ||
| width: $spacing-and-half; | ||
| margin-inline-end: $spacing-quarter; | ||
| vertical-align: middle; | ||
| } | ||
| } | ||
|
|
||
| * + .contact-card__person-description { | ||
| margin-top: $spacing; | ||
| } | ||
|
|
||
| .contact-card__color-line { | ||
| background-color: var(--hdbt-color-palette--primary); | ||
| margin-right: $spacing-and-half; | ||
| min-width: $contact-card-color-line-width; | ||
| } | ||
|
|
||
| .contact-card__person-description { | ||
| color: #{$color-black-60}; | ||
| margin-top: $-contact-card-gap; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| {% set icon_labelled_by = "hdbt-icon--" ~ random() %} | ||
|
|
||
| <span class="hel-icon hel-icon--{{ icon }} {{ class }}" role="img" {% if label %} aria-labelledby="{{ icon_labelled_by }}" {% else %} aria-hidden="true" {% endif %}> | ||
| {%- set icon_no_whitespace -%} | ||
| <span class="hel-icon hel-icon--{{ icon }} {{ class }}" role="img" {% if label %} aria-labelledby="{{ icon_labelled_by }}" {% else %} aria-hidden="true" {% endif %}> | ||
| {% if label %} | ||
| <span class="is-hidden" id="{{ icon_labelled_by }}">{{ label }}</span> | ||
| {% endif %} | ||
| </span> | ||
| </span> | ||
| {%- endset -%} | ||
| {{- icon_no_whitespace -}} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this 12px be a variable? We seem to have $spacing-three-quarters available
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 🫡