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-5532: Fixes issue with 4 cards not fitting side by side on the contact card listing #911

Merged
merged 3 commits into from
Feb 27, 2024
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.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion src/scss/06_components/paragraphs/_contact-card-listing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,21 @@ $contact-card-bp: calc(($contact-card-max-width * 2) + ($component-side-padding-
@include breakpoint($breakpoint-s) {
max-width: none;
min-width: min-content;
width: 25%;
// Substract the gaps between the cards so that exactly 4 cards fit side by side.
width: calc(25% - ($contact-card-gap * 0.75));
}
}
}

// The components upper region has a max-width limitation that makes it impossible to include
// four 200px (contact card min-width) wide elements with 24px gap on same row so we need to adjust
// the column gap on the listing when displayed on region.
.components--upper .contact-card-listing--container {
column-gap: calc($contact-card-gap - $spacing-quarter);

.contact-card {
@include breakpoint($breakpoint-s) {
width: calc(25% - (($contact-card-gap - $spacing-quarter) * 0.75));
}
}
}
Loading