Skip to content
joinery / docs

Huella Legal design

1159 words · updated yesterdayapps/huella-legal/DESIGN.md

🎨 Huella Legal design

The site was designed directly in code, reviewed at 390, 768 and 1280 px. There is no design file: the running site is the design, and this page keeps the tokens and decisions behind it.

What stays recognizably Huella

IngredientDirection
PaperWarm ivory #F1E9DB as the page, lighter #FBF8F2 for fields and panels
InkCharcoal #4E4E4E for text, deep slate #192630 for headings
PrimarySlate blue #3E5A6D for links and actions
AccentTeal #5DA399 as decoration only; #326C65 whenever teal carries text
TypeGeorgia for everything read, Montserrat for everything used to navigate
ToneAn academic journal, not a law firm: numbered issues, ISSN, hairline rules, no gradients

Tailwind's incremental scan sometimes misses classes in a new file. If a fresh page renders with a collapsed grid, touch main.css or restart the dev server.

Structure

PathRole
layers/design/app/assets/main.cssEvery token: palettes, type scale, measure, Nuxt UI's semantic roles pointed at them, and the base focus ring any element without its own falls back to
layers/design/app/app.config.tsNuxt UI colour aliases and control defaults: 44 px minimum height, paper field surface, and a button theme that darkens on hover, rings outlines in ink and draws the 2 px focus ring
.hl-prose in layers/articles/app/assets/prose.cssReading typography for that HTML: headings, drop cap, notes, quotes, quoted legislation, tables, figures. It styles plain elements and Gutenberg's own wrappers (wp-block-table), so production can reuse it on CMS HTML

Tokens

Palettes are namespaced (ivory, huella-slate, huella-teal, huella-ink, huella-danger) so none shadows a Tailwind palette, and each runs 50–950 because Nuxt UI generates all eleven shades for every alias. Contrast ratios are measured on the canvas, so a token change needs them re-measured.

RoleTokenRatio on paper
Headings--ui-text-highlighted → huella-slate-90012.80:1
Body--ui-text → huella-ink-7006.90:1
Secondary text--ui-text-muted → huella-ink-6004.60:1
Links, primary--ui-primary → huella-slate-5006.03:1
Teal text--ui-secondary → huella-teal-6005.02:1
Errors--ui-error → huella-danger-6006.23:1 on danger-50
Type stepSpecUse
text-display-sm / display / display-lgGeorgia 38 / 52 / 60, 1.08, −0.02emHomepage statement and article titles, one step per breakpoint
text-title / title-lg / title-xlGeorgia 42 / 56 / 64, 1.06, −0.02emThe h1 of every listing, index and utility page; title-xl only on the about page
text-feature / feature-lg / feature-xlGeorgia 32 / 40 / 46, 1.12, −0.02emThe homepage's lead article title
text-figure / figure-lg / figure-xlGeorgia 32 / 44 / 56, leading 1Stand-alone numbers: author and archive counts
text-h1 / h2 / h3Georgia 40 / 30 / 24Lead-article titles, section titles and subsection titles, always regular weight
text-readingGeorgia 18/1.7Article body inside max-w-measure (680 px, about 70 characters)
text-quote / text-citationGeorgia italic 24 / Georgia 15Pull quotes / legal citations and footnotes
text-metaMontserrat 400 13Date and reading time; author names set it at 600
KickerMontserrat 600 12, uppercase, tracking-kicker (0.12em)Category labels, section numbers
text-labelMontserrat 600 11, uppercase, tracking-label (0.14em)The wordmark's tagline and the § tile's label
text-reading-sm, h2-sm, h3-sm, quote-smGeorgia 17 / 26 / 21 / 21.hl-prose below md, where it switches to reading, h2, h3 and quote

Colour reaches a component through Nuxt UI's roles (bg-muted, text-secondary, border-inverted…), never a palette step the role already names; ESLint's no-restricted-classes in eslint.config.ts rejects those steps and any arbitrary text-, leading- or tracking- value.

UtilityWhat it doesWhy
surface-invertedRe-points the text, border and secondary roles for content on a slate-900 fill, so slate surfaces use the same classes as paperSets no colour itself, since a class list can't control Tailwind's order against bg-*/text-*
underline-titleA serif title link's hover underline: --ui-border-accented, 0.2em belowSlate-300 on paper and slate-500 on slate, through surface-inverted

text-kicker is a typography utility that also sets the muted colour. Inside a Nuxt UI slot that has a size variant, such as the command palette's label, tailwind-merge drops it in favour of the variant's text-xs, so those slots spell the kicker out with tracking-kicker.

Where the design departs from the Penpot tokens

An abandoned Penpot sheet (P5) supplied the original tokens. These are the deviations.

TokenP5 valueValueWhy
Control / card radius8 px / 12 px4 px (--ui-radius) / 2–4 pxRounded cards read as an app, not a journal; hairline rules carry the structure instead
Focus offset4 px2 px, in main.css and restated in theme/button.tsKeeps the ring attached to tight inline links
Heading colourslate-800slate-900More separation from body copy at regular weight
KickersNo automatic uppercaseUppercase, 0.12em trackingCSS uppercase keeps Spanish accents; approved at Gate A
Canvasivory-100ivory-100Unchanged
Muted textStated as 4.60:1Measured 4.60:1Unchanged; the ratio was re-measured

Review gates

GateQuestionStatus
ADo the foundations feel like Huella?Approved 29 Sep 2026
BWhich homepage direction?Approved 29 Sep 2026: A · Revista, opened by B's statement line
CIs the whole site ready at 390 / 768 / 1280?Approved 29 Sep 2026
DWhich benchmark proposals make it in?Approved 30 Sep 2026: the D set, A wherever D has no page

Not designed yet

AreaState
Interest calculator, commentsBuilt from Nuxt UI parts without a design pass
hl-law, hl-note, hl-numNeed mapping to Gutenberg block classes
Article imageryCards fall back to a § tile
Dark themeui.colorMode is off; needs a second set of --ui-* roles and a contrast pass