Box Sizing
Controls the calculation of the total size of an element.
| Class | Style |
|---|---|
bs-bb | box-sizing: border-box; |
bs-cb | box-sizing: content-box; |
Content Box
Initial value
The element's width and height do not include padding and borders.
<div class="d-26 bs-cb p-8" id="area"> <div class="ai-c bg-indigo d-f d-full jc-c tc-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.<div class="d-26 bs-bb p-8" id="area"> <div class="ai-c bg-indigo d-f d-full jc-c tc-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.
Using media queries
You can combine responsive breakpoints like sm:bs-*, md:bs-*, lg:bs-*, and xxl:bs-* to allow targeting specific utilities in different viewports.
Using hover states
Alternatively, you can apply :hover by using h:bs-* utility to override elements and change their values when hovering over them.