Skip to content

Commit

Permalink
fix(card-group): subgrid fixes (#12174)
Browse files Browse the repository at this point in the history
### Related Ticket(s)

https://jsw.ibm.com/browse/ADCMS-7128

### Description

Explicitly forces card-group-item internals to use `grid-template-column: subgrid` to ensure a 1-column width throughout

### Changelog

**Changed**

- card-group-item internals rely on card-group grid-column
  • Loading branch information
andy-blum authored Dec 18, 2024
1 parent fb65348 commit 658b50a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/styles/scss/components/card-group/_card-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
:host(#{$c4d-prefix}-card-group-item) {
display: contents;

* {
row-gap: 0;
}

.#{$prefix}--card {
display: grid;
border: 0;
Expand All @@ -73,6 +77,7 @@
display: grid;
justify-content: revert;
grid-row: span 10;
grid-template-columns: subgrid;
grid-template-rows: subgrid;

&::before,
Expand All @@ -91,15 +96,15 @@
.#{$prefix}--card__content {
display: grid;
grid-area: 1 / 1 / -1 / -1;
grid-template-columns: subgrid;
grid-template-rows: subgrid;
row-gap: 0;
}

.#{$prefix}--card__copy {
display: grid;
grid-row: span 2;
grid-template-columns: subgrid;
grid-template-rows: subgrid;
row-gap: 0;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
position: relative;
display: grid;
grid-row: auto / span 5;
grid-template-columns: subgrid;
grid-template-rows: subgrid;
inline-size: 100%;
margin-block: 0;
Expand Down

0 comments on commit 658b50a

Please sign in to comment.