Found 8 bookmarks
Custom sorting
Things That Can Break aspect-ratio in CSS – Frontend Masters Boost
Things That Can Break aspect-ratio in CSS – Frontend Masters Boost
CSS has an aspect-ratio property, which has had full support since around 2021. It can be a very satisfying property to use, because it can help match how your brain 🧠 works or what the desired design outcome does better than forcing dimensions does. “I need a square here” or “I need to match the […]
·frontendmasters.com·
Things That Can Break aspect-ratio in CSS – Frontend Masters Boost
Responsive iframes with the CSS aspect-ratio property
Responsive iframes with the CSS aspect-ratio property
Today, I want to show you can use a few lines of CSS to make your embedded iframes fully responsive. Let’s dig in! The challenge with iframes and responsive layouts Unlike images and the native HTML5 video element, iframes do not scale responsively by default. /** * This does NOT work */ iframe { max-width: 100%; height: auto; } Years back, Dave Rupert put together a great video showing the challenge with responsive iframe videos.
·gomakethings.com·
Responsive iframes with the CSS aspect-ratio property
aspect-ratio — ppk
aspect-ratio — ppk
This week we’ll take a look at the new aspect-ratio declaration and its use. Una Kravets wrote the introductory article, but there are some additional technical points to be made. I also wrote a little fallback that you might use...
·quirksmode.org·
aspect-ratio — ppk
Create Responsive Image Effects With CSS Gradients And aspect-ratio — Smashing Magazine
Create Responsive Image Effects With CSS Gradients And aspect-ratio — Smashing Magazine
A classic problem in CSS is maintaining the aspect ratio of images across related components, such as cards. The newly supported `aspect-ratio` property in combination with `object-fit` provides a remedy to this headache of the past! Let’s learn to use these properties, in addition to creating a responsive gradient image effect for extra flair.
·smashingmagazine.com·
Create Responsive Image Effects With CSS Gradients And aspect-ratio — Smashing Magazine
A First Look at `aspect-ratio`
A First Look at `aspect-ratio`
Oh hey! A brand new property that affects how a box is sized! That's a big deal. There are lots of ways already to make an aspect-ratio sized box (and I'd
·css-tricks.com·
A First Look at `aspect-ratio`