Box Sizing
Controls the calculation of the total size of an element.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
bs-bbbox-sizing: border-box;bs-cbbox-sizing: content-box;Content Box
Initial value
The element's width and height do not include padding and borders.
Content
<div class="d-26 bs-cb p-8"> <div class="ai-c bg-indigo d-f d-full jc-c c-white">Content</div></div>Border Box
The element's width and height include padding and borders.
Yumma CSS uses the
border-box CSS property by default. Learn more about it in the base styles docs.Box
<div class="d-26 bs-bb p-8"> <div class="ai-c bg-indigo d-f d-full jc-c c-white">Box</div></div>Using utility variants
Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.
Responsive design
Target different screen sizes by adding breakpoint prefixes. Styles apply from the specified breakpoint and up.
Target specific viewport sizes with breakpoint prefixes
sm:bs-[value]Small≥640px
md:bs-[value]Medium≥768px
lg:bs-[value]Large≥1024px
xxl:bs-[value]Extra Large≥1536px
Hover state variant
Apply styles conditionally when users hover over an element using the h: prefix.
Add the h: prefix to apply styles only when the user hovers over the element.
Syntax:
h:bs-[value]