Skip to content

Commit 1c7f142

Browse files
authored
Bugfix: Prevent Embedded Video Clipping in Safari (#1957)
This PR addresses a bug where iframe video players like YouTube or Vimeo used in an Embed object would offset to the left when playing in Safari, resulting in the left side of the player being cut off. Fixes #828
1 parent f284b33 commit 1c7f142

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudfour/patterns": patch
3+
---
4+
5+
Bugfix: Prevent Embed videos from clipping in Safari

src/mixins/_ratio-box.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ $aspect-ratio-map: meta.module-variables('aspect-ratio');
3939
inline-size: 100%;
4040
inset-block-start: 0;
4141
inset-inline-start: 0;
42+
position: absolute;
43+
}
44+
45+
> img,
46+
> picture > img {
4247
object-fit: cover;
4348
object-position: center;
44-
position: absolute;
4549
}
4650
}
4751

0 commit comments

Comments
 (0)