Skip to content

Theme tokens ​

Every token, with its default (the default theme). Themes set tokens only; the engine's CSS (each component's styles, and styles/base.css) reads them. Sizes on the canvas are canvas px; the interface's are window px.

How themes are written, found and applied: Themes.

To override a token from the project's own CSS (Overriding tokens):

  • :root, [data-theme] { --ar-accent: … } in every theme. A plain :root reaches only default (and the tokens a theme leaves alone): each theme declares its tokens on the deck's element ([data-theme="x"]), and an element's own declaration beats what it inherits from :root.
  • [data-theme="aurora"] { … } in one theme.
  • [data-theme] .layout-section { … } for a token a theme sets inside a layout.
  • The project's CSS loads after araojs's, as it does from src/main.js (imported after araojs) or a deck's <style>: at equal specificity, the later rule wins.

The layouts' colours and sizes default to the tokens below, so --ar-accent restyles every layout at once.

Colours and type ​

TokenDefaultMeaning
--ar-bg#f6f3ecslide background colour
--ar-fg#1b2a3atext colour
--ar-muted#5b6b7bsecondary text (.muted, slide number, footer); on a section, its text colour at 85 %, on an overlay at 80 % (each layout sets it: their backgrounds are not --ar-bg)
--ar-accent#2a7de1h2, cover bar, section background (their layouts' defaults), progress, highlights
--ar-accent-fg#ffftext on accent (section slides)
--ar-on-image#ffftext over a picture: an overlay slide's text, its title and its footer (its layout's color default)
--ar-scrim#000the shade laid over a picture to keep the text on it legible: the colour of overlay's scrim, which the layout's scrim makes stronger or weaker
--ar-letterbox#1b2a3aaround the canvas when the window shape differs
--ar-font-sans"Gelasio", Georgia, seriftext font; a web font named here is fetched at build time (Fonts), as default's Gelasio is (Georgia's metrics; Georgia where it cannot be fetched)
--ar-font-monoui-monospace, Menlo, monospacecode font; a web font named here is fetched at build time
--ar-font-headingnone: the font around the heading (the text font)the headings' font (h1–h6 in a slide, the cover's and the section's titles included); a web font named here is fetched at build time
--ar-text-base42pxbase font size of a slide
--ar-title96pxthe type scale: h1 size; h2 is 0.6x; the slide title 0.6x and its subtitle 0.45x by default (--ar-title-size, --ar-subtitle-size); the cover's title 1.25x and the section's 1.4x by default (Layouts)
--ar-text-small.75em.text-sm (utility classes)
--ar-text-large1.25em.text-lg
--ar-text-xlarge1.6em.text-xl
--ar-highlight--ar-accent at 25 % over transparentthe marker behind .highlight text: a CSS background (a colour or a gradient)
--ar-placeholdercurrentColor (the text colour where drawn)colour of the missing-picture and missing-icon boxes

Spacing and shape ​

TokenDefaultMeaning
--ar-pad-y110pxslide padding, the safe margin: top and bottom (and the text side of image-*); the bottom is always at least --ar-footer-height, so the content never sits under the footer
--ar-pad-x140pxslide padding, the safe margin: both sides (and the footer's sides)
--ar-radius4pxcorner radius (Img rounded, placeholders)
--ar-gap-sm / -md / -lg24px / 48px / 80px.gap-sm, .gap, .gap-lg; md is the gap of .cols, .rows, .stack and .row; lg between split's sides; sm between grid's blocks and the footer's children

Inside what Slide.fit and the scales shrink (the body of a slide with .fit or a .scale-*, a block with a .scale-*), --ar-title, --ar-gap-sm, -md, -lg and --ar-text-base are declared again at the factor they shrink it by, from the slide's own value: whatever reads them there shrinks with the text, a heading, a gap, an Agenda, the CSS of your own layouts too (When it does not fit). Set them in a theme, at :root or on the slide; one set on the body or on that block is taken as given.

Sizes in em there are worked out on the slide, in the slide's text, before the factor:

  • one of those tokens given in em (a theme's --ar-gap-md: 1em) is the slide's text inside what fit and the scales shrink, and the text of the element that uses it everywhere else (a .text-lg around a .cols widens its gap there, not inside a fitted body);
  • a layout's own sizes are always worked out on the slide, so one given in em is the slide's text wherever it is drawn: a statement's or a quote's size="3em", a grid's icon-size, gap and text-size, split's gap, a caption's caption-size, the cover's title size and --ar-title-gap (as the header has them), and --ar-agenda-size.

Background, motion, addons ​

TokenDefaultMeaning
--ar-slide-bg-imagenonedefault slide background: a gradient, or url(…) relative to the theme file; drawn over the slide's own colour (a section's accent, style="background: …"), not on a slide with a Background
--ar-slide-bg-positioncenterits position
--ar-slide-bg-opacity1its opacity
--ar-step-duration.35sfade time of v-step (and of the glide of .collapse steps)
--ar-slide-duration.4sfade from one slide to the next
--ar-progress-height8pxProgressBar height
--ar-progress-duration.35sProgressBar's move to the new position
--ar-slide-number-size24pxSlideNumber's text size

A theme can leave a layout without its default background, and a slide can too: [data-theme="x"] .layout-section { --ar-slide-bg-image: none; }, Slide(style="--ar-slide-bg-image: none").

Slide zones and content ​

The title tokens style the slide's title (.ar-title: the heading its header starts with, in every layout), not every h1/h2; the subtitle tokens its subtitle (.ar-subtitle: the headings right after it, of another tag). The title looks the same whatever its tag, h1 or h2 (Titles). A layout may set them for its slides or style its own title: the cover's and the section's take their size from their layout (Layouts), the cover's is in the text colour, a section's title and subtitle in its text colour, a statement's is the statement.

TokenDefaultMeaning
--ar-title-size0.6x --ar-titlethe title's font size, whatever its tag
--ar-title-color--ar-accentthe title's colour
--ar-title-alignmatch-parent (as the slide's text)start, center, end: the title's and its subtitle's
--ar-title-gap0.6x the title's sizespace under the header (the title and its subtitle), before the body; a length (em there is the slide's text size)
--ar-subtitle-size0.45x --ar-titlethe subtitle's font size
--ar-subtitle-color--ar-muted (on a section: its text colour)the subtitle's colour
--ar-subtitle-gap.2em (of the subtitle)space above the subtitle, under the title
--ar-header-heightauto (as tall as the title)a length: a header band, at least this tall, the title centred in it, --ar-title-gap under the band
--ar-body-alignstartstart, center or end: where the body sits (on one slide, the classes .top, .center, .bottom set it); anything else is start
--ar-list-gap0space between list items
--ar-footer-height88pxthe footer band, at the bottom of the slide, in its bottom padding (made at least this tall where the footer shows)
--ar-footer-size24pxfooter text size
--ar-footer-color--ar-muted (on a section: its text colour)footer text colour
--ar-footer-alignspace-betweenhow the footer's children spread: flex-start, center, flex-end, space-between
TokenDefaultMeaning
--ar-table-pad.4em .8emcell padding
--ar-table-border2px solid the text colour at 15 %the line under every row (a CSS border)
--ar-table-head-bgnoneheader cells' background
--ar-table-head-color--ar-mutedheader cells' text colour
--ar-table-stripenonebackground of every other body row

Tokens may be set per layout, or on any element, like every token:

css
[data-theme="venue"] .layout-default { --ar-title-color: #fff; --ar-title-gap: 120px; } /* content slides */
[data-theme="venue"] .layout-section { --ar-footer-color: #fff; }
pug
table.dense(style="--ar-table-pad: 12px 20px")

Layouts ​

Each layout's CSS file (the library's layouts/, the project's src/layouts) reads tokens of its own, --ar-layout-<layout>-<thing>. Set them in a theme, in the project's CSS (as any token: :root, [data-theme], above), or on one slide, where each is also an attribute of Slide, its <thing> (Slide(layout="image-right" columns="3fr 2fr"): Layout parameters). A *-footer token is the footer's CSS display: none hides it, flex shows it; a slide's .no-footer or .with-footer wins over it. Their defaults, and every colour and size a layout draws with, are the tokens above or proportions of them, never literals (Its values): a theme that changes --ar-accent, --ar-title or --ar-on-image changes the layouts with it.

TokenAttributeDefaultMeaning
--ar-layout-cover-title-sizetitle-size1.25x --ar-titlethe cover's title size (its h1), and its .bar's in proportion
--ar-layout-cover-barbar--ar-accentthe colour of its .bar
--ar-layout-cover-footerfooternonethe deck's footer on covers
--ar-layout-section-bgbg--ar-accenta section's background (the theme's --ar-slide-bg-image is drawn over it)
--ar-layout-section-fgfg--ar-accent-fgits text, its title and its footer
--ar-layout-section-title-sizetitle-size1.4x --ar-titleits title size (its h1)
--ar-layout-section-footerfooternonethe deck's footer on sections
--ar-layout-split-columnscolumns1fr 1frthe two sides' widths (the body's two children), left to right, as CSS grid columns
--ar-layout-split-gapgap--ar-gap-lgthe space between them
--ar-layout-split-dividerdividernonea line between them, as a CSS border (2px solid currentColor)
--ar-layout-grid-columnscolumnsbalanced by the countblocks per row, whatever their count
--ar-layout-grid-rowsrowsnonehow many rows, whatever the count: a row holds the count divided by it, rounded up (up to 24 blocks; columns wins)
--ar-layout-grid-max-columnsmax-columns5the most blocks in a row: 13 and more wrap there, no balanced row is wider
--ar-layout-grid-gapgap--ar-gap-sm (x .75 from 11 blocks, x .5 from 12, x .4 from 16)the space between the blocks (the cards)
--ar-layout-grid-alignaligncentera block's content: center or start
--ar-layout-grid-cardscardsnoneeach block's background, making it a card (a colour, a gradient)
--ar-layout-grid-icon-sizeicon-size3em (2em from 9 blocks, 1.75em from 11, 1.5em from 12, 1.2em from 16)the size of a block's leading picture or icon
--ar-layout-grid-text-sizetext-size--ar-text-small (x .9 from 11 blocks, x .82 from 12, x .72 from 16, the h3 too)the size of a block's text, its p; 1em keeps the slide's (columns of text); given, it stays as given
--ar-layout-quote-sizesize0.8x --ar-titlethe quote's size
--ar-layout-quote-markmark'“'the decorative mark, a CSS string (quotes written: mark="'«'")
--ar-layout-quote-mark-colormark-color--ar-accentits colour
--ar-layout-quote-alignaligncentercenter or start
--ar-layout-statement-sizesize1.5x --ar-titlethe statement's size
--ar-layout-statement-colorcolor--ar-accentits colour
--ar-layout-statement-alignaligncentercenter or start
--ar-layout-overlay-positionpositionbottom-leftwhere the text sits, its lines aligned to that side: top-left, top, top-right, left, center, right, bottom-left, bottom or bottom-right (any other value is the default)
--ar-layout-overlay-scrimscrim.6how dense the scrim (--ar-scrim) between the picture and the text is, 0 (none; none too) to 1: darkest at the corner or side the text is at and fading away from it, an even veil for center
--ar-layout-overlay-colorcolor--ar-on-imagethe text's colour, its title's and its footer's
--ar-layout-caption-caption-sizecaption-size--ar-text-smallthe caption's size
--ar-layout-caption-caption-aligncaption-aligncenterthe caption's alignment
--ar-layout-image-left-columns / --ar-layout-image-right-columnscolumns1fr 1frthe two sides' widths, left to right, as CSS grid columns (3fr 2fr, 1fr 720px)
--ar-layout-image-left-inset / --ar-layout-image-right-insetinset0pxpadding around the picture in its zone
--ar-layout-image-left-footer / --ar-layout-image-right-footerfooterflexthe deck's footer on those slides, over the picture
--ar-layout-image-left-footer-bg / --ar-layout-image-right-footer-bgfooter-bgnonea backdrop under that footer (a colour, a gradient), to keep it legible over a photo
css
[data-theme="venue"] {
  --ar-layout-section-bg: #0b3d2e;
  --ar-layout-image-right-footer-bg: linear-gradient(transparent, color-mix(in srgb, var(--ar-scrim) 45%, transparent));
}

Code (Snippet) ​

TokenDefaultMeaning
--ar-code-themegithub-lightShiki theme; set to nothing, the code shows without colours
--ar-code-size42pxstandard code font size
--ar-code-width1520pxstandard window width
--ar-code-aspect16 / 9window shape (width / height); the window is as large as fits with this shape
--ar-code-bg#ffffffwindow background
--ar-code-bar#e9e6dftitle bar
--ar-code-fg#24292etext before colours load
--ar-code-muted#8b95a1line numbers
--ar-code-title#3b4048title bar text
--ar-code-title-size34pxtitle bar text size
--ar-code-hl--ar-accenthighlight colour: the line numbers of highlighted lines, and the highlight background unless --ar-code-hl-bg says
--ar-code-hl-bg--ar-code-hl at 14 % (a line) or 22 % (a word)background of highlighted lines and words; a pale colour keeps the code's colours legible on a light window (the tint of a dark highlight colour lowers their contrast)
--ar-code-radius14pxwindow corner radius
--ar-code-shadow0 30px 70px rgba(0,0,0,.35), 0 8px 20px rgba(0,0,0,.2), inset 0 0 0 1px rgba(255,255,255,.06)the window's shadow
--ar-code-shadow-room70pxroom kept on each side of the window in a column of .cols, .cols-* or .rows, a side of split or a zone (they clip what is wider than them), so its shadow is not cut: keep it at least the shadow's sideways reach, its blur + spread + x offset (the widest of its shadows; aurora sets 90px, carbon 80px). Only sideways: they clip no height
--ar-code-light-1 / -2 / -3#ff5f57 / #febc2e / #28c840the title bar's three lights, left to right
--ar-code-duration.3slines and words dimming and lighting up between steps

Agenda ​

Agenda's look, in any slide (and a hand-written ol.agenda's: its rows and numbers). Set them in a theme, at the project's :root, or on one slide, in its style (Slide(style="--ar-agenda-done-opacity: 1")). On a section slide, whose background is the accent, the section sets the colours to its text colour (currentColor; done at 80 % of it): change them for .layout-section, as --ar-title-color. An Agenda with :highlight="false" marks no state, whatever these say.

TokenDefaultMeaning
--ar-agenda-size0.65x --ar-titlethe rows' size: a length (px, em: the slide's text, or from the title's tokens), which Slide.fit and the scales shrink with the rest of the body; read from the slide (a theme, :root, the Slide), not from the Agenda itself
--ar-agenda-gap.35emthe space between rows
--ar-agenda-number-color--ar-accentthe numbers' colour
--ar-agenda-done-color / -number-color / -opacity / -weight--ar-muted at 80 % / its colour / 1 / 400a part already given (ar-agenda-done): dimmed by its colour, at least 3:1 on every built-in theme
--ar-agenda-current-color / -number-color / -opacity / -weight--ar-accent / --ar-agenda-number-color / 1 / 700the part the talk is in (ar-agenda-current)
--ar-agenda-upcoming-color / -number-color / -opacity / -weightcurrentColor / --ar-agenda-number-color / 1 / 400the parts still to come (ar-agenda-upcoming): those after the current one, every one before the first section
css
[data-theme="venue"] {
  /* an agenda that shows no state: the three states alike */
  --ar-agenda-done-color: currentColor;
  --ar-agenda-done-number-color: var(--ar-accent);
  --ar-agenda-current-color: currentColor;
  --ar-agenda-current-weight: 400;
}

Interface ​

The deck's own interface, outside the canvas (window px): the controls, the notice above them, the presenter view, the list of decks, the export. The controls and the export's notes pages sit inside the theme the deck wears; the presenter view and the list of decks sit outside every theme (set their tokens at :root).

TokenDefaultMeaning
--ar-ui-fontsystem-ui, -apple-system, "Segoe UI", Roboto, sans-serifthe interface's font (and the notes pages'); not fetched: a system font, or arao({ fonts: { families: [{ name, global: true }] } })
--ar-ui-monoui-monospace, "SFMono-Regular", Menlo, monospacecode in the presenter's notes
--ar-ui-text16pxthe interface's base text size; its other sizes are multiples of it
--ar-ui-duration.2spanels, notices and step dots coming and going
--ar-ui-duration-fast.15shover and press feedback
--ar-ui-duration-slow.25sthe floating controls showing and hiding

Controls (frosted glass) and the notice above them (the presenter window was blocked):

TokenDefaultMeaning
--ar-controls-bgrgba(28, 28, 34, .84)the bar's tint
--ar-controls-panel-bgrgba(28, 28, 34, .92)the jump menu's and theme picker's tint
--ar-controls-sheena white top-down gradient, .16 → .02the glass's sheen, over the tint
--ar-controls-blurblur(28px) saturate(180%) brightness(1.05)the backdrop filter
--ar-controls-shadowa drop shadow and a specular edgethe bar's and panels' box-shadow
--ar-controls-borderrgba(255, 255, 255, .16)the bar's and panels' border
--ar-controls-fgrgba(255, 255, 255, .94)text and icons
--ar-controls-dimrgba(255, 255, 255, .5)secondary text, step dots
--ar-controls-linergba(255, 255, 255, .14)dividers, the search field's border, swatch edges
--ar-controls-hover / --ar-controls-hover-shadowrgba(255, 255, 255, .1) / inset 0 1px 0 rgba(255, 255, 255, .1)a button or item under the pointer
--ar-controls-activergba(255, 255, 255, .16)the button of the open panel
--ar-controls-field-bg / --ar-controls-field-shadowrgba(255, 255, 255, .08) / inset 0 1px 2px rgba(0, 0, 0, .25)the search field
--ar-controls-scrollbarrgba(255, 255, 255, .2)the jump menu's scrollbar
--ar-controls-accent--ar-accent (docked in the presenter view: --ar-controls-fg)the current step dot, the current slide's number, the focused field
--ar-controls-radius8pxitems; buttons and the field 1.125x, the bar and panels 2x, the notice 1.5x, swatches .625x
--ar-toast-bg / --ar-toast-shadow / --ar-toast-link#1c1c22 / 0 12px 32px rgba(0, 0, 0, .35) / #8ab4ffthe notice (its text and border are the controls')

Presenter view (its own dark look, whatever the deck theme):

TokenDefaultMeaning
--ar-presenter-bg#14161bthe page
--ar-presenter-bar#101216the top bar
--ar-presenter-panel#1c1f26the next step's and the notes' panels, buttons, the length editor
--ar-presenter-hover#272b34a button under the pointer
--ar-presenter-frame#0d0f13where the next step would be, after the last one
--ar-presenter-line#2b2f39borders
--ar-presenter-edgergba(255, 255, 255, .16)the slides' own edge
--ar-presenter-fg / -dim / -strong#eceef2 / #949bab / #ffftext, secondary text, bold text in the notes
--ar-presenter-accent#5b9dffthe notes of the step just reached, a changed length, focus rings
--ar-presenter-low / -over#f5b13d / #ff5a4fthe countdown's last minutes / past the end (and an invalid length)
--ar-presenter-code-bg#2a2e38inline code in the notes
--ar-presenter-scrollbar#3a3f4bthe notes' scrollbar
--ar-presenter-shadow0 16px 40px color-mix(in srgb, var(--ar-presenter-bg) 85%, transparent)the length editor's shadow (it follows --ar-presenter-bg set at :root)
--ar-presenter-radius10pxbuttons, the slides' corners; panels 1.4x, the length editor 1.2x, its fields .8x, inline code .5x
--ar-presenter-notes-sizeclamp(18px, .85vw + 9px, 28px)the notes' text size

List of decks (/, its own dark look, whatever the decks' themes; its text sizes are multiples of --ar-ui-text, and each cover wears its deck's theme):

TokenDefaultMeaning
--ar-selector-bg#14161bthe page
--ar-selector-panel / -raised#1c1f26 / #222631a card (and the notice of a missing deck) / a card under the pointer
--ar-selector-frame#0d0f13a cover's frame: around a cover of another shape, and until it is drawn
--ar-selector-line / -line-hover#2b2f39 / #3c4252borders / a card's border under the pointer
--ar-selector-edgergba(255, 255, 255, .08)a cover frame's own edge
--ar-selector-sheen / -stillrgba(255, 255, 255, .11) / rgba(255, 255, 255, .05)going by in a frame until its cover is drawn / its still tint (reduced motion)
--ar-selector-fg / -dim#eceef2 / #949babtext / the count, a cover's heading, a path, the arrow
--ar-selector-accent#5b9dffthe heading's bar, the notice's edge, focus rings, the arrow under the pointer
--ar-selector-shadow0 18px 40px rgba(0, 0, 0, .38), 0 2px 8px rgba(0, 0, 0, .24)a card under the pointer
--ar-selector-radius14pxa card; a cover's frame .5x, the notice 5/7

Export (?export; canvas px for the notes pages):

TokenDefaultMeaning
--ar-export-bg#2a2a2ebehind the pages, on screen
--ar-notes-page-bg / -fg#fff / #1c1c22a notes page (&notes)
--ar-notes-page-muted / -line#5c5c66 / #d4d4daits head (the slide's number and title) and the rule under it
--ar-notes-page-step#8a5a00"From step n" over a step's notes
--ar-notes-page-text / -head-size / -step-size34px / 28px / 24pxits text sizes

Set by the engine, read-only: --ar-scale (the stage's current scale factor; 1 in export).