Box Sizing
Set the box sizing model for an element.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
Usage
Content Box
Exclude padding and borders from an element's total size.
Content
<div class="w-26 h-26 bs-cb p-8"> <div class="d-f ai-c jc-c w-full h-full bg-indigo c-white">Content</div></div>Border Box
Include padding and borders in an element's total size.
Yumma CSS uses
border-box by default. Learn more in the base styles docs.Box
<div class="w-26 h-26 bs-bb p-8"> <div class="d-f ai-c jc-c w-full h-full bg-indigo c-white">Box</div></div>Responsiveness
Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.
Target viewport sizes with breakpoint prefixes.
sm:bs-*Small≥640px
md:bs-*Medium≥768px
lg:bs-*Large≥1024px
xxl:bs-*Extra Large≥1536px
Hover State
Apply styles conditionally on hover using the h: prefix.
Add the h: prefix to apply styles only when the user hovers over the element.
Syntax:
h:bs-*