fix: aspect ratio improvements (#2171)
- Use CSS aspect-ratio (retain fallback for legacy browsers) - Round aspect ratios (fixes YouTube black border issue)
This commit is contained in:
@ -26,9 +26,13 @@ $embed-padding: ((100 / 16) * 9);
|
||||
|
||||
.plyr__video-embed,
|
||||
.plyr__video-wrapper--fixed-ratio {
|
||||
height: 0;
|
||||
padding-bottom: to-percentage($embed-padding);
|
||||
position: relative;
|
||||
@supports not (aspect-ratio: 16 / 9) {
|
||||
height: 0;
|
||||
padding-bottom: to-percentage($embed-padding);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
|
||||
.plyr__video-embed iframe,
|
||||
|
Reference in New Issue
Block a user