Customization
Override settings at import time to tailor the library to your project. Use the Sass source directly via @use with a configuration map.
Using Sass source
Instead of importing the compiled CSS, import the Sass entry point. Pass any settings you want to override with the with keyword.
@use 'ln/scss' with (
$prefix: 'my-',
$font-ui: 'Geist', system-ui, sans-serif,
$breakpoints: (
sm: 30rem,
md: 48rem,
lg: 64rem,
xl: 80rem,
'2xl': 100rem,
)
);Class prefix
The $prefix variable controls the namespace for BEM block classes. The default is ln-. Changing it renames every block class — for example, .ln-button becomes .my-button.
@use 'ln/scss' with (
$prefix: 'my-'
);
// .my-button, .my-card, .my-grid, etc.Font stacks
Three font-role variables control the entire type system. Override one or all to use your own typefaces.
@use 'ln/scss' with (
$font-prose: 'Lora', Georgia, serif,
$font-ui: 'Inter', system-ui, sans-serif,
$font-mono: 'JetBrains Mono', monospace
);| Variable | Default | Role |
|---|---|---|
$font-prose | Charter, Bitstream Charter, Sitka Text, Cambria, serif | Headings, editorial text |
$font-ui | Inter, Roboto, Helvetica Neue, Arial Nova, Nimbus Sans, Arial, sans-serif | Body copy, interface text |
$font-mono | ui-monospace, Cascadia Code, Source Code Pro, Menlo, Consolas, DejaVu Sans Mono, monospace | Code, tabular data |
$heading-font | $font-prose | Heading elements (h1–h6) |
Vertical rhythm
Two variables define the spatial grid. All spacing tokens and components derive from these values.
@use 'ln/scss' with (
$g: 4px, // base grid step (default 8px)
$r: 16px // line grid step (default 24px)
);| Variable | Default | Purpose |
|---|---|---|
$g | 8px | Base grid step — the smallest spatial unit |
$r | 24px | Line grid step — baseline for line-height and vertical spacing |
Breakpoints
Override the breakpoint map to change where responsive modifiers activate. Custom breakpoint names become available as @{bp} suffixes throughout the system.
@use 'ln/scss' with (
$breakpoints: (
sm: 30rem,
md: 48rem,
lg: 62rem,
xl: 80rem,
'2xl': 100rem,
)
);| Name | Default | Pixels |
|---|---|---|
sm | 36rem | 576px |
md | 48rem | 768px |
lg | 64rem | 1024px |
xl | 80rem | 1280px |
2xl | 96rem | 1536px |
Layout
Adjust container widths, the prose measure, and the page gutter.
@use 'ln/scss' with (
$container: 60rem, // default 56.25rem (900px)
$container-wide: 80rem, // default 75rem (1200px)
$measure: 40rem, // default 37.5rem (~70ch)
$gutter: 1.5rem, // default 1rem (mobile)
$gutter-lg: 3rem // default 2rem (md+)
);| Variable | Default | Purpose |
|---|---|---|
$container | 56.25rem (900px) | Default container max-width |
$container-wide | 75rem (1200px) | Wide container max-width |
$measure | 37.5rem (~70ch) | Max-width for prose content |
$gutter | 1rem | Page side gutter on mobile |
$gutter-lg | 2rem | Page side gutter on md and above |
Selecting blocks
By default every block is included in the output. To reduce file size, pass a list of only the blocks you need.
@use 'ln/scss' with (
$blocks: (button, card, table, alert)
);An empty list (the default) emits all blocks. Any block not in the list is excluded from the compiled CSS.
Reference
| Variable | Default | Description |
|---|---|---|
$prefix | ln- | BEM block class namespace |
$font-prose | Charter, Bitstream Charter, Sitka Text, Cambria, serif | Serif font stack for headings and editorial text |
$font-ui | Inter, Roboto, Helvetica Neue, Arial Nova, Nimbus Sans, Arial, sans-serif | Sans-serif font stack for body and interface text |
$font-mono | ui-monospace, Cascadia Code, Source Code Pro, Menlo, Consolas, DejaVu Sans Mono, monospace | Monospace font stack for code |
$heading-font | $font-prose | Font stack for heading elements |
$g | 8px | Base grid step |
$r | 24px | Line grid step |
$breakpoints | sm–2xl | Responsive breakpoint map |
$container | 56.25rem (900px) | Default container max-width |
$container-wide | 75rem (1200px) | Wide container max-width |
$measure | 37.5rem (~70ch) | Max-width for prose content |
$gutter | 1rem | Page side gutter on mobile |
$gutter-lg | 2rem | Page side gutter on md and above |
$blocks | () | List of blocks to include (empty = all) |