Tailwind Class Reference

The EBRAINS-specific classes that the Tailwind factory generates from the design tokens in packages/assets/tokens. Standard Tailwind utilities (flex, items-center, hidden, …) work as usual; see the Tailwind documentation.

Colours

Colour classes are semantic: they name a role, not a colour. bg-default is the brand black ground and bg-inverse is white, so a light page uses bg-inverse and dark bands use bg-strongest.

Backgrounds

ClassTokenValue
bg-defaultbrand-black#07140D
bg-inversewhite#FFFFFF
bg-inverse-softrgba(0, 0, 0, .05)rgba(0, 0, 0, .05)
bg-darkgrey-light#ECECEC
bg-darkergrey-dark#7A7B7A
bg-stronggrey-700#666666
bg-strong-darkgrey-800#4d4d4d
bg-strongergrey-900#242424
bg-strongestbrand-black#07140D
bg-accentbrand-green#00FF9D
bg-accent-darkbrand-green-dark#00C87B
bg-successgreen-200#d3ffdc
bg-warningyellow-200#ffffcb
bg-errorred-200#ffe0e1
bg-currentcurrentColorcurrentColor
bg-transparenttransparenttransparent
bg-overlayrgba(0, 0, 0, 0.25)rgba(0, 0, 0, 0.25)
bg-on-gradientrgba(0, 0, 0, 0.1)rgba(0, 0, 0, 0.1)
bg-on-darkrgba(255, 255, 255, 0.2)rgba(255, 255, 255, 0.2)

Text

ClassTokenValue
text-defaultbrand-black#07140D
text-inversewhite#FFFFFF
text-currentcurrentColorcurrentColor
text-transparenttransparenttransparent
text-lightgrey-700#666666
text-lightergrey-light#ECECEC
text-lightestgrey-500#8c8c8c
text-extra-lightgrey-300#e6e6e6
text-successgreen-800#007734
text-warningyellow-900#636313
text-errorred-700#d01111
text-accentbrand-green#00FF9D
text-accent-darkbrand-green-dark#00C87B
text-on-gradientrgba(0, 0, 0, 0.55)rgba(0, 0, 0, 0.55)
text-on-darkwhite#FFFFFF

Borders

ClassTokenValue
border-defaultbrand-black#07140D
border-inversewhite#FFFFFF
border-inverse-softrgba(255, 255, 255, 0.3)rgba(255, 255, 255, 0.3)
border-inverse-softerrgba(255, 255, 255, 0.15)rgba(255, 255, 255, 0.15)
border-softrgba(0, 0, 0, .15)rgba(0, 0, 0, .15)
border-softerrgba(0, 0, 0, .1)rgba(0, 0, 0, .1)
border-softestrgba(0, 0, 0, .05)rgba(0, 0, 0, .05)
border-accentbrand-green#00FF9D
border-accent-darkbrand-green-dark#00C87B
border-errorred-700#d01111
border-currentcurrentColorcurrentColor
border-transparenttransparenttransparent
border-greygrey-light#ECECEC
border-grey-darkgrey-dark#7A7B7A

Gradients

Class
bg-brand
bg-gradient-01-top
bg-gradient-02-top
bg-gradient-03-top
bg-gradient-04-top
bg-gradient-01-bottom
bg-gradient-02-bottom
bg-gradient-03-bottom
bg-gradient-04-bottom

Typography

Each f-* class sets the font, weight, size, line height and letter spacing in one go, and grows at the breakpoints shown. Use them instead of text-* sizes and font-* weights.

ClassFontWeightSizeLine heightCase
f-heading-01Inter30042px → md: 48px → lg: 72px → xl: 83px100%
f-heading-02Inter30036px → lg: 48px → xl: 60px100%
f-heading-03Inter30036px → xl: 42px100%
f-heading-04Inter30028px → xl: 36px100%
f-heading-05Inter30028px110%
f-heading-06Inter30022px120%
f-body-01IBM Plex Sans40020px140%
f-body-02IBM Plex Sans40017px150%
f-body-03IBM Plex Sans40017px150%
f-ui-01IBM Plex Sans40018px110%
f-ui-02IBM Plex Sans40016px110%
f-ui-02-lightIBM Plex Sans40016px110%
f-ui-03IBM Plex Sans40014px110%
f-ui-03-lightIBM Plex Sans40014px130%
f-ui-04IBM Plex Sans40012px100%
f-ui-05IBM Plex Sans40010px110%
f-captionIBM Plex Sans40012px120%
f-codeIBM Plex Mono40014px140%
f-labelIBM Plex Mono40012px120%uppercase
f-display-01Inter300120px → lg: 150px100%
f-display-02Inter300120px → lg: 150px100%

font-sans is IBM Plex Sans and font-mono is IBM Plex Mono, so text without an f-* class still uses the brand faces.

Spacing

Spacing is in pixels. A class number is its size: p-16 is 16px, gap-24 is 24px. It works with every spacing utility (p, m, gap, space, inset, w, h, min-h).

Values: 0 1 2 3 4 5 6 7 8 9 10 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100.

Prefer multiples of 4 on the scale 0 4 8 12 16 24 32 48 64: they are the values the layout primitives use.

Section spacing

Vertical rhythm between page sections, responsive by default:

GroupSizeClasses
space-0180px → lg: 120pxpt-space-01, pb-space-01, py-space-01, mt-space-01, mb-space-01, my-space-01
space-0260px → lg: 80pxpt-space-02, pb-space-02, py-space-02, mt-space-02, mb-space-02, my-space-02
space-03100px → lg: 120pxpt-space-03, pb-space-03, py-space-03, mt-space-03, mb-space-03, my-space-03
space-0428pxpt-space-04, pb-space-04, py-space-04, mt-space-04, mb-space-04, my-space-04

Layout

Breakpoints

Mobile first: a class without a prefix applies from 0px, a prefixed class from its breakpoint up.

PrefixFromOuter gutterInner gutterColumns
(none)0px16px8px12
md:750px20px12px12
lg:900px28px16px12
xl:1024px28px16px12
xxl:1280px28px16px12
xxxl:2200px28px16px12

Container

ClassMax width
max-w-xxxl2200px
max-w-default1440px
max-w-reader1224px
max-w-sidebar1224px

container adds the outer gutters for each breakpoint. Combine it with a max width and mx-auto: container max-w-default mx-auto.

Grid

grid-layout creates the 12-column grid with the inner gutters above. Place items with grid-col-span-{n} and grid-col-start-{n}, with breakpoint prefixes (grid-col-span-12 lg:grid-col-span-8). For simple equal columns, grid grid-cols-{n} gap-{n} works too.

Shape and depth

Radii

ClassRadius
rounded-xxs2px
rounded-xs4px
rounded-sm8px
rounded-md12px
rounded-lg16px
rounded-pill100px

Shadows

Class
shadow-small
shadow-medium
shadow-hover
shadow-accent
shadow-accent-focus
shadow-border
shadow-border-top
shadow-elevated
shadow-overlay
shadow-none

Drop shadows for images and icons: drop-shadow-small, drop-shadow-medium, drop-shadow-accent-glow.

Aspect ratios

ClassRatio
aspect-1x11/1
aspect-21x921/9
aspect-16x916/9
aspect-3x23/2
aspect-4x34/3
aspect-4x54/5

Always available

The factory safelists the colour, typeset, radius, shadow and ratio classes above, grid-cols-1…grid-cols-12, the grid-col-* spans and starts, and line-clamp-1/3/4, so they work even in markup Tailwind can’t scan (CMS content, strings built at runtime). Anything else must appear in a file listed in contentPaths, or be added to the factory’s safelist option.

Related