Skip to content
astrostyle v0.6.2

Blocks

The Design Guide's own motifs, turned into components: mastheads, section headings and subheadings, windows, cards, side-tab boxes, segment bars, swatches and the textured surfaces. These pages use them for their own headings and cards.

Masthead 01

Style guide 01

Graphics

<header class="ap-c-masthead">
  <p class="ap-c-masthead__eyebrow">Style guide 01</p>
  <h1 class="ap-c-masthead__title">Night Heron</h1>
</header>

One per page, with the page's <h1> as the title (this sample uses a paragraph, so the page keeps one <h1>). The title grows with the viewport between 1.2× and 2.4× the display size.

Tokens of masthead: set them on the element, on a parent or in a modifier.
TokenDefault
--ap-masthead-gapvar(--ap-space-xs)
--ap-masthead-eyebrow-colorvar(--ap-text-muted)
--ap-masthead-title-colorvar(--ap-text)
--ap-masthead-title-sizeclamp(var(--ap-text-display-size) * 1.2, 8vw, var(--ap-text-display-size) * 2.4)
--ap-masthead-title-leading0.95

Section heading 02

Ship log 07

A much longer section title that has to wrap on a phone 08

<h2 class="ap-c-section-heading" id="graphics">Graphics <span class="ap-c-section-heading__index">01</span></h2>

Every heading on these pages is one. The rule fills the space between title and index and is never announced; the index is optional.

Tokens of section-heading: set them on the element, on a parent or in a modifier.
TokenDefault
--ap-section-heading-colorvar(--ap-link)
--ap-section-heading-gapvar(--ap-space-md)
--ap-section-heading-rule-colorcurrentcolor
--ap-section-heading-rule-widthvar(--ap-border-width-hairline)
--ap-section-heading-index-colorcurrentcolor

Subheading 03

Colors

Sensors

<h3 class="ap-c-subheading">Colors</h3>

Write the title only: the slashes are generated content that screen readers skip. Change them with --ap-subheading-slash (a CSS string).

Tokens of subheading: set them on the element, on a parent or in a modifier.
TokenDefault
--ap-subheading-colorvar(--ap-text)
--ap-subheading-slash"/"
--ap-subheading-slash-colorvar(--ap-accent)
--ap-subheading-gapvar(--ap-space-sm)

Window 04

Export as image

02

Pick a size and a format, then export the sector map.

Comms

A window with data-ap-theme="dark" on a light page, and no index.

<section class="ap-c-window" aria-labelledby="export">
  <div class="ap-c-window__bar">
    <h3 class="ap-c-window__title" id="export">Export as image</h3>
    <span class="ap-c-window__index">02</span>
  </div>
  <div class="ap-c-window__body">…</div>
</section>

The bar uses the theme's inverse colors: dark on the light theme, light on the dark one. The body has no layout: add an object to it.

Tokens of window: set them on the element, on a parent or in a modifier.
TokenDefault
--ap-window-bgvar(--ap-bg)
--ap-window-fgvar(--ap-text)
--ap-window-border-colorvar(--ap-border-strong)
--ap-window-radiusvar(--ap-radius-control)
--ap-window-bar-bgvar(--ap-text)
--ap-window-bar-fgvar(--ap-bg)
--ap-window-bar-padding-blockvar(--ap-space-xs)
--ap-window-bar-padding-inlinevar(--ap-space-md)
--ap-window-index-bgvar(--ap-accent)
--ap-window-index-fgvar(--ap-on-accent)
--ap-window-paddingvar(--ap-space-lg)

Card 05

Night Heron

Light freighter, crew of four.

Link cardThe whole card is one link: hover it or tab to it.
Dark cardThe guide's dark card for light swatches, with data-ap-theme="dark".
<article class="ap-c-card ap-o-stack ap-o-stack--gap-sm" aria-labelledby="heron">
  <h3 class="ap-c-card__title" id="heron">Night Heron</h3>
  <p>Light freighter, crew of four.</p>
</article>
<a class="ap-c-card ap-o-stack" href="/fleet/heron">…</a>

A card is a surface without layout: combine it with an object. As a link or a button it shows the accent border on hover and the focus ring.

Tokens of card: set them on the element, on a parent or in a modifier.
TokenDefault
--ap-card-bgvar(--ap-surface-1)
--ap-card-fgvar(--ap-text)
--ap-card-border-colorvar(--ap-border-subtle)
--ap-card-hover-border-colorvar(--ap-accent)
--ap-card-radiusvar(--ap-radius-card)
--ap-card-paddingvar(--ap-space-lg)

Tabbed box 06

Free resources

Fonts, textures and templates from the Creator Kit.

<section class="ap-c-tabbed-box" aria-labelledby="resources">
  <h3 class="ap-c-tabbed-box__tab" id="resources">Free resources</h3>
  <div class="ap-c-tabbed-box__body">…</div>
</section>

The tab is a label, not a control, and reads from bottom to top. Keep it to one or two words.

Tokens of tabbed-box: set them on the element, on a parent or in a modifier.
TokenDefault
--ap-tabbed-box-border-colorvar(--ap-accent)
--ap-tabbed-box-radiusvar(--ap-radius-control)
--ap-tabbed-box-bgtransparent
--ap-tabbed-box-fgvar(--ap-text)
--ap-tabbed-box-tab-bgvar(--ap-accent)
--ap-tabbed-box-tab-fgvar(--ap-on-accent)
--ap-tabbed-box-tab-paddingvar(--ap-space-sm)
--ap-tabbed-box-paddingvar(--ap-space-lg)

Segment bar 07

<ul class="ap-c-segment-bar" aria-label="Blacks">
  <li class="ap-c-segment-bar__segment">Rich black</li>
  <li class="ap-c-segment-bar__segment">ASTROPRISMA Black</li>
</ul>

A legend, not a control. Segments share the width and wrap when it runs out; narrow the window to see the dividers follow.

Tokens of segment-bar: set them on the element, on a parent or in a modifier.
TokenDefault
--ap-segment-bar-border-colorvar(--ap-border-strong)
--ap-segment-bar-radiusvar(--ap-radius-card)
--ap-segment-bar-bgtransparent
--ap-segment-bar-fgvar(--ap-text)
--ap-segment-bar-padding-blockvar(--ap-space-sm)
--ap-segment-bar-padding-inlinevar(--ap-space-lg)

Swatch 08

ASTROPRISMA Pink#ef476e
Gradient Indigo#54009d
Accent
<div class="ap-c-swatch" style="--ap-swatch-color: var(--ap-palette-pink)">
  <span class="ap-c-swatch__chip"></span>
  <strong class="ap-c-swatch__name">ASTROPRISMA Pink</strong>
  <code class="ap-c-swatch__value">#ef476e</code>
</div>

The palette on the Foundations page is built with it. The value is optional.

Tokens of swatch: set them on the element, on a parent or in a modifier.
TokenDefault
--ap-swatch-colortransparent
--ap-swatch-chip-sizevar(--ap-size-control-lg)
--ap-swatch-chip-radiusvar(--ap-radius-control)
--ap-swatch-border-colorvar(--ap-border)
--ap-swatch-gapvar(--ap-space-sm)
--ap-swatch-value-colorvar(--ap-text-muted)

Surface 09

Halftone + noiseThe guide's print filter.
NoiseA fine grain only.
CRTScanlines on a dark card.
<div class="ap-c-surface ap-c-surface--halftone ap-c-surface--noise">…</div>

.hero { @include ap.surface(halftone); }   // Sass: the same texture on any rule

Decoration only: textures sit behind the content and never go under forms, tables or long text. --halftone and --crt share one layer; --noise adds to either.

Tokens of surface: set them on the element, on a parent or in a modifier.
TokenDefault
--ap-surface-patternnone
--ap-surface-pattern-sizeauto
--ap-surface-pattern-opacity1
--ap-surface-grainnone
--ap-surface-grain-sizeauto
--ap-surface-grain-opacity1