Skip to content
Support Yumma CSS by starring us on GitHub!

Box Sizing

Controls the calculation of the total size of an element

Class Properties

bs-bb

box-sizing: border-box;

bs-cb

box-sizing: content-box;

Content Box

The height and width of an element only apply to its content.

Content
<div class="stripes dim-26 b-2 bc-indigo bs-cb p-8">
<div class="ai-c bg-indigo d-f dim-full jc-c tc-white">Content</div>
</div>

Border Box

The height and width of the element are the same for all parts.

Stylecent uses the border-box rule by default. Learn more about our base styles.
Box
<div class="stripes dim-26 b-2 bc-indigo bs-bb p-8">
<div class="ai-c bg-indigo d-f dim-full jc-c tc-white">Box</div>
</div>

Utilizing utilities conditionally

Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.

Responsive breakpoints

You can combine responsive breakpoints like sm:bs-*,md:bs-*, lg:bs-*, and xxl:bs-* allows targeting specific utilities in different viewports.

<div class="bs-cb md:bs-bb ..."></div>

Utilizing utilities conditionally

Override existing utilities based on the user's screen size or other factors, such as hover states. Learn more about modifiers in our documentation.

Hover states

Alternatively, you can apply :hover by using h:bs-* utility to override elements and change their values when hovering over them.

<div class="bs-cb h:bs-bb ..."></div>