Design — Cerette HTML
Cerette is styled with Tailwind CSS classes and a few colour, font, breakpoint and motion tokens. Most changes are HTML edits; a new colour or font needs a CSS rebuild.
How the styling works
Section titled “How the styling works”The pages are styled with Tailwind CSS classes written in the HTML
(class="flex flex-col gap-2.5 text-grey"). assets/css/style.css contains exactly the classes the pages use,
generated from src/css/style.css.
That means two kinds of change:
| Change | Rebuild the stylesheet? |
|---|---|
| Move, copy or delete elements; use classes that already appear somewhere in the site | No |
Change a colour, a font, a breakpoint; use a class that appears nowhere yet (say mt-7) |
Yes |
Rebuilding the stylesheet
Section titled “Rebuilding the stylesheet”Once, install the tools (needs Node.js 20 or newer):
npm installThen, after a change:
npm run build:css # one buildnpm run watch:css # rebuilds on every save while you workBoth write assets/css/style.css. The build scans the .html files in the root folder and one folder down (project/,
service/, blog/, legal/), and assets/js/main.js, so a class you add there is picked up. Upload the new
style.css with your pages.
Colours
Section titled “Colours”In src/css/style.css:
@theme { --color-ink: #000000; /* headings, text, the black buttons and the footer */ --color-grey: #707070; /* paragraphs and captions on the page colour */ --color-line: #b4b4b4; /* dividers, the ruler ticks, the fields' placeholders */ --color-brown: #c36036; /* the accent: buttons, the current link, icons, the logo mark */ --color-page: #f5f1e5; /* the page */ --color-white: #ffffff; /* cards, text on photos */ …}Each name becomes a class (bg-ink, text-grey, bg-brown). Change the values, rebuild, and the whole site follows.
The palette is black and brown on a warm cream page, with the photos carrying the rest of the colour. Keep text on its
background at 4.5 : 1 or more, so it stays readable. The tokens after these belong to the form (field, the fields’
fill; icon, the select’s chevron; error and error-fill, the Submit button after a failed send) and to the loading
spinner (spinner).
A few colours are opacity modifiers on a token, so they follow it when you change it: bg-ink/50 (the veil over the
hero, the project covers, the quote and the call to action), bg-line/50 (the lines between the award rows) and
ink/40 (a select’s disabled option).
Outside the tokens:
| Colour | Where |
|---|---|
The header’s background while it fades (rgba(245, 241, 229, …), the page colour) |
The style on each page’s <nav data-header-nav> and the header script in assets/js/main.js: if you change --color-page, the header keeps the old cream until you change it there too |
| The browser icon (black, white in dark browser themes, and the brown mark) | icon.svg, apple-icon.png |
| The swatches of the style guide repeat the hex values as text | style-guide.html |
Logo and icons
Section titled “Logo and icons”The logo, the word “Cerette” with its brown mark, is an <svg viewBox="0 0 110 25"> drawing with two paths: the
letters take the text colour (fill="currentColor": white over a cover, black on the page colour, white in the footer),
and the mark carries class="fill-brown". It appears twice in every page, in the header and the footer. Each copy sets
its own size with the classes on the <svg>: in the header h-[18px] w-[79px] md:h-[25px] md:w-[110px], in the footer
h-5 w-[88px].
To use your own, keep each <svg …> tag with its classes and replace what is inside it, and its viewBox, with your
logo’s shapes. VS Code’s Replace in Files does every page at once: turn on regular expressions (.*), search for
<svg\s+viewBox="0 0 110 25"([^>]*)>(.|\n)*?</svg\s*>and replace it with your logo on one line, keeping $1 (the attributes of each copy):
<svg viewBox="0 0 200 40"$1><path d="…" /></svg>Give your shapes fill="currentColor" (or none, since the <svg> carries it), and class="fill-brown" on a part that
should stay brown. For a logo of other proportions, change the widths in those classes to match your artwork (here
200 : 40 is 5 : 1, so h-5 needs w-[100px]), and rebuild the stylesheet if a class is new. Then replace
aria-label="Cerette" on the links with your name.
icon.svg is the icon in the browser tab: an SVG whose black parts turn white when the browser uses a dark theme (its
<style> holds the rule). apple-icon.png (180 × 180) is the icon on a phone’s home screen. Replace the files, keeping
the names.
The interface icons are inline SVG from Phosphor, drawn on a 256 × 256 grid in the current
text colour: the arrows, the star of the ratings, and the six icons of “Why Cerette” (blueprint, crane tower, users,
kanban, windmill, light bulb, in the light weight). To use another icon, open it on phosphoricons.com, copy its
<path d="…"> and paste it in place of the old one.
Three variable fonts ship in assets/fonts/, declared at the top of src/css/style.css:
| Font | File | Used for |
|---|---|---|
| Plus Jakarta Sans (weights 200 to 800) | plus-jakarta-sans-variable.woff2 |
Everything (font-sans on the <body>), at −3 % letter spacing |
| Marcellus | marcellus-variable.woff2 |
The quote band (font-quote) |
| Inter (weights 100 to 900) | inter-variable.woff2 |
The form’s fields and the Submit button’s “Thank you” and error labels (font-field) |
Each has an @font-face rule and a fallback rule that sizes a system font (Arial, Times New Roman) like it while it
loads, and a --font-… variable that the @theme inline block maps to font-sans, font-quote and font-field. Titles
are set in weight 600 (font-semibold), the text in 500 (font-medium).
To use another font:
- Put its
.woff2files inassets/fonts/. - Change the
@font-facerule (font-family,src,font-weight) and the first name in its--font-…variable. A font that isn’t variable needs one@font-facerule per weight file (500, 600). - Rebuild the stylesheet.
With another font you can delete its fallback rule and its name in the variable. The font files cover Western European
languages (the rules’ unicode-range); for other alphabets, use files that include them and remove the
unicode-range. Fonts from Google Fonts can be downloaded as files with
https://gwfh.mranftl.com, so they are served from your own domain, which is faster and needs no consent banner.
Sizes and spacing
Section titled “Sizes and spacing”Text sizes are classes with a phone value first and the tablet (md:) and desktop (lg:) values after:
text-[30px] md:text-[36px] lg:text-[42px]. The style guide lists every text style:
| Style | Phone | Tablet | Desktop | Used for |
|---|---|---|---|---|
| Display 1 | 50 | 100 | 120 | The inner pages’ big titles (“Studio.”, “Articles.”), a project’s title |
| Heading 1 | 40 | 48 | 56 | The Home hero’s title, a post’s and a legal page’s title, the names in the team picker |
| Heading 2 | 30 | 36 | 42 | Section titles |
| Heading 3 | 28 | 32 | 36 | The headings in posts and legal pages |
| Heading 4 | 24 | 26 | 28 | |
| Heading 5 | 20 | 22 | 24 | The figures’ signs (+, %) |
| Heading 6 | 18 | 19 | 20 | Card titles |
| Number | 52 | 62 | 94 | The figures |
| Big Paragraph | 18 | 18 | 18 | Leads, the testimonials’ quotes |
| Medium Paragraph | 16 | 16 | 16 | Body text |
| Small Paragraph | 14 | 14 | 14 | Card text, the footer |
| Menu | 12 | 12 | 12 | The header’s links, button labels and the labels before section titles (upper case) |
| Tiny | 12 | 12 | 12 | Captions, the clients’ roles |
| Quotes (Marcellus) | 20 | 19 | 24 | The quote band |
Line heights are 1.1 for Display 1 and the Menu, 1.2 for headings, 1.4 for paragraphs.
Spacing uses Tailwind’s scale (4 px per step, so gap-5 is 20 px) or exact values in brackets (gap-[50px]). Sections
have 15, 20 and 30 px at the sides (px-[15px] md:px-5 lg:px-[30px]) and 60 / 80 / 100 px above and below; their content
is at most 1440 px wide (max-w-[1440px]). Corners are square: photos, cards, buttons and fields have none; only the
dots, the labels’ rings, the portraits and the phone accordion’s circle are round. There are no drop shadows.
| Width | Prefix | |
|---|---|---|
| Phone | below 810 px | (none) |
| Tablet | 810–1199 px | md: |
| Desktop | 1200 px and up | lg: |
max-md: and max-lg: apply below those widths.
Components
Section titled “Components”
style-guide.html shows the colours, the text styles, the motion tokens (with buttons to play each curve), the brand and
icons, the motion effects, the actions (buttons, links), the navigation (the menu button, the footer links), the layout
(the label, the ruler, the title block), the media (photos and the grain), the data (figures and the award table), the
cards (project, service, post, testimonial, team, reason), the blocks (the quote band, the call to action), the patterns
(the services switcher, the team picker, rich text, loading on scroll) and the form with its button’s states, each with
its name. To reuse one, copy its markup from there or from the page that shows it.
Elements with data-… attributes are wired to the site script, so keep those attributes when you copy them:
data-header, data-header-nav, data-over-cover, data-header-switch, data-header-cover, data-header-menu,
data-hamburger, data-menu-close, data-appear, data-delay, data-duration, data-half, data-word,
data-hover, data-motion, data-transition, data-services-switcher, data-switch-…, data-team-picker,
data-team-row, data-team-card, data-team-grid, data-team-item, data-team-trigger, data-blog-list,
data-blog-item, data-blog-spinner, data-page-size, data-load-spinner, data-form, data-submit,
data-form-status, data-current-year, …
Motion
Section titled “Motion”The effects are in assets/js/main.js, which carries Motion; a few are CSS. Most settings are
written in the HTML:
| Effect | Where |
|---|---|
| The Home hero’s label and buttons rise into view on load | CSS: motion-safe:animate-hero-label, animate-hero-buttons (src/css/style.css) |
| The Home hero’s title and line appear character by character out of a blur, 0.05 s apart | data-appear="char", data-delay, data-duration on each character (Editing the site) |
| About’s and Projects’ titles appear word by word out of a blur; the lead rises line by line; the buttons and the block under them rise | data-appear="word" and data-delay; data-appear="lines" with data-word on each word; CSS animate-load-rise |
| Blocks on Home, About and Projects rise 18 px into view, once, as soon as they enter the screen (or once half of them is on it) | data-appear="view" (data-half for half, data-delay to wait) with the start state in its style |
| The header turns from transparent to the page colour after the cover | data-header-switch on the section after the cover (Pages and sections) |
| Labels roll up to a second copy on hover, dots shrink and fill, photos zoom out from 105 %, titles turn brown | data-hover on the element, and data-motion on its parts: the rest and hover values the script moves between; data-transition picks the curve |
| The services switcher, the team picker | data-services-switcher, data-team-picker (Editing the site) |
| The Blog and About’s team grid load more as the visitor scrolls | data-page-size on data-blog-list and data-team-grid |
| A project’s tall photos and result text stay in place while the block beside them scrolls | CSS sticky classes in the project pages |
The project, service, post and legal pages, Services, Blog and Contact have no entrance effects: only the
hovers move there. The CSS curves are in src/css/style.css (--ease-t1, the appear; --ease-ti, the project cards;
--ease-e, the hero; --ease-s0 and --ease-s2, the springs run over 400 ms). The tweens and springs of the script are
at the very top of assets/js/main.js (tokens/motion.ts).
Reduced motion
Section titled “Reduced motion”With “reduce motion” switched on in the visitor’s system, movement is left out: nothing rises, the characters and words fade out of their blur in place, the phone menu opens at once, and the hovers change without moving. Fades and colour changes stay.