Flex justification on cards cannot be changed

Created on 18 August 2022, over 2 years ago
Updated 14 July 2023, over 1 year ago

Problem/Motivation

The usa-card-group is a flex container which normally supports all flex justifications - flex-start, flex-end, center, baseline, etc. However, the USWDS Drupal module is locked into center justification only.

Steps to reproduce

1. Create a UWSDS Page.
2. Add a Card Group to the page.
3. Enter a USWDS justification class into the "USWDS Classes" entry (my team wants to use flex-justification-start).
4. Save and view rendered page.

Proposed resolution

The CSS in uswds-paragraph-components-cards.css sets the usa-card-group justification to center by default and has no styling for other justifications. Add the other justifications with the following pattern for the selector and style:

.paragraph--type--uswds-card-group-regular.flex-justify-start .usa-card-group,
.paragraph--type--uswds-card-group-flag.flex-justify-start .usa-card-group {justify-content: flex-start;}

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

2.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024