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.
<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.
<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>