Vulpo One

16:9 iframe

While updating YouTube embeds today, I also updated embed styling. I used this insanity taken from I don’t even remember where:

.videoblock > .content {
    overflow: hidden;
    padding-top: 56.25%;
    position: relative;

    > iframe {
        border: 0;
        position: absolute;
        height: 100%;
        width: 100%;
        top: 0;
        left: 0;
    }
}

Much simpler now:

.videoblock > .content > iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
}

Comments


New blog ready

Almost a year ago I scrapped my WordPress and started moving my blog to Pelican, and now it’s finally ready. Blog has been transferred and a new template has been developed, Tumblr inspired, UIkit powered, hand crafted, with dark mode using prefers-color-scheme: dark. Right for the next Christmas.

Comments