Skip to content
Sign inJoin waitlist

Design — KorDent HTML

KorDent is styled with Tailwind CSS classes and a few colour, font and breakpoint tokens. Most changes are HTML edits; a new colour or font needs a CSS rebuild.

The pages are styled with Tailwind CSS classes written in the HTML (class="flex flex-col gap-2.5 text-muted"). 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

Once, install the tools (needs Node.js 20 or newer):

Terminal window
npm install

Then, after a change:

Terminal window
npm run build:css # one build
npm run watch:css # rebuilds on every save while you work

Both write assets/css/style.css. The build scans the .html files in the root folder and one folder down (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.

In src/css/style.css:

@theme {
--color-primary: #00ada2; /* the accent: primary buttons, active tabs, icons, chips, links */
--color-ink: #222222; /* headings and strong text */
--color-black: #000000; /* the secondary button ("Call Now"), simple buttons on hover */
--color-muted: #6f7278; /* body text, labels, meta */
--color-white: #ffffff; /* cards, the header, text on dark */
--color-stone: #f5f3f2; /* hairlines, form fields, info panels, the Outcomes and call-to-action bands */
--color-page: #f8fafc; /* the page background */
--color-lime: #e9f885; /* the yellow button, icon covers, the plus of the logo */
--color-night: #020618; /* the footer */
--color-mist: #cad5e2; /* text on the footer */
--color-amber: #ffb900; /* the rating stars of reviews */
--color-blue: #155dfc; /* a fact's tint */
--color-green: #009966; /* a fact's tint */
--color-red: #e7000b; /* a fact's tint, the emergency service's hover line, "Closed" */
--color-red-deep: #ad0009; /* the emergency number's hover (Contact) */
--color-error: #ff2244; /* the form button's error label (its fill is error/15) */
--color-placeholder: #999999; /* placeholders, the select's chevron, table borders */
}

Each name becomes a class (bg-primary, text-muted, border-stone). Change the values, rebuild, and the whole site follows, the logo included (its paths are filled with var(--color-primary) and var(--color-lime)). Faded colours are opacity modifiers on a colour: primary/10 is the chips and the current menu link, primary/5 the tinted panels (the safety banner), black/5 the hairlines on white cards, white/5 the footer’s social buttons. They follow the palette when you change the colour.

Primary carries white text on the buttons, and Primary text sits on white: in the demo both read at about 2.8 : 1, below the 4.5 : 1 that small text needs. If your accent is free to change, a darker one reads better; keep body text on its background at 4.5 : 1 or more (Muted on the page background is about 4.6 : 1).

A few colours sit outside the tokens:

Colour Where
The logo file, for use elsewhere: the mark and the wordmark in Primary, the plus in Lime assets/images/logo.svg (the pages draw the logo inline)
The browser icon: the tooth mark in Primary icon.svg, apple-icon.png

The KorDent logo (the tooth mark with its plus, and the wordmark) is an <svg viewBox="0 0 125 28"> drawing of five paths inside each logo link: in the header and the footer of every page. To use your own, replace each <svg>…</svg> with your logo’s, keeping aria-hidden="true" on it and its class (the size). VS Code’s Replace in Files does every page at once: turn on regular expressions (.*), search for

<svg\s+viewBox="0 0 125 28"(.|\n)*?</svg\s*>

and replace it with your <svg> on one line. Then replace aria-label="KorDent home" on the links with your clinic’s name. The logo is 124 × 28 px in the header on desktops, 106 × 24 on tablets and in the footer, and 89 × 20 in the header on phones (h-5 w-[89px] md:h-6 md:w-[106px] lg:h-7 lg:w-[124px]): for a logo of other proportions, change the widths, and rebuild the stylesheet if a class is new. It sits on the white header and on the dark footer, so pick colours that read on both.

icon.svg and apple-icon.png (180 × 180 px) in the root folder are the icons in the browser tab and on a phone’s home screen. Replace the files, keeping the names.

The interface icons (the arrow, phone, check, star, calendar, clock, map pin, envelope…) are inline SVG from Phosphor, drawn on a 256 × 256 grid in the current text colour. To use another icon, open it on phosphoricons.com, copy its <path d="…"> and paste it in place of the old one. The service and “Why Choose Us” icons are line drawings on a 24 × 24 grid, part of the original design; the social marks are the template’s own vectors.

Inter ships in assets/fonts/ as one variable file, inter-variable.woff2 (upright only), declared at the top of src/css/style.css:

@font-face{font-family:"Inter"; src:url("../fonts/inter-variable.woff2") format("woff2"); font-display:swap; font-weight:100 900; font-style:normal; }
:root{--font-inter:Inter,"Inter Fallback",sans-serif; }

Every page uses it through font-sans on the <body>. The classes pin Inter’s optical-size axis at 14, its text cut, for every size ([font-variation-settings:'opsz'_14]), so big headings don’t switch to the display cut. The template uses the weights 400 (text), 500 (menu and buttons), 600 (headings) and 700 (bold labels).

To use another font:

  1. Put its .woff2 files in assets/fonts/.
  2. Change the @font-face rule (font-family and src) and the first name in --font-inter. A font that isn’t variable needs one @font-face rule per weight file (400, 500, 600, 700).
  3. Rebuild the stylesheet.

A font without an optical-size axis simply ignores the font-variation-settings classes. 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.

Text sizes are classes with a phone value first and the tablet (md:) and desktop (lg:) values after: text-[28px] md:text-[32px] lg:text-[36px]. The style guide lists every text style:

Style Phone Tablet Desktop Used for
Heading 1 36 44 56 Page titles and the Home hero
Heading 2 28 32 36 Section titles
Heading 3 26 28 32 Rich-text headings (posts, legal pages)
Heading 4 24 26 28 Rich-text headings
Heading 5 20 22 24 The safety banner’s title
Heading 6 18 19 20 Card titles, quotes, the forms’ titles, the service texts’ headings
Body Large 16 16 16 Leads, descriptions, rich text, accordion titles
Body, Body Bold 14 14 14 Card text, lists; names, field labels
Menu 15 15 15 The header’s links (weight 500)
Button 14 14 14 Buttons, tabs, the footer’s links (weight 500)
Caption, Caption Bold 12 12 12 Chips, meta, roles; price labels, the footer’s legal links
Tiny, Tiny Bold 10 10 10 The footer’s disclaimer; the review cards’ badges

Headings are weight 600 with −0.03em letter spacing and a line height of 1.1 (Heading 1) or 1.2; the text styles 1.3 (1.2 for Menu and Button).

Spacing uses Tailwind’s scale (4 px per step, so gap-5 is 20 px) or exact values in brackets (gap-[60px]). Content is at most 1300 px wide (max-w-[1300px]), with 15, 20 and 30 px at the sides, and most sections have 60 / 80 / 100 px above and below. Corners are 12 px on the big photos and the white cards of the booking form, the service texts and the dentists, 8 px on cards, panels, small photos and the facts, 6 px on form fields and icon boxes, and 2 px on the Open / Closed tags; avatars and the arrow covers are round. One soft shadow (shadow-float) lifts the hero’s badges and a hovered service card.

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.

The style guide page: the colours and text styles, then every component with its name

style-guide.html shows the colours, the text styles, the buttons and menu links, the logo, the icons and chips, the cards (service, post, review, outcome, dentist), the patterns (accordions, tabs, the filter, rich text with a table) and the forms with their 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-hamburger, data-menu-link, data-appear, data-word, data-accordion, data-card-accordion, data-collapse, data-service-filter, data-filter-tab, data-filter-search, data-category, data-title, data-limit, data-doctors, data-doctor-tab, data-doctor-row, data-outcomes-index, data-outcome-link, data-contents-nav, data-booking, data-booking-service, data-booking-doctor, data-rating, data-in-view-video, data-form, data-current-year, … Tabs and filter buttons carry their two looks in data-on and data-off: the script swaps those classes.

The blocks and titles that rise, the menu links’ letters, the accordions, the tabs, the outcomes’ index, the phone menu and the video are in assets/js/main.js; the hovers of buttons and cards are CSS transitions. A few settings are written in the HTML:

Effect Where
Page titles rise word by word out of a 7 px blur as the page loads data-appear="words" and the data-word spans (Editing the site)
Blocks rise as the page loads (the hero, the page titles’ leads and photos) data-appear="load" with data-y (7 px), data-delay (seconds) and style="opacity: 0.001; transform: translateY(7px)"
Blocks rise 18 px as they scroll into view, once half of them shows data-appear="scroll" with data-y="18" and the same kind of style. Remove the attributes and the style to show a block at once.
How many services a grid shows data-limit on the list: 6 on Home and on the service pages, 14 on service.html
The first reason (Home) and the first step (Services) start open the accordion’s first item: its button has aria-expanded="true"; swap the attributes with another item to open that one first
Buttons flip their label and slide their icon covers on hover the classes group-hover:… with duration-400 ease-spring-a

The springs and curves are in src/css/style.css (--ease-appear, --ease-form, --ease-spring-a, --ease-spring-b) and in assets/js/main.js.

With “reduce motion” switched on in the visitor’s system, movement is left out: blocks and words fade in where they stand instead of rising, the accordions open at once, the buttons’ hover movements are switched off and the call-to-action video stays still. Fades and colour changes stay.