Tailwind CSS Class Reference

Complete reference of EBRAINS-specific Tailwind utility classes. All classes listed here are pre-configured with EBRAINS design tokens.

Colors

Background Colors

EBRAINS brand colors for backgrounds:

ClassColorUsage
bg-primary#00A595 (Teal)Primary brand color, CTAs
bg-secondaryNavy BlueSecondary actions, accents
bg-darkDark GrayDark backgrounds
bg-lightLight GrayLight backgrounds
bg-inverseWhite/LightInverse backgrounds
bg-subtleVery Light GraySubtle backgrounds

Example:

Text Colors

ClassColorUsage
text-primaryPrimary ColorEmphasis, links
text-secondarySecondary ColorLess emphasis
text-darkDark TextMain text on light backgrounds
text-lightLight TextText on dark backgrounds
text-inverseWhite/DarkInverse text color
text-subtleMuted TextDe-emphasized text

Example:

Border Colors

ClassColorUsage
border-primaryPrimary ColorPrimary borders
border-secondarySecondary ColorSecondary borders
border-subtleLight GraySubtle dividers
border-darkDark GrayStrong dividers

Example:

Gradient Backgrounds

EBRAINS provides gradient utilities:

ClassGradientUsage
bg-gradient-primaryPrimary gradientHero sections
bg-gradient-secondarySecondary gradientFeature highlights

Example:

Typography

Font Families

ClassFontUsage
font-sansInterDefault sans-serif (body text, headings)
font-monoJetBrains MonoCode, technical content

Example:

Typesets (f-* classes)

EBRAINS typography scale with predefined size, weight, and line-height:

Headings

ClassSizeWeightLine HeightUsage
f-heading-0148px700 (Bold)1.2Page titles
f-heading-0236px700 (Bold)1.3Section titles
f-heading-0328px600 (Semibold)1.3Subsection titles
f-heading-0424px600 (Semibold)1.4Card titles
f-heading-0520px600 (Semibold)1.4Small headings

Body Text

ClassSizeWeightLine HeightUsage
f-body-0116px400 (Regular)1.5Default body text
f-body-0214px400 (Regular)1.5Secondary text, captions

Example:

Spacing

EBRAINS uses a pixel-based spacing scale (not Tailwind’s default rem-based scale).

Available Spacing Values

Class SuffixValueExample Classes
88pxp-8, m-8, gap-8
1616pxp-16, m-16, gap-16
2424pxp-24, m-24, gap-24
3232pxp-32, m-32, gap-32
4848pxp-48, m-48, gap-48
6464pxp-64, m-64, gap-64
8080pxp-80, m-80, gap-80
9696pxp-96, m-96, gap-96
128128pxp-128, m-128, gap-128

Padding Classes

Apply to all sides or individually:

Margin Classes

Same values as padding:

Gap Classes (Flexbox/Grid)

Grid System

EBRAINS provides a 12-column grid system with custom utilities.

Grid Columns

ClassColumnsUsage
grid-cols-11 columnMobile
grid-cols-22 columnsTablet
grid-cols-33 columnsDesktop
grid-cols-44 columnsCards grid
grid-cols-66 columnsDense grid
grid-cols-1212 columnsFull grid

Example:

Grid Column Span

ClassSpanUsage
grid-col-span-22 columnsSmall element
grid-col-span-33 columnsMedium element
grid-col-span-44 columnsLarge element
grid-col-span-66 columnsHalf width
grid-col-span-88 columnsTwo-thirds width
grid-col-span-1212 columnsFull width
grid-col-span-fullAll columnsFull width (any grid)

Example:

Grid Column Start

Position elements at specific columns:

ClassStarts AtUsage
grid-col-start-1Column 1Start
grid-col-start-2Column 2After first
grid-col-start-7Column 7Center-right

Example:

Border Radius

EBRAINS border radius scale:

ClassValueUsage
rounded-none0No rounding
rounded-sm2pxSubtle rounding
rounded4pxDefault rounding
rounded-md8pxMedium rounding
rounded-lg12pxLarge rounding
rounded-xl16pxExtra large
rounded-full9999pxFully rounded (circles, pills)

Example:

Individual Corners

Shadows

EBRAINS elevation scale using shadows:

ClassElevationUsage
shadow-noneNo shadowFlat elements
shadow-smSmallSubtle elevation
shadowDefaultCards, buttons
shadow-mdMediumElevated cards
shadow-lgLargeModals, dropdowns
shadow-xlExtra largeTop-level overlays

Example:

Drop Shadows (for images/icons)

Breakpoints

EBRAINS responsive breakpoints:

BreakpointMin WidthUsage
sm:640pxSmall tablets
md:768pxTablets
lg:1024pxDesktops
xl:1280pxLarge desktops
2xl:1536pxExtra large screens

Example:

Container

EBRAINS provides a custom container for consistent max-width:

Special Utilities

Line Clamp

Truncate text to specific line count:

ClassLinesUsage
line-clamp-11 lineSingle line truncation
line-clamp-33 linesPreview text
line-clamp-44 linesCard descriptions

Example:

Aspect Ratios

EBRAINS aspect ratio utilities:

ClassRatioUsage
aspect-square1:1Squares
aspect-video16:9Videos
aspect-4/34:3Images

Example:

State Variants

All classes support state variants:

Hover

Focus

Active

Disabled

Related Documentation