fully calculate paddings with js

This commit is contained in:
Oskar Wickström
2024-08-27 17:43:18 +02:00
parent 255d2c5805
commit 487d73465d
2 changed files with 51 additions and 42 deletions

View File

@@ -179,18 +179,8 @@ p {
}
img, video {
--real-height: 100% / var(--ratio);
display: block;
width: 100%;
padding-bottom: calc(
round(
up,
var(--real-height),
var(--line-height)
)
- var(--real-height)
);
object-fit: contain;
}