Implement new css.Build.
This commit is contained in:
parent
5ca43e14d3
commit
d984bcaf5d
1 changed files with 1681 additions and 1695 deletions
|
|
@ -7,26 +7,24 @@ intrinsic aspect ratio is preserved at any screen width. The
|
|||
.responsive-video--4-3 - A video with a 4:3 aspect ratio instead of the
|
||||
default 16:9 one. */
|
||||
|
||||
@layer components {
|
||||
.responsive-video {
|
||||
--aspect-ratio: 9 / 16; /* 16:9 aspect ratio */
|
||||
.responsive-video {
|
||||
--aspect-ratio: 9 / 16; /* 16:9 aspect ratio */
|
||||
|
||||
position: relative;
|
||||
padding-block-end: calc(var(--aspect-ratio) * 100%); /* 16:9 aspect ratio */
|
||||
padding-block-start: 25px; /* Height of video controls */
|
||||
height: 0;
|
||||
position: relative;
|
||||
padding-block-end: calc(var(--aspect-ratio) * 100%); /* 16:9 aspect ratio */
|
||||
padding-block-start: 25px; /* Height of video controls */
|
||||
height: 0;
|
||||
|
||||
iframe,
|
||||
.responsive-video__embed {
|
||||
position: absolute;
|
||||
inset-block-start: 0;
|
||||
inset-inline-start: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.responsive-video--4-3 {
|
||||
--aspect-ratio: 3 / 4; /* 4:3 aspect ratio */
|
||||
iframe,
|
||||
.responsive-video__embed {
|
||||
position: absolute;
|
||||
inset-block-start: 0;
|
||||
inset-inline-start: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.responsive-video--4-3 {
|
||||
--aspect-ratio: 3 / 4; /* 4:3 aspect ratio */
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue