This guide shows you how to customize Xanthan’s appearance, from quick color changes to creating a complete custom theme. Choose the level that fits your needs.
The fastest way to personalize your site is to change colors in assets/css/base.css.
The :root section defines color “variables” that your whole site uses. Change one variable, and every element using that color updates automatically:
:root {
/* Named colors - your palette */
--sage: #6b8e7f;
--warm-white: #f5f3f0;
--golden-clay: #b8956a;
/* Semantic variables - what colors are used for */
--bg-page: var(--warm-white);
--text-body: var(--sage-dark);
--accent-primary: var(--sage);
}
Xanthan uses a two-tier system for easy customization:
--sage: #6b8e7f)--bg-page: var(--sage))To change colors:
Change the page background from warm white to light blue:
:root {
/* Add your new color */
--light-blue: #e3f2fd;
/* Update the semantic variable */
--bg-page: var(--light-blue); /* was var(--warm-white) */
}
--navy: #1a1a1a;
--cream: #e0e0e0;
--teal: #00ff88;
--bg-page: var(--navy);
--text-body: var(--cream);
--accent-primary: var(--teal);
--pure-white: #ffffff;
--pure-black: #000000;
--bright-blue: #0055ff;
--bg-page: var(--pure-white);
--text-body: var(--pure-black);
--accent-primary: var(--bright-blue);
Beyond colors, you might want to adjust fonts, sizes, or spacing.
In base.css, update the font variables:
:root {
--font-heading: 'Your Heading Font', sans-serif;
--font-body: 'Your Body Font', sans-serif;
--font-mono: 'Your Code Font', monospace;
}
Remember: Add the font import at the top of base.css:
@import url('https://fonts.googleapis.com/css2?family=Your+Font&display=swap');
In assets/css/typography.css, adjust heading sizes:
h1 {
font-size: 2.5rem; /* Larger headings */
}
p {
font-size: 1.2rem; /* Bigger body text */
line-height: 1.8; /* More line spacing */
}
In base.css, adjust spacing variables:
:root {
--spacing-sm: 1.5rem; /* More space */
--spacing-md: 2rem;
--spacing-lg: 3rem;
}
If you just want to tweak a few colors or fonts, it’s easiest to just edit the base CSS files (like base.css or typography.css). But you might want to develop a coherent look that is completely different and your own. At that point, it’s best to create a new CSS file. This approach:
CSS files load in order, and later files override earlier ones:
base.css (defaults)typography.css, nav.css, cards.css (component styles)Your theme file only needs what you’re changing - everything else is inherited.
Best for: First-time theme creators who just want different colors/fonts
Xanthan includes simple-theme.css as a teaching example. It shows you how to:
To use it:
assets/css/simple-theme.css to my-theme.css:root section_includes/page-header.html:
<link href="/assets/css/my-theme.css" rel="stylesheet">
Example from simple-theme.css:
:root {
/* Your color palette */
--ocean-blue: #2c5f7c;
--cloud-white: #f7f9fb;
--pearl: #e8eef2;
/* Map to semantic variables */
--bg-page: var(--cloud-white);
--accent-primary: var(--ocean-blue);
--text-body: var(--charcoal);
}
The file includes detailed comments explaining each variable. Perfect for learning!
Best for: Experienced users who want to change visual styles beyond colors
For complete control, you can override individual element styles. Study dark-energy.css to see how. It demonstrates:
To use dark-energy.css:
_includes/page-header.html, uncomment:
<link href="/assets/css/dark-energy.css" rel="stylesheet">
To create your own advanced theme:
Copy dark-energy.css as a starting point and modify the element overrides to match your design vision.
Terra Cotta (terra-cotta.css) - The original Xanthan aesthetic with warm, earthy colors. A simple theme (variables only) showing the original design.
Activate any theme by uncommenting its link in _includes/page-header.html.
Contrast matters: Ensure text is readable against backgrounds. Use contrast checkers.
Test with real content: View changes across different page types - home, blog posts, guides.
Start small: Begin with colors, then add typography, then visual effects.
Use browser DevTools: Inspect elements to see which CSS rules apply and experiment with changes before editing files.
Hex codes: Colors use 6-digit codes like #6b8e7f:
##ffffff = white, #000000 = blackColors didn’t change:
base.cssTheme not showing:
page-header.html<link> tag is uncommentedassets/css/Some elements unchanged:
!important to the property: color: var(--teal) !important;Want to switch themes:
<link> tag with <!-- and --><link> tagOnce you’re comfortable with appearance customization:
nav.css, cards.css, and typography.css