Skip to content

Commit

Permalink
Fix layout of horizontal cards with no images
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Oct 14, 2024
1 parent 44107d8 commit 24384d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated deprecated `color.red()`, `color.green()` and `color.blue()` SASS functions
- Fixed layout issues for fullscreen gallery components when viewed in landscape
- Removed list marker colour on yellow accented blocks
- Fixed layout of horizontal cards with no images

### Security

Expand Down
8 changes: 8 additions & 0 deletions src/nationalarchives/components/card/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,21 @@
}
}

&#{$modifierClass}:not(:has(&__image-container)) {
grid-template-columns: 0 100%;
}

&#{$modifierClass}#{&}--flipped {
grid-template-areas:
"header image"
"body image"
"footer image";
}

&#{$modifierClass}#{&}--flipped:not(:has(&__image-container)) {
grid-template-columns: 100% 0;
}

&#{$modifierClass} &__heading,
&#{$modifierClass} &__body {
padding-right: spacing.space($innerPaddingAmount);
Expand Down

0 comments on commit 24384d5

Please sign in to comment.