Skip to content

Commit

Permalink
fix: IOTA - aspect ratio on safari (#41)
Browse files Browse the repository at this point in the history
* feat: IOTA - Update all post header images to use aspect ratio 16:9 (#52)

* fix aspect ratio for safari

---------

Co-authored-by: evavirseda <[email protected]>
  • Loading branch information
begonaalvarezd and evavirseda authored Jul 28, 2023
1 parent ab3b1dd commit 78d44fb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/sass/components/articles/_article-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@
aspect-ratio: 16/9;
}

@supports not (aspect-ratio: 16/9) {
.m-article-card__picture {
width: 100%;
overflow: hidden;
}

.m-article-card__picture{
content: "";
display: block;
padding-top: 56.25%;
}

}

.m-article-card__picture-link {
position: absolute;
top: 0;
Expand Down
16 changes: 16 additions & 0 deletions src/sass/post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,23 @@
margin-top: 65px;
}
}
@supports not (aspect-ratio: 16/9) {
.post-template .m-hero.with-picture {
width: 100%;
overflow: hidden;
}

.post-template .m-hero.with-picture{
content: "";
display: block;
padding-top: 56.25%;
}

.post-template .m-hero.with-picture img {
object-fit: fill;
}

}
.disclamer-deprecated-post {
margin: 30px 0;
padding: 15px 20px;
Expand Down

0 comments on commit 78d44fb

Please sign in to comment.