lietzsche;noether
Pages

updated 2026-11-26·2 min read

Extension CSS Variables

Scoped extension CSS conventions, dynamic React portal slot hosts, settings row tokens, and status bar tokens.

Standards and host CSS tokens for styling custom extension UI components, React portal slots, settings tabs, and status bar items.

1. Scoped Extension Styling

Scope extension stylesheets (styles.css, injected as <style id="noether-extension-style-<id>">) to an extension-specific class prefix and reference --noether-* host variables:

.noether-ext-word-counter {
  background-color: var(--noether-bg-card);
  border: 1px solid var(--noether-border-base);
  border-radius: 6px;
  padding: 8px 12px;
}

.noether-ext-word-counter .counter-badge {
  color: var(--noether-text-secondary);
  font-size: 0.85em;
}

2. Dynamic Portal Slot Containers

ExtensionPortalSlotHost mounts slots (workspace:root, editor:floating-toolbar, editor:minimap, editor:viewport-overlay, editor:subheader-actions, editor:content-overlay, editor:banner, editor:gutter) inside <div data-portal-slot="<slot>" className="pointer-events-none">. Interactive slot elements should enable pointer-events-auto and use standard surface/elevation tokens (--noether-bg-popover, --noether-border-base, --noether-shadow-2, --noether-shadow-3).

3. Settings Preferences Tokens

SettingCard, SettingItem, and SettingBuilder consume the core border and text tokens:

TokenDark DefaultLight DefaultUsage
--noether-border-subtle#202020#f0f0f2Divider between setting rows (noether-setting-item).
--noether-text-primary#ffffff#09090bSettingCard section heading color.
--noether-text-secondary#dcddde#27272aSettingItem title color.
--noether-text-muted#888888#52525bSettingItem description text color.

4. Status Bar Extension Items

Status bar widgets added via this.addStatusBarItem() render inside .noether-status-bar:

TokenDark DefaultLight DefaultUsage
--noether-bg-statusbar#1f1f1f#f4f4f5Bottom status bar background.
--noether-border-base#292929#e4e4e7Status bar top/left border.
--noether-text-muted#888888#52525bDefault status bar text and icon color.

Search wiki and portfolio

type to search across all entries.