5.7.3
Looks
Switch the Starter from Minimal to another Astronomic UI look by uncommenting one line.
The Starter uses Astronomic UI’s default look, Minimal: the Geist typeface, neutral grays and soft corners. Five other looks change the colors, corners, shadows and fonts. Every page part follows the look, in light and dark mode.
Pick a look
Open src/styles/global.css. It has one commented line for each look. Uncomment one line: remove the /* and */ around it.
@import "./looks/soft.css";
| Look | Line to uncomment | Fonts |
|---|---|---|
| Minimal (default) | none: keep every look line commented out | Geist |
| Clean | ./looks/clean.css |
Inter |
| Modern | ./looks/modern.css |
Plus Jakarta Sans |
| Playful | ./looks/playful.css |
Bricolage Grotesque and Nunito |
| Soft | ./looks/soft.css |
Figtree |
| Ink | ./looks/ink.css |
Newsreader and Libre Franklin |
Uncomment one line at most.
Each file in src/styles/looks/ loads one Astronomic UI preset, which sets the design tokens (colors, corners, shadows, spacing, type), and points the type tokens at its fonts. The line comes after the kit’s own tokens, so its values win, and every part reads them.
Load the fonts
There is nothing to install. Every look’s fonts are already declared in astro.config.mjs, and the browser downloads only the fonts the look you picked uses.
Remove the look demo
The “Try a look” buttons on the home page put each look on that page only, so visitors can compare them. They do not change your site’s look. Keep global.css on Minimal while the demo is on the page: its Minimal button shows the look global.css sets.
Once you have picked your look, remove the demo:
- In
src/pages/index.astroandsrc/system/Sections.astro, remove theLookSwitchandLookCodeimports and tags. - Delete
src/components/LookSwitch.astro,src/components/LookCode.astro,src/styles/looks.scoped.css,scripts/scope-looks.mjsandscripts/scope-looks.test.mjs, and thelooks:scopeandtest:looksscripts inpackage.json. - In
src/site.ts, removehome.look, and change the “Pick a look” step’s text.
Nothing else uses data-look on <html>, so the site then has one look: the one in global.css.
Share images
The share images keep their own colors and font, in src/share-card.ts. They copy Minimal’s light colors. If you pick another look, change the colors there too.
Light and dark
Light and dark mode follow the visitor’s system, and a moon button in the nav lets them pick. To turn the button off, set modeSwitch to false in src/theme.look.ts.