block
inline-block
inline-flex
flex
grid
Each of these can receive a “T-shirt size” prefix with a colon (4 tiers available: xs: / sm: / md: / lg:) that sets the media query width at which the block styling takes effect. See responsive layouts.
xs:
sm:
md:
lg:
Codebase container classes add a constrained layout width, inline margin (x-axis) auto centering, and side edge whitespace when the viewport width is at or narrower then the container width.
container
Container right- and left-side (“x-axis”) spacing is supplied when the viewport width is less than the variable maximum width, --w-max. This adds some negative space (commonly known as whitespace, though it is not always white) eitherside of the container, to prevent any text being difficult to read when up against the sides of the viewport.
--w-max
There are several container utilities, with maximum widths same as the width utilities (see below).
256px intervals. w- classes will have widths 100% until their max width. container- classes will have widths (100% minus side space) until their --w-max.
w-
container-
The difference between width utilities and container utilities is that containers have x-axis side padding and x-axis centering (see above).
w-xxs
container-xs
w-xs
container-sm
w-sm
container-content
w-content
container-md
w-md
container-lg
w-lg
container-xl
w-xl
container-xxl
w-xxl
Four more:
w-100%
w-100vw
w-max-100vw
w-fit-content
h-100%
h-100dvh
h-max-100dvh
overflow-y
Codebase uses 100dvh (percentage dynamic viewport height) that gives a different viewport height for some devices — it compensates for the retracting interface toolbars on iOS Safari.
100dvh
box
position: absolute; inset: 0;
relative
absolute
sticky
top
right
bottom
left
place-center
z-1
z-2
z-3
z-997
z-998
z-999
Example:
Top
Right
Bottom
Left
Centeredand middled
<div class="relative"> <div class="absolute top"> Top </div> <div class="absolute right"> Right </div> <div class="absolute bottom"> Bottom </div> <div class="absolute left"> Left </div> <div class="box place-center"> Centered and middled </div> </div>
There are four media query @media variants for various Codebase classes, corresponding to the following colon-separated prefix widths:
@media
xs:*
sm:*
md:*
lg:*
Classes with responsive query variants are:
t-left
t-center
t-right
flex-
col-
row-
hidden
Both flexbox and grid share the same optional gap classes. gap-3 and gap-4 have a responsive size increase for larger viewports, using a clamp() ramp. See decoration: spacing for more information.
gap-3
gap-4
clamp()
block and inline-block have (base), xs:, sm:, md: and lg: variants.
Use one of the container-responsive breakpoint width variants as an override when you only need some element to behave as a flex or a grid within a smaller width but not at or above a larger width.
Docs