@gaia-awesome/theme
v0.1.0
Published
Gaia theme for Web Awesome.
Readme
Gaia Theme
Reusable Gaia theme package for Web Awesome.
Install
npm install @gaia-awesome/theme @awesome.me/webawesome@awesome.me/webawesome is a peer dependency. Install and configure Web
Awesome using Web Awesome's own CDN, npm, download, and base-path instructions;
this package only adds Gaia styling on top. It does not replace Web Awesome's
loader, component imports, runtime assets, or setBasePath() setup. This
package also consumes Gaia design tokens from @vsn-ux/gaia-styles.
Which stylesheet should I import?
Use the full theme in most npm/bundled apps. Import Web Awesome's base
stylesheet first, then the Gaia theme. Web Awesome components are still imported
from @awesome.me/webawesome according to Web Awesome's own docs.
import "@awesome.me/webawesome/dist/styles/webawesome.css";
import "@gaia-awesome/theme/styles/gaia.css";Use gaia-core.css when the app already owns native HTML styling. It includes
the Gaia palette, semantic variants, tokens, dimensions, and Web Awesome
component overrides. It excludes native HTML element styling.
import "@gaia-awesome/theme/styles/gaia-core.css";Use gaia-native.css only when adding Gaia native HTML styling separately.
This native layer is intentionally baseline styling for common HTML elements;
it does not yet aim to mirror the full Web Awesome native utility matrix.
import "@gaia-awesome/theme/styles/gaia-native.css";Apply the theme and palette classes to the document root.
<html class="wa-theme-gaia wa-palette-gaia"></html>This package targets Web Awesome >=3.6.0 <4.
Package exports
@gaia-awesome/theme: imports the full Gaia theme stylesheet as a side effect.@gaia-awesome/theme/styles/gaia.css: full Gaia theme plus native element styling.@gaia-awesome/theme/styles/gaia-core.css: Web Awesome theme tokens, palette, dimensions, and component overrides.@gaia-awesome/theme/styles/gaia-native.css: Gaia native element styling only.
The package publishes built CSS under dist/ and source CSS under src/styles/
so bundlers can use the style, development, or default export conditions.
Build and verify
The theme uses vp build rather than vp pack because Vite handles CSS import
inlining and URL rebasing for the split stylesheet sources.
vp run @gaia-awesome/theme#build
npm_config_cache=/private/tmp/npm-cache-gaia npm pack --dry-runOwnership model
wa-*elements and their public APIs belong to Web Awesome.wa-theme-gaiaandwa-palette-gaiabelong to@gaia-awesome/theme.- Gaia-owned theme tokens use
--gaia-*. - Gaia-owned data attributes use
data-gaia-*. - Gaia-owned custom events use
gwc-*.
Gaia component overrides must prefer semantic Web Awesome tokens first. Use
::part(), :state(), and component-local custom properties only when tokens
are not expressive enough.
Gaia page shell
The canonical Gaia application shell is <gwc-page> from
@gaia-awesome/components. Its internal layout CSS lives with the component so
the theme package stays focused on tokens and Web Awesome primitive styling.
Use it for Gaia SaaS shells that need persisted sidebar state, pinned or
floating desktop navigation, explicit aside state, and product-app layout rules;
use Web Awesome's <wa-page> for generic page composition.
The theme only adds light-DOM polish for shell content that apps provide, such as header action alignment, navigation search inputs, module selects, and card headings.
<gwc-page
mobile-breakpoint="920"
storage-scope="approval"
sidebar-open
sidebar-pinned
persist-sidebar
>
<header slot="header">
<gwc-page-menu-toggle controls="app-navigation"></gwc-page-menu-toggle>
<div data-gaia-page-region="actions"></div>
</header>
<gwc-page-navigation id="app-navigation" slot="navigation"></gwc-page-navigation>
<main
id="main-content"
class="wa-grid wa-gap-m"
style="--min-column-size: var(--gaia-page-card-min-width, 24rem)"
>
<wa-card></wa-card>
</main>
</gwc-page>The shell exposes component-local hooks such as --gwc-page-sidebar-width,
--gwc-page-aside-width, --gwc-page-header-height, and
--gwc-page-main-padding. Main content layout is opt-in: Web Awesome's
wa-grid, wa-stack, wa-cluster, wa-split, wa-flank, wa-frame, gap
classes, and wa-span-grid are already available from webawesome.css. The
theme provides --gaia-page-card-min-width for recipes that opt into a
responsive card grid.
Semantic brand mapping
Gaia brand semantics intentionally combine the Gaia secondary peach tint for quiet and normal fills with the Gaia primary deep blue for loud fills. This is a Gaia semantic mapping, not a single-hue Web Awesome brand ramp.
