Skip to content

The framework applies a modern CSS reset to normalize browser inconsistencies.

*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}

Font smoothing, text-rendering, and text-size-adjust are set on :root for consistent rendering across platforms.

body {
background-color: var(--tk-bg-theme-5x);
color: var(--tk-fg-theme-4x);
font-family: var(--tk-font-body);
font-size: var(--tk-text-md);
line-height: var(--tk-line-height-md);
max-width: var(--tk-screen-2xl);
margin-inline: auto;
min-height: 100dvh;
}

Headings inherit --tk-font-heading, use wider letter spacing, and enable text-wrap: balance for visually pleasing line breaks.

Images, pictures, video, canvas, and SVG default to display: block with object-fit: cover and max-width: 100%.

Add data-img-fit to a container to make the first child image position absolutely as a background-fill element:

<div data-img-fit>
<img src="hero.jpg" alt="" />
<h1>Overlay content</h1>
</div>

Interactive elements show a --tk-focus-ring outline when focused via keyboard (:focus-visible). Mouse clicks do not trigger the outline.

Selected text uses a primary-tinted background. Adjust via ::selection or override --tk-color-primary-5a and --tk-color-primary-5xlight.

Custom thin scrollbar styling applied to WebKit and Firefox.

::-webkit-scrollbar { width: 8px; }
* { scrollbar-width: thin; }

When the user prefers reduced motion, all transitions and animations are reduced to near-instant durations.

Print styles hide navigation, buttons, and dialogs. Links display their URL after the text. All shadows are removed.

Note: hanging-punctuation and text-wrap: pretty are newer CSS features not yet Baseline Widely Available. The framework uses them intentionally for improved typography — your browser will gracefully ignore them if unsupported.