Add 16/9 aspect ratio for video/iframe to default CSS
This commit is contained in:
parent
8b53e14ffc
commit
eea504a961
2 changed files with 8 additions and 3 deletions
|
@ -79,6 +79,7 @@ export default async function(eleventyConfig) {
|
||||||
|
|
||||||
// widths: ["auto"],
|
// widths: ["auto"],
|
||||||
|
|
||||||
|
failOnError: false,
|
||||||
htmlOptions: {
|
htmlOptions: {
|
||||||
imgAttributes: {
|
imgAttributes: {
|
||||||
// e.g. <img loading decoding> assigned on the HTML tag will override these values.
|
// e.g. <img loading decoding> assigned on the HTML tag will override these values.
|
||||||
|
|
|
@ -72,9 +72,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fluid images via https://www.zachleat.com/web/fluid-images/ */
|
/* Fluid images via https://www.zachleat.com/web/fluid-images/ */
|
||||||
img,
|
img{
|
||||||
video,
|
|
||||||
iframe {
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
img[width][height] {
|
img[width][height] {
|
||||||
|
@ -85,6 +83,12 @@ img[src$=".svg"] {
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
video,
|
||||||
|
iframe {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
aspect-ratio: 16/9;
|
||||||
|
}
|
||||||
|
|
||||||
p:last-child {
|
p:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue