A frame is a box that keeps a fixed shape no matter how big or small it gets. Wrap an image, video, map, or placeholder in wa-frame and it stays a square by default, or a landscape, portrait, or any custom aspect ratio you specify, even as the surrounding layout resizes. That means no more letterboxing, no more collapsed boxes waiting on a slow image to load, and no more cards that end up different heights.
Pair wa-frame with one of the wa-border-radius-* classes to round the corners without cropping the content inside.
Examples
Frames are well-suited for images and image placeholders.
The Lord of the Rings: The Fellowship of the Ring
J.R.R. TolkienWhite-socks
Kitten • MaleBumpkin
Adult • MaleSwish-tail
Kitten • FemaleSharp-ears
Adult • FemaleAspect Ratio
Frames have a square aspect ratio by default. You can append :square (1 / 1), :landscape (16 / 9), or :portrait (9 / 16) to the wa-frame class in your markup to specify an aspect ratio for the frame. Alternatively, you can define the aspect-ratio property to set a custom proportion.
Border Radius
Frames have a square border radius by default. Add any wa-border-radius-* class to round the corners, or define the border-radius property to set custom rounding.