Skip to content

Commit

Permalink
Use ruler element instead of host as container
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusTraeholt committed Feb 21, 2025
1 parent 9eb0fb1 commit 5cf6fa0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<ng-container *ngTemplateOutlet="sharedCardContent"></ng-container>
</kirby-card>

<div aria-hidden="true" class="banner-ruler"></div>

<ng-template #sharedCardContent>
<div class="blur-image-wrapper">
<img class="blur-image" [src]="imagePath" alt="" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ $container-query-breakpoint: 600px;
}
}

:host {
display: block;
// Container-type: inline-size currently causes block elements to collapse in curtain scenarios on Safari
// To avoid content collapsing we use an empty block element as the container instead (we only need the inline size)
.banner-ruler {
container-name: banner;
container-type: inline-size;
content: none;
visibility: hidden;
}

:host(.none) {
Expand Down

0 comments on commit 5cf6fa0

Please sign in to comment.