Home/Utilities/Typography

Typography

Font size, weight, style, and family utilities.

Font Size

The numeric scale fs-1 through fs-6 matches Bootstrap's h1-h6/fs-1-fs-6 values; the same scale drives the built-in h1-h6 elements and the .h1-.h6 heading aliases.

fs-1 - The quick brown fox

fs-2 - The quick brown fox

fs-3 - The quick brown fox

fs-4 - The quick brown fox

fs-5 - The quick brown fox

fs-6 - The quick brown fox

<p class="fs-1">The quick brown fox</p>
<p class="fs-2">The quick brown fox</p>
<p class="fs-3">The quick brown fox</p>
<p class="fs-4">The quick brown fox</p>
<p class="fs-5">The quick brown fox</p>
<p class="fs-6">The quick brown fox</p>
ClassPropertiesDescription
fs-1font-size: 2.5remLargest heading size
fs-2font-size: 2remSecond-level heading
fs-3font-size: 1.75remThird-level heading
fs-4font-size: 1.5remSub-heading
fs-5font-size: 1.25remLarge body text
fs-6font-size: 1remSmall heading / lead text

Pixel-based fluid sizes

For fine-grained control, use font-{n} classes where n is a pixel size from the predefined scale. The named step always stays pixel-based, with clamp() used internally for fluid scaling.

<p class="font-12">12px text</p>
<p class="font-16">16px text</p>
<p class="font-24">24px text</p>
<p class="font-48">48px text</p>
<p class="font-96">96px text</p>

Available values: 1-16, 18, 20-22, 24, 26, 28, 32, 36, 40, 42, 44, 48, 54, 60, 64, 66, 72, 80, 88, 96.

Named scale

The named scale text-xs through text-6xl matches Tailwind's text-xs-text-6xl values.

ClassPropertiesDescription
text-xsfont-size: 0.75rem12px
text-smfont-size: 0.875rem14px
text-basefont-size: 1rem16px
text-lgfont-size: 1.125rem18px
text-xlfont-size: 1.25rem20px
text-2xlfont-size: 1.5rem24px
text-3xlfont-size: 1.875rem30px
text-4xlfont-size: 2.25rem36px
text-5xlfont-size: 3rem48px
text-6xlfont-size: 3.75rem60px

Font Weight

Control the visual weight of text with numeric or keyword weight classes.

fw-100 - The quick brown fox jumps over the lazy dog

fw-200 - The quick brown fox jumps over the lazy dog

fw-300 - The quick brown fox jumps over the lazy dog

fw-400 - The quick brown fox jumps over the lazy dog

fw-500 - The quick brown fox jumps over the lazy dog

fw-600 - The quick brown fox jumps over the lazy dog

fw-700 - The quick brown fox jumps over the lazy dog

fw-800 - The quick brown fox jumps over the lazy dog

fw-900 - The quick brown fox jumps over the lazy dog

<p class="fw-300">Light text</p>
<p class="fw-400">Normal text</p>
<p class="fw-700">Bold text</p>
ClassPropertiesDescription
fw-100font-weight: 100Thin
fw-200font-weight: 200Extra light
fw-300font-weight: 300Light
fw-400font-weight: 400Regular / normal
fw-500font-weight: 500Medium
fw-600font-weight: 600Semi-bold
fw-700font-weight: 700Bold
fw-800font-weight: 800Extra bold
fw-900font-weight: 900Black / heavy
boldfont-weight: boldKeyword bold
normalfont-weight: normalKeyword normal
lighterfont-weight: lighterRelative lighter

Font Style

Apply italic or oblique style to text.

italic - The quick brown fox jumps over the lazy dog

oblic - The quick brown fox jumps over the lazy dog

<p class="italic">Italic text</p>
<p class="text-italic">Also italic</p>
<p class="oblic">Oblique text</p>
ClassPropertiesDescription
italic / text-italicfont-style: italicItalic text
oblic / text-oblicfont-style: obliqueOblique text

Font Family

ArchCSS ships with a comprehensive $font_face map that registers system fonts, web-safe fonts, and Google Fonts. Font-family classes are generated automatically - each key becomes both a standalone class and a font-{key} variant.

<p class="poppins">Poppins font</p>
<p class="font-inter">Inter font</p>
<p class="jetbrainsmono">JetBrains Mono</p>

System & web-safe fonts

ClassFont family valueDescription
verdanaVerdana, 'Bitstream Vera Sans', …, sans-serifWeb-safe sans-serif
tahomaTahoma, sans-serifWeb-safe sans-serif
genevaGeneva, sans-serifWeb-safe sans-serif
segoeui'Segoe UI', sans-serifWindows system font
arialArial, Helvetica, Geneva, Verdana, …, sans-serifMS core sans-serif
helveticaHelvetica, sans-serifClassic sans-serif
robotoRoboto, sans-serifGoogle sans-serif
ubuntuUbuntu, sans-serifUbuntu system font
timesnromanTimes New RomanClassic serif
timesTimesSerif
serifserifGeneric serif
sans-serifsans-serifGeneric sans-serif
monospacemonospace, consolasGeneric monospace
calibriCalibriMS Office font
system-uisystem-ui, -apple-system, …OS-native system stack

Google Fonts

Google Fonts are loaded automatically in the default build. Disabling them yourself by building from SCSS source is coming in a future release.

ClassFont nameCategory
inter / font-interInterSans-serif
lato / font-latoLatoSans-serif
nunito / font-nunitoNunitoSans-serif
opensans / font-opensansOpen SansSans-serif
outfit / font-outfitOutfitSans-serif
poppins / font-poppinsPoppinsSans-serif
raleway / font-ralewayRalewaySans-serif
sourcesans / font-sourcesansSource Sans 3Sans-serif
firasans / font-firasansFira SansSans-serif
dmsans / font-dmsansDM SansSans-serif
playfair / font-playfairPlayfair DisplaySerif
merriweather / font-merriweatherMerriweatherSerif
lora / font-loraLoraSerif
ptserif / font-ptserifPT SerifSerif
crimsonpro / font-crimsonproCrimson ProSerif
spacemono / font-spacemonoSpace MonoMonospace
jetbrainsmono / font-jetbrainsmonoJetBrains MonoMonospace
firamono / font-firamonoFira MonoMonospace
ibmplexmono / font-ibmplexmonoIBM Plex MonoMonospace
inconsolata / font-inconsolataInconsolataMonospace

Using font tokens in SCSS

Once SCSS source usage is public, you'll be able to access any registered font family directly from the $font_face map in your own SCSS:

Coming soon. This SCSS workflow isn't available in the published package yet.
@use 'sass:map';
@use 'archcss/src/scss/config' as *;

.my-element {
  font-family: map.get($font_face, 'poppins');
}

.my-heading {
  font-family: map.get($font_face, 'playfair');
  font-weight: 700;
}

Line Height

Control the spacing between lines of text with the lh-{n} scale.

ClassPropertiesDescription
lh-1line-height: 1.25Tight
lh-2line-height: 1.5Default comfortable
lh-3line-height: 2.75Relaxed
lh-4line-height: 3Loose
lh-5line-height: 3.25Extra loose
lh-6line-height: 3.5Maximum loose
Responsive variants. All fs-*, fw-*, and lh-* classes support responsive prefixes - e.g. md:fs-3, lg:fw-700. The font-style and font-family classes also support hover and focus pseudo-variants.