Skip to content

Theme tokens ​

Tokens are the CSS custom properties a theme redefines, usually in :root. These are the main tokens a theme can usefully change. Where a default names a GTK color, glimpse follows your GTK theme until you set the token. How to write a theme is in Write a theme.

glimpse-lens (the magnifier, and the color picker and ruler it runs as tools) loads only the built-in stylesheet. Your theme and ~/.config/glimpse/styles.css cannot change it.

Surfaces and text ​

TokenDefaultPaints
--gl-panelGTK's header bar colorthe bar's background
--gl-panel-fgGTK's window text colortext and icons on the bar
--gl-surfaceGTK's popover colorpopovers and other floating cards
--gl-surface-fgGTK's popover text colortext on popovers
--gl-notification--gl-surface mixed 8% toward --gl-surface-fgnotification cards
--gl-notification-fg--gl-surface-fgtext on notification cards
--gl-muted--gl-surface-fg at 65%secondary text and meter fills
--gl-dim--gl-surface-fg at 38%less important text
--gl-faint--gl-surface-fg at 22%the faintest text, empty meter tracks
--gl-borderGTK's border colorborders and separators
--gl-hover--gl-surface-fg at 8%the background under the pointer
--gl-active--gl-surface-fg at 16%the background of a pressed or open item
--gl-control--gl-border, strongerthe calendar's Today button, shown when you browse away from the current month or select another day
--gl-disabledGTK's disabled opacity, 0.5the opacity of a control you can't use

--gl-muted, --gl-dim and --gl-faint come out a little lighter in light mode than in dark, the same as dimmed text in GTK apps.

Accent and status ​

TokenDefaultPaints
--gl-accentGTK's accent colorthe current workspace in a labeled pager, today and the selected day in the calendar, prompt confirm buttons, the notification progress bar, sparkline marks and the checked screenshot tool's foreground
--gl-accent-fgGTK's text-on-accent colortext drawn on --gl-accent
--gl-accent-textGTK's accent text coloraccent-colored text, focus outlines, attention dots
--gl-accent-soft--gl-accent at 18%badges, highlighted groups, the checked screenshot tool's background
--gl-danger-textGTK's destructive colorerror text
--gl-danger-softGTK's destructive background at 18%the background behind errors
--gl-warning-textGTK's warning colorwarning text
--gl-warning-softGTK's warning background at 18%the background behind warnings

Shape, depth and type ​

TokenDefaultSets
--gl-radius0.95remthe corner radius of popovers, sheets and the screenshot editor's panels
--gl-shadowblack at 55%the shadow color the elevations use
--gl-elevation-raiseda small, soft shadowthe bar, where the outer shadow is clipped and not visible, and notifications in a list
--gl-elevation-floatinga larger shadowpopovers and notification popups
--gl-popup-paint-outset2.5remthe space reserved around a notification popup
--gl-font-family"Adwaita Sans", system-ui, sans-serifthe font on themed surfaces
--gl-font-family-mono"Adwaita Mono", monospacenumbers that must line up and monospace row text
--gl-text-caption0.85remsmall print
--gl-text-body1remregular text
--gl-text-title1.2remthe large heading at the top of a popover, the title of what is playing
--gl-text-display2.4remlarge numbers; the lock screen clock is 3.2 times this

Popovers ​

TokenDefaultSets
--applet-popover-width27remthe width of most popovers
--applet-popover-width-wide40remthe width of wide popovers
--applet-popover-padding0.8rempopover padding
--applet-popover-bg--gl-surfacethe popover body's background
--applet-popover-fg--gl-surface-fgpopover text
--applet-popover-radius--gl-radiusthe popover body's corner radius
--popover-shell-header-padding0.55rem 0.8rempopover header padding
--popover-body-spacing0.35remspacing in the popover body

Rows, meters and containers ​

TokenDefaultSets
--row-height2.85remthe minimum row height
--row-padding0 0.8remrow padding
--row-radius0.7remrow corner radius
--row-gap10pxspacing inside rows
--row-hover-bg--gl-hoveran interactive row's background under the pointer
--row-active-bg--gl-activean interactive row's background while pressed
--row-tone-warning--gl-warning-textwarning row icons, subtitles, values and meter fills
--row-tone-error--gl-danger-texterror row icons, subtitles, values and meter fills
--row-tone-destructive--gl-danger-textdestructive row titles and meter fills
--row-mono-font--gl-font-family-monothe font of monospace rows
--meter-row-height0.3remmeter bar thickness
--meter-row-trough--gl-faintmeter tracks
--meter-row-fill--gl-mutedmeter fills
--container-radius--row-radiuscontainer corner radius
--container-red, --container-orange, --container-yellow, --container-green, --container-blue, --container-purple--red-3, --orange-3, --yellow-3, --green-3, --blue-3, --purple-3container backgrounds and text of the corresponding color
--container-light, --container-dark--light-1, --dark-5light and dark container backgrounds and text

Per-widget tokens ​

These classes redeclare their own tokens. Set each token on the class shown, not in :root; a :root setting has no effect.

Set onTokenDefaultSets
.pager--gl-pager-dot, --gl-pager-wide, --gl-pager-pill0.5rem, 1.3rem, 1.8rempager dot, wide item and label pill sizes
.pager--gl-pager-gap0.18remspacing around pager items
.pager--gl-pager-idle, --gl-pager-occupied, --gl-pager-here--gl-panel-fg at 25%, 50% and 90%idle, occupied and current pager dots
.pager--gl-pager-text--gl-panel-fg at 55%pager label text
.calendar--gl-calendar-control2.4remcalendar header control size
.calendar--gl-calendar-cell3remday and month cell size
.calendar--gl-calendar-radius0.6remcalendar control and cell corner radius
.calendar--gl-calendar-gap0.2remspace above calendar event dots
.notice--gl-notice-radius0.7remnotice corner radius
.notification--gl-notification-radius1.1remnotification corner radius

For example, reduce the notification corner radius with:

css
.notification {
    --gl-notification-radius: 0.5rem;
}

Motion and blur ​

TokenDefaultSets
--gl-duration150msthe length of every transition; set by animation-speed, not by CSS
--gl-easecubic-bezier(0.2, 0, 0, 1)the easing of every transition
--gl-popup-motion0.75remhow far a notification popup slides in and out
--gl-blur-opacity60%how much of a blurred surface's color stays over the blur
--gl-blur-radius12pxblur on or off; below 10px there is no blur

Lock screen ​

Set these in lock.css, the file the lock screen reads.

TokenDefaultPaints
--gl-lock-fgwhitetext and icons
--gl-lock-dimblackthe layer that darkens the wallpaper
--gl-lock-fieldwhite at 16%the password field
--gl-lock-glass-hoverwhite at 18%buttons under the pointer
--gl-lock-shadeblack at 55%the default text shadow color and the background of error and Caps Lock notes
--gl-lock-text-shadow0 1px 3px var(--gl-lock-shade)the shadow on lock stage text
--gl-lock-error#ffc4bferror text
--gl-lock-warning#ffda97warning text

Screenshot editor ​

TokenDefaultPaints
--gl-shot-red, --gl-shot-yellow, --gl-shot-green, --gl-shot-blue, --gl-shot-whitered, yellow, green, blue, whitethe color swatches in the toolbar
--gl-shot-inkblackthe mark drawn on the yellow and white swatches
--gl-shot-ringblack at 45%the outline around a selected region
--gl-scrimblack at 55%the dimmed area outside a selection and behind the size readout
--gl-knobwhitethe selection outline, the size readout text, and the ring on today when it is selected in the calendar

Released under the BSD 3-Clause license.