Skip to content

Commit

Permalink
Improve cards CSS for IE11
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Sep 17, 2024
1 parent 77a552d commit fe4dcc1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Fixed colour of hovered buttons using the `<button>` element
- Improved cards CSS for IE11

### Security

Expand Down
47 changes: 47 additions & 0 deletions src/nationalarchives/ie.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* stylelint-disable */

@use "sass:math";
@use "tools/media";

.tna-global-header__logo--link,
Expand Down Expand Up @@ -59,6 +60,52 @@
}
}

@mixin horizontal-card-layout($modifierClass, $innerPaddingAmount) {
&#{$modifierClass} {
padding-left: 50%;
}

&#{$modifierClass}#{&}--flipped {
padding-right: 50%;
padding-left: 0;
}

&#{$modifierClass} &__image-container {
width: 50%;

position: absolute;
top: 0;
bottom: 0;
left: 0;
}
}

.tna-card {
&__image-container {
margin-bottom: spacing.space(1);
padding-bottom: #{math.div(2, 3) * 100%};
}

&__image {
width: 100%;
height: 100%;
}

&--full-click &__heading-link {
&::before {
display: none;
}
}

@include media.on-larger-than-mobile {
@include horizontal-card-layout("--horizontal", 2);
}

@include media.on-small {
@include horizontal-card-layout("--horizontal-on-small", 1);
}
}

.tna-columns {
column-count: 1 !important;
}
Expand Down

0 comments on commit fe4dcc1

Please sign in to comment.