Skip to content
HDC Consultancy.

Styling & tooling

Tailwind CSS

The styling layer on every site we build.

Tailwind CSS is an open-source utility-first CSS framework for building custom interfaces directly in your markup. Instead of writing bespoke stylesheets, you compose small utility classes that map to design tokens. HDC uses Tailwind on every client build, including this site, because it makes branded, consistent, responsive layouts fast to ship and easy to maintain.

Where it shines

  • Utility-first classes make building and changing layouts fast without writing custom CSS
  • Design tokens (colours, spacing, type) are defined once and reused everywhere for a consistent brand
  • Only the classes you actually use are compiled, so the production CSS file stays tiny
  • Responsive, hover and dark-mode variants are built in, so mobile-first layouts are quick
  • No more dead CSS or naming debates, styles live with the markup they affect
  • Pairs cleanly with Astro, React and Vue, so one styling system covers the whole stack

Trade-offs to weigh

  • Markup can look busy with many classes until you're used to reading it
  • Needs a build step, so it's not a drop-in for a plain hand-coded HTML file
  • Without shared components, utility classes can be copied around inconsistently, discipline matters

What Tailwind CSS is

Tailwind CSS is an open-source, utility-first CSS framework, first released in 2017. Rather than giving you pre-built buttons and cards to drop in, it gives you a large set of small, single-purpose utility classes, things like flex, pt-4, text-lg or bg-blue-600, that you compose directly in your markup to build any design you want.

The key idea is that you style elements where they live, using classes that map to a consistent set of design tokens: a defined colour palette, a spacing scale, a type scale and so on. Because those tokens are configured once for the project, everything you build draws from the same brand system. And because Tailwind scans your code and only compiles the classes you actually use, the CSS that ships to the browser stays remarkably small.

How HDC uses Tailwind

Tailwind is our styling layer on every build, and it’s how this very site is styled. In practice that means:

  • We turn a client’s brand into Tailwind design tokens first: their exact colours, fonts, spacing and breakpoints. Every page then styles from that single source.
  • We build layouts mobile-first using Tailwind’s responsive variants, so pages look right on a phone on a job site before we scale them up to desktop.
  • We wrap repeated patterns, buttons, cards, form fields, section layouts, into reusable Astro and React components, so a class change happens in one place, not scattered across pages.
  • We let Tailwind’s compiler strip out every unused class, so the production stylesheet is tiny and contributes to fast load times.

Why we apply it

For trades and local businesses, a site needs to do two things at once: look polished and on-brand, and load fast. Tailwind helps with both. Pulling every colour, button and spacing decision from one token set means a large site looks deliberately designed rather than stitched together, and that visual consistency quietly builds trust with a prospect deciding who to call.

At the same time, Tailwind’s tiny compiled output means there’s very little CSS to download, which helps the speed and Core Web Vitals that Google rewards. And because styling is fast to write and easy to change, more of the project budget goes into getting the design and conversion details right rather than wrestling with stylesheets.

How Tailwind fits our stack

Tailwind is the styling glue across our whole front end. It sits on top of Astro, which renders the pages; it’s compiled and optimised by Vite during the build; and it styles the React islands we add for interactivity using the exact same tokens, so a form looks identical to the rest of the page. Prettier keeps the Tailwind classes tidy and consistently ordered, and the design tokens themselves usually trace back to a Figma design. One styling system, applied consistently everywhere, is what keeps a multi-page client site coherent.

When Tailwind isn’t the right tool

We’re honest about fit. For a tiny one-page, hand-coded site with no build step, pulling in Tailwind’s tooling can be overkill, a small amount of plain CSS is simpler. Tailwind also relies on shared components to stay consistent at scale; used carelessly without them, utility classes can drift. On our builds that isn’t an issue, because Tailwind lives inside a componentised Astro project where the design system is enforced, which is exactly where it pays off most.

Worked example

One brand, applied consistently across 60 pages

Picture an electrical contractor whose old site used slightly different blues, button shapes and spacing on almost every page, it looked stitched together. On the rebuild we define the brand once as Tailwind tokens: the exact brand colour, the heading scale, the button style, the spacing rhythm. Every page, every call-to-action and every form then draws from that single source, so a 60-page site looks deliberately designed rather than assembled. When the client later tweaks their brand colour, we change one token and the whole site updates. The result is a polished, on-brand feel that quietly signals "this is a serious business". (Illustrative, every build is scoped to your goals.)

Tailwind CSS: your questions answered

What is Tailwind CSS in plain terms?

It's a styling toolkit. Instead of writing separate stylesheets, you build a design by combining small, single-purpose classes, one for colour, one for padding, one for font size, directly on the elements. It makes building custom, on-brand layouts fast and keeps the styling consistent.

Why does HDC use Tailwind CSS?

Because it lets us ship custom, on-brand designs quickly and keep them consistent across a whole site. We define a client's colours, type and spacing once as tokens, then reuse them everywhere, so the site looks deliberately designed, stays easy to maintain, and ships a tiny CSS file that helps it load fast. This website is built with Tailwind.

Does Tailwind make my site slower?

No, typically the opposite. Tailwind only compiles the classes you actually use, so the final CSS file is usually very small. Less CSS means less for the browser to download and process, which helps load speed and Core Web Vitals.

Is Tailwind just inline styles with extra steps?

No. Inline styles are one-off and can't use a shared design system, media queries or hover states. Tailwind classes map to a single set of design tokens and support responsive and interactive variants, so the whole site stays consistent and mobile-first, and we wrap repeated patterns in reusable components.

Can my site still look unique with Tailwind?

Completely. Tailwind ships no pre-made visual style, it's a blank canvas tied to your brand tokens. The design is entirely ours and yours; Tailwind is just the efficient way we apply it.

Can you match my exact brand colours and fonts?

Yes. We configure Tailwind with your exact brand palette, fonts and spacing as the project's design tokens, so everything we build draws from your real brand rather than generic defaults.

Want Tailwind CSS working for your business?

Tell us what you're trying to achieve, we'll show you, honestly, whether it's the right tool and how we'd apply it.

Enquire now