Getting Started

Overview

The reference for kt-styles: every element, live, in light and dark mode. Pick an element from the sidebar; the markup to copy is in that page's source.

Usage

Link the bundled stylesheet in the page's <head> (one file, built automatically from css/ on every push):

<link rel="stylesheet" href="https://koraytugay.github.io/kt-styles/dist/kt.min.css">

Then build the page with kt- classes and --kt- variables. Because of the prefix, the library can also be added to an existing page without clashing with the styles it already has.

Dark mode: document.documentElement.dataset.theme = 'dark'. For older pages, adding the dark-mode class to body also works.

Starter page

A minimal page skeleton built only from library classes:

Page title

Subtitle

12
Total
3
Pending

What's inside

LayerFileContents
Tokenscss/tokens.cssColors, fonts, sizes, spacing, radii and shadows, for light and dark mode.
Basecss/base.cssReset and default styles for plain HTML elements.
Typographycss/typography.cssHeadings, page header, text roles, inline elements.
Layoutcss/layout.cssContainer, responsive grid with view modes, vertical stack and wrapping row.
Componentscss/components/*.cssOne file per component.
Utilitiescss/utilities.cssSmall single-purpose helpers: text color and size, fixed-width digits, truncation.