Skip to content
Sign inJoin waitlist

Design — Brickfolio HTML

The look of Brickfolio’s HTML edition comes from a few design tokens in one file, src/css/style.css, and from Tailwind CSS classes on the pages; this guide shows where each part of the look is set and how to rebuild the stylesheet.

Open style-guide.html. It shows the colours, the text styles, the icons, the buttons and links, the stars and social links, the cards, the article header and rich text, the tickers, the question list and the forms, each with its name. It’s the quickest way to find a component to copy.

The style guide page: the colours, the text styles, the icons and the buttons

src/css/style.css, in @theme:

--color-ink: #050505; /* the page, the header, dark labels */
--color-light: #e4e4e4; /* titles, names, labels, the nav links, the load-more buttons' fill */
--color-grey: #8d8d8d; /* the rotating roles, testimonial roles, "Contact Me" */
--color-accent: #fc5000; /* orange: the pill buttons, the stars, hovered links and post titles */
--color-white: #ffffff;
--color-snow: #fafafa; /* typed text in the contact form, the plus and minus of the questions */
--color-field: #bbbbbb; /* the contact fields' fill (at 15 %) */
--color-field-line: #888888; /* the contact fields' hairline (at 10 %) */
--color-focus: #0099ff; /* a focused contact field's hairline */
--color-danger: #ff2244; /* a form button that failed (at 15 %) */

Each name becomes a class: bg-ink, text-light, text-accent. The softer whites and oranges are opacity steps written on the elements: text-white/80 for body text, text-white/60 for meta, bg-white/10 for the lines, white/5 for the hairlines, bg-white/3 for the card fills, and accent/80 to accent/3 for the pills and the form buttons. Change --color-accent and the orange follows everywhere, glows aside: those are written as rgb(252 80 0 / …) in --shadow-pill, --shadow-pill-hover and --shadow-card-hover in the same file. Rebuild the stylesheet after any change (below).

The site is dark by design and has no light theme. Keep text on its background at a contrast of 4.5 : 1 or more.

The logo, in the header of every page, is your photo in a circle beside your name in two lines: the first in Accent, the second in Light with an Accent dot. It is markup, not a picture of text:

<a href="index.html" aria-label="Brickfolio" class="@container relative block aspect-[2.2] w-[66px] … lg:w-[88px]" …>
<img src="assets/images/profile-javier-martinez.png" alt="" … class="absolute top-0 left-0 aspect-square h-full w-auto rounded-full object-cover" />
<span aria-hidden="true" class="absolute top-[10%] left-[49.43%] text-[20.45cqw] …">
<span class="block text-accent">Brick</span>
<span class="block pl-[0.083em] text-light">folio<span class="… rounded-full bg-accent …"></span></span>
</span>
</a>
  • The name: change Brick and folio (find and replace in files: >Brick<, >folio<), and the aria-label, what screen readers read. The name is sized to the box (66 × 30 on phones, 77 × 35 on tablets, 88 × 40 above): a much longer name runs past it.
  • The photo: the logo uses the profile photo, assets/images/profile-javier-martinez.png; replace that file and the logo and the profile card follow.
  • A logo file of your own: replace the <img> and the <span>s with one <img src="assets/images/logo.svg" alt="" class="size-full" /> in every page.

icon.png (192 × 192) is the browser tab’s icon and apple-icon.png (180 × 180) the home-screen icon, both in the root folder. As in the original design they are the profile photo in a circle, so the download ships grey placeholders: replace both with your photo or your mark.

The other icons (the arrow of the buttons, the plus and minus of the questions, the close cross, the stars, the calendar and the buildings of the experience cards) are Phosphor shapes drawn as inline <svg> in the pages; copy one from style-guide.html. A new icon is the <path d="…"> of a Phosphor SVG in the same <svg viewBox="0 0 256 256" fill="currentColor">. The marks shown over a hovered social link are the files in assets/icons/.

Inter (the text, with its italic for the accent words of the titles) and Fragment Mono (code in the posts) are in assets/fonts/, declared with @font-face at the top of src/css/style.css. The pages pin Inter’s optical size to 14 ([font-variation-settings:'opsz'_14] on <body>), as in the original design.

To use another font, put its .woff2 files in assets/fonts/, point the @font-face rules at them (keep the font-family name, or change --font-inter to the new name), and rebuild the stylesheet. Remove the optical-size class from <body> in every page if the new font has no such axis.

The text styles are groups of classes, the same on every page:

Style Classes Used for
H1 text-2xl leading-[1.2] font-medium md:text-[26px] lg:text-[28px] The headline of the profile card, a project’s or a post’s title
H2 text-xl leading-[1.2] font-medium md:text-[22px] lg:text-2xl Section titles, headings in the text (the accent word: font-bold italic)
Title text-[22px] leading-[1.2] font-medium md:text-2xl lg:text-[26px] “More Projects”, “More Posts”
H5 text-lg leading-[1.2] font-medium md:text-[19px] lg:text-xl Service titles, the two call-to-action lines
H6 text-sm leading-[1.2] font-medium md:text-base lg:text-lg Card titles, questions, experience roles
Paragraph text-sm leading-[1.4] font-normal Section texts, the profile text, form labels
Small text-xs leading-[1.4] font-normal Card texts, quotes, prices, answers
Button text-xs leading-[1.2] font-medium uppercase Button labels

To change a style everywhere, find and replace its classes in all files, then rebuild the stylesheet.

Set in @theme in src/css/style.css:

Width Class prefix
Phone below 810 px (none)
Tablet 810–999 px md:
Laptop 1000–1439 px lg:
Desktop 1440 px and up xl:

On phones and tablets Home is one column: the profile card, a line, then the sections. From 1000 px the profile card sits in a sidebar and sticks while the sections scroll beside it; from 1440 the copyright line moves to its foot. The project and post pages are a 1000 px column.

assets/css/style.css holds only the classes the pages use. Adding a class that no page uses yet, or changing the theme, needs a rebuild (Node.js 20 or newer):

Terminal window
npm install # once
npm run build:css # or npm run watch:css while you work

The build reads src/css/style.css and every .html file of the root and its folders (and assets/js/main.js), and writes the minified assets/css/style.css. Edit src/css/style.css, never the built file.

assets/js/main.js runs the motion with Motion:

  • the roles under the name step up every four seconds;
  • the testimonials and the client logos move left without end, at the box’s data-speed (10 and 20 pixels per second);
  • a service card’s faint photos brighten and its two columns move while it is hovered (from 810 px);
  • the social chips dim and the network’s mark appears on the hovered one;
  • the questions open and close, one at a time, and the phone menu drops in.

Every hover is CSS with one spring curve (ease-spring duration-spring). There are no page transitions and no scroll effects. With “reduce motion” switched on in the visitor’s system, the tickers stand still, the roles stay on the first one, and moves jump to their end; fades and colour changes stay.

Photos and cards have 10 px corners (8 px for the testimonial cards and the article covers), the newsletter box 20 px, and the pill buttons are round-ended. Cards and chips are framed by a 1 px hairline in White 5 % drawn inside the box. The orange pills carry a soft inner glow that grows on hover (shadow-pill, shadow-pill-hover); a hovered service card gets shadow-card-hover.