A few native font stacks are set in the root-vars.css file.
root-vars.css
:root { --t-sans: ui-sans-serif, sans-serif; --t-serif: ui-serif, serif; --t-mono: ui-monospace, monospace; --t-base-ff: var(--t-sans); --hd-ff: inherit; /* headings */ --t-form-ff: inherit; }
Everything here is an example, a place to start. Your own --base and --prose don’t need to be both sans-serif and serif.
--base
--prose
Font stack usage in Codebase:
--t-sans
<body>
--t-base-ff
--t-form-ff
--hd-ff
--t-serif
t-prose
<article>
--t-mono
<code>
<kbd>
<samp>
t-mono
The default font size in Codebase is 100% for small viewports. This sets the value of 1rem—that is 16px on most browsers (in 2025).
:root { --t-base-fs: 100%; }
All typographic block elements have zero top margin, and a bottom margin of var(--t-mb) (which is 1rem by default). This includes paragraphs, headings, blockquotes, lists, and definition lists.
var(--t-mb)
Heading sizes are set using the classic typographic scale (but set in em, not pt or px). The font size for h6 and utility class .h6 is not increased by this scale (remains the same as the base font size).
h6
.h6
Example headings (using heading-size utility classes):
Heading h1
Heading h2
Heading h3
Heading h4
Heading h5
Heading h6
:root { --h1: 2.5em; --h2: 1.875em; --h3: 1.5em; --h4: 1.25em; --h5: 1.125em; --h6: 1em; }
All headings <h1> to <h6> and matching heading size utility classes h1 to h6 have:
<h1>
<h6>
h1
<div class="h1">
--h-ff: inherit
--h-fw: var(--t-semibold)
1em + 0.5rem
var(t--mb)
:root { --h-ff: inherit; /* headings font-family */ --h-fw: var(--t-semibold); --h-lh: calc(1em + 0.5rem); --h-mb: var(--t-mb); }
Tip: In some contexts (e.g. in card components) you may not want any built-in spacing for typographic block elements. Then, you can remove margins by using the mb-0 utility class.
mb-0
Codebase styles <blockquote> tags with some inline (x-axis) padding, to give the effect of indentation. This inline padding is set using the responsive spacing variable --s-4 so that it increases if there is more available width.
<blockquote>
--s-4
Otherwise, blockquotes have the same as paragraph styling.
Lorem ipsum dolor sit amet, adipiscing honestatis ius ut, nisl consulatu pro in. Imperdiet evertitur no usu, his te suavitate salutatus. Nullam ridens deterruisset an duo. Cum harum insolens ei, cum probo placerat praesent et.
In Codebase ordered <ol> and unordered <ul> have a small amount of left padding. But Codebase separates list items <li> to make them more obvious by setting a small top margin between list items (smaller than the top margin between paragraphs), and the same amount above nested <ol> and <ul>. This makes ordered and unordered lists have an even spacing like this:
<ol>
<ul>
<li>
<ol> <li>Ordered item one</li> <li>Ordered item two <ol> <li>Ordered item two child one</li> <li>Ordered item two child two</li> </ol> </li> <li>Ordered item three</li> </ol>
<ul> <li>Unordered item</li> <li>Unordered item <ul> <li>Unordered item child</li> <li>Unordered item child</li> </ul> </li> <li>Unordered item</li> </ul>
For definition lists, the title is bold and the definition data item is indented with the same left padding as for the lists (see above).
<dl> <dt>Definition list title</dt> <dd>Definition list data</dd> <dt>Definition list title</dt> <dd>Definition list data</dd> </dl>
In Codebase, links are styled with a color and an underline. The underline is set using the text-decoration property, and the color is set using the color property. The color of links is set to the --tc-link variable, which is defined in the root-vars.css file. On :hover, the link text color changes to the --tc-link-hover variable, which is set darker than --tc-link.
text-decoration
color
--tc-link
:hover
--tc-link-hover
Example:
Then there are the following two classes that apply to links, that may be handy in some situations:
t-underline-none
t-underline-hover-only
The browser default, and the best practice for accessability, is to have links indicated by an underline (and the browser default color of links is blue). But in the context of menus it is permissible to deviate from the best practice, provided there are other visual and non-visual indicators. This is the reason why we should use semantic HTML tags on menus, and and why we should place navigation menus in their expected locations (in sitewide menu-bars, sidebars, and footers).
There may be situations where you have a link that contains some accompanying text that you don’t want to receive the <a href=""> (link) underline. Examples where this may be used: media object, card or hero component, where you want the whole thing to behave like a “big button”. for these, you need the panel-link and panel-link-title combo classes.
<a href="">
panel-link
panel-link-title
You will also want to style the outer <a href=""> e.g. with the block utility (for display:block), and add more styles to this inner element text, so that it is not the same color as the link label.
block
display:block
Y0u will also want to style the other element(s) text that’s not the panel-link-title with a different color, e.g. t-gray t-900.
t-gray t-900
Link label (title)
Lorem ipsum dolor sit amet ...
<a class="panel-link" href=""> <p class="panel-link-title">Link label (title)</p> <p class="mb-0 t-gray t-900">Lorem ipsum dolor sit amet ...</p> </a>
Another example: here t-underline-hover-only has also been added to the <a href="">:
<a class="panel-link t-underline-hover-only" href=""> <p class="panel-link-title">Link label (title)</p> <p class="mb-0 t-gray t-900">Lorem ipsum dolor sit amet ...</p> </a>
nav
<menu>
<menuitem>
The semantic <nav> tag has no styling of its own, other than its being a block element (similar to a div). Use it to organize your major navigation blocks of links (whether to other pages in your website, or “on this page”).
<nav>
div
Semantic <menu> tags are treated by the browser as no different to an <ul>, but they are announced as a menu by screen readers. Codebase gives <menu>, <ul>, and <ol> the same styling: some left padding and bottom margin (and you can remove these you don't require them, using spacing utility classes: margins and/or paddings).
Using an <li> within a <menu> will give you bulletpoint block items. This will be OK for sidebars and dropdown menus, for example, but there’s also the semantic <menuitem> tag. This is an inline tag (like a <span>), and it doesn’t come with a bulletpoint.
<span>
This is what you get if you add no styling, other than the Codebase defaults (but of course you will want to add more styling):
<nav> <menu> <menuitem><a href="">Menu item 1</a></menuitem> <menuitem><a href="">Menu item 2</a></menuitem> <menuitem><a href="">Menu item 3</a></menuitem> </menu> </nav>
Notes:
If you want a group of links (in a menu) to not have underlines, or to have underlines only when hovered, the following wrapper classes are available in Codebase:
links-underline-none
links-underline-hover-only
And now, with a few other Codebase utilities, you have a menubar:
<nav> <menu class="p-cell flex flex-wrap gap-3 bg-gray bg-100 links-underline-hover-only"> <menuitem><a class="t-semibold t-gray t-700" href="">Menu item 1</a></menuitem> <menuitem><a class="t-semibold t-gray t-700" href="">Menu item 2</a></menuitem> <menuitem><a class="t-semibold t-gray t-700" href="">Menu item 3</a></menuitem> </menu> </nav>
Or a menu for a sidebar or footer buffet:
<nav> <menu class="pl-0 flex flex-column gap-2 links-underline-hover-only"> <menuitem><a href="">Menu item 1</a></menuitem> <menuitem><a href="">Menu item 2</a></menuitem> <menuitem><a href="">Menu item 3</a></menuitem> </menu> </nav>
t-right
t-center
t-left
In addition to the three simple text alignment classes above, Codebase also has several container-query responsive variants, for xs:, sm:, md: and lg: container breakpoints widths.
xs:
sm:
md:
lg:
Example: The hearing in the card below is left aligned by default, but becomes center aligned when its container is xs (320px) wide and above, using xs:t-center:
xs
xs:t-center
A title
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Magni rem animi quaerat accusantium illum architecto, nemo, ex harum voluptatum adipisci eum blanditiis dolorum. Natus debitis quisquam, expedita accusantium quos cumque?
Codebase tables are set using the .table class.
.table
<th>
<td>
var(--b-1)
<hr>
--p-cell
<table>
table-fixed
table-borderless
table-lines
table-compact
table-striped
vertical-align-middle
<table class="table"> <caption>This is a Table Caption</caption> <thead> <tr> <th>Table Header 1</th> <th>Table Header 2</th> <th>Table Header 3</th> </tr> </thead> <tbody> <tr> <td>Table content 1.1</td> <td>Table content 2.1</td> <td>Table content 3.1</td> </tr> <tr> <td>Table content 1.2</td> <td>Table content 2.2</td> <td>Table content 3.2</td> </tr> ... </tbody> </table>
Example with table table-lined table-striped:
table table-lined table-striped
If you have a lot of content in your table, it will probably break your page layout on small viewports (e.g. phones). The simplest way to make a table “responsive” is to wrap your table in a DIV with the overflow-x class to make it horizontally scrollable.
overflow-x
<div class="overflow-x"> <table class="table"> ... </table> </div>
The base font size is 100% (16px default). Additionally:
t-lg
.h1
t-long-read
clamp()
t-comfort
t-display
Paragraph. Lorem ipsum dolor, sit amet consectetur adipisicing elit. Magni rem animi quaerat accusantium illum architecto, nemo, ex harum voluptatum adipisci eum blanditiis dolorum. Natus debitis quisquam, expedita accusantium quos cumque?
<code> tags have monospaced text (set by --t-mono), with a thin border and a little padding to improve readability.
If the <code> tag is wrapped in a <pre> tag, then it becomes a block level element with more padding, a max-width of 100%, and y-axis overflow scrolling.
<pre>
Besides those already introduced, Codebase also has utility classes for:
<p>
t-sm
<small>
t-highlight
<mark>
t-thin
t-normal
t-semibold
t-bold
t-heavy
t-italic
t-balance
t-uppercase
t-nowrap
Note: links can also be styled as though they are buttons using the btn utility class. See components: buttons.
btn
Docs