| name | customize-frontend-theme |
| description | Guidelines and instructions for customizing the frontend CSS theme system, modifying design tokens (colors, typography, spacing, border radius, shadows, glassmorphism) in styles.css, and leveraging or extending core UI components. |
Looker Embed Portal - Customizing Design & Theme
This skill provides step-by-step instructions and references for changing the look and feel of the Looker Embed Portal, configuring HSL color systems, modifying CSS theme variables, customizing typography, and using or extending the core layout components.
1. Theme Configuration & Custom CSS Variables
All styling, branding, and layouts are centralized inside styles.css using CSS custom properties (variables).
To customize the branding, typography, spacing, border radii, or colors, modify the corresponding variables defined under the :root selector.
Colors (HSL-based Palette)
Colors are structured with a raw HSL definition (--color-name-raw) and a computed variable (--color-name). This dual-variable setup allows opacity manipulation using standard CSS rgba() or color-mix() when needed.
Example layout in :root:
--color-primary-raw: 217, 89%, 43%;
--color-primary-hover-raw: 217, 89%, 33%;
--color-primary-light-raw: 217, 90%, 91%;
--primary: hsl(var(--color-primary-raw));
--primary-hover: hsl(var(--color-primary-hover-raw));
--primary-light: hsl(var(--color-primary-light-raw));
To swap color themes (e.g. from Google Blue to Looker Purple, or Warm Slate):
- Locate the brand colors section under
:root in styles.css.
- Change the raw values for
--color-primary-raw, --color-accent-raw, --color-surface-raw, etc.
- Keep semantic colors (like
--color-success-raw or --color-error-raw) in sync to match contrast requirements.
Typography & Google Fonts
Google Fonts (Inter and Outfit) are imported at the top of styles.css:
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');
:root {
--font-sans: 'Inter', system-ui, -apple-system, sans-serif;
--font-heading: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}
To customize fonts:
- Update the
@import url(...) rule with your desired Google Fonts or local font stylesheet.
- Update
--font-sans and --font-heading tokens.
Dark Mode
Dark mode is activated when the .dark class is present on the HTML root element (document.documentElement), or via system preference media queries.
Variables that change per theme are overridden in the @media (prefers-color-scheme: dark) blocks and inside html.dark.
To customize the dark mode theme:
- Modify values inside
html.dark or @media (prefers-color-scheme: dark) in styles.css.
- Ensure high contrast levels are maintained against dark background surfaces (
--color-background-raw: 240, 3%, 8%).
Spacing System
Spacing is built on a standard 4px block scale. Do not hardcode margins, heights, or paddings. Use the variables instead:
--space-1: 0.25rem (4px)
--space-2: 0.5rem (8px)
--space-4: 1rem (16px)
--space-6: 24px
--space-8: 2rem (32px)
--space-10: 2.5rem (40px)
--space-12: 3rem (48px)
2. Component System Usage & Extensions
Components are imported from the central exports file: @/components or relative ../components paths.
All custom components support standard element properties (such as className, onClick, style, etc.) via prop forwarding, enabling clean style overrides.
Card Component
Use for layout cards, panels, or content segments.
PageHeader Component
Use at the top of route views to supply breadcrumbs, page headers, action buttons, and subtitles consistently.
EmbedPlaceholder Component
Provides a clean, dashed skeleton placeholder designed to represent pending iFrames, dashboard templates, or missing embeds.
HeroBanner Component
Large banner component used for greetings, marketing, or highlight notifications.
AppCard Component
Shortcuts linking to primary applications with dynamic Lucide Icons and colors.
- Props:
to: string
title: React.ReactNode
description?: React.ReactNode
icon: React component
iconColor?: string (CSS class name for icon color, defaults to text-primary)
iconBgColor?: string (CSS class name for icon background, defaults to bg-primary-light)
3. Best Practices & Verification
When styling new components or customizing the theme, follow these guidelines:
- Avoid Hardcoded Style Helpers: Do not use ad-hoc background colors or margins. Always reference CSS variables (
var(--primary), var(--space-4)).
- Support Dark Mode Out of the Box: Ensure that any text/color overrides are checked against dark mode to avoid unreadable text overlay contrast.
- Propagate Class Names: When creating a component, make sure it extends standard HTML elements and spreads
className using template literals:
className={`component-base ${className}`}
- Export from index.ts: Whenever a new component is defined, add it to components/index.ts to maintain a single modular entry point.
- Verification: Always verify changes by running
pnpm run build in the frontend directory.