The Placer Toolkit alpha has
arrived! 🎉
Plenty of changes are coming your
way—some big, some breaking, some
even nuclear! Beware the changelog…
Frame
Frames are containers that maintain a consistent aspect ratio, ideal for images and other media.
<div class="frame-overview pc-frame" style="max-inline-size: 20rem">
<div></div>
</div>
<style>
.frame-overview:has(div:empty) {
padding: var(--pc-spacing-s);
border: var(--pc-border-width-s) dashed
var(--pc-color-neutral-border-normal);
border-radius: var(--pc-border-radius-l);
}
.frame-overview > div:empty {
min-inline-size: 4rem;
min-block-size: 4rem;
background-color: var(--pc-color-indigo-60);
border-radius: var(--pc-border-radius-m);
}
</style> Demos#
Card image placeholders#
Frames are well‐suited for images and image placeholders.
Aspect ratio#
Frames have a square aspect ratio by default. You can append :square (1∶1), :landscape (16∶9) or :portrait (9∶16) to the pc-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. You can add any of the following pc-border-radius-* classes to an element with pc-frame to specify the border radius:
pc-border-radius-spc-border-radius-mpc-border-radius-lpc-border-radius-xlpc-border-radius-pillpc-border-radius-circlepc-border-radius-square
Alternatively, you can define the border-radius property to set custom rounding.