Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CSS variables

Flux styles its interface with a built-in stylesheet (src/ui/style.css). Two kinds of variables are available to it, and to your own CSS:

  • Flux variables - custom properties such as --shadow, declared once and read with var(--name).
  • GTK and Adwaita colors - named colors such as @accent_bg_color, provided by the toolkit and read with @name.

Overriding

Put overrides in ~/.config/flux/style.css. It loads on top of the active theme, always wins, and is reloaded when the file changes. To retune a Flux variable, redeclare it in :root:

:root {
  --font-mono: "Fira Code", monospace;
  --shadow: alpha(black, 0.4);
}

Flux variables

Declared in the built-in stylesheet. Uses counts the var() reads in that file.

VariableDefaultDeclared inUsesPurpose
--border-coloralpha(var(--color-fg), 0.1):root16Hairline borders on the sidebar, list rows, inputs, tooltips and toasts.
--color-accent@accent_bg_color:root24Primary accent background for selected and active elements.
--color-accent-fg@accent_fg_color:root34Text and icons drawn on top of --color-accent.
--color-accent-text@accent_color:root47Accent color for text, icons and borders on a plain background.
--color-card-bg@card_bg_color:root1Background color of file cards in the grid view.
--color-danger@red_3:root22Errors and destructive actions.
--color-fg@theme_fg_color:root60Default foreground color used across the UI.
--color-git-mod@blue_3:root2Git modified and mixed file states.
--color-git-staged@purple_3:root2Git staged file states.
--color-git-untracked@dark_2:root2Git untracked file states.
--color-headerbar-bg@headerbar_bg_color:root4Background color of the header bar and status bar.
--color-headerbar-fg@headerbar_fg_color:root9Foreground text and icons in the header bar.
--color-popover-bg@popover_bg_color:root1Background color of popovers and context menus.
--color-popover-fg@popover_fg_color:root12Foreground text and icons in popovers.
--color-sidebar-bg@sidebar_bg_color:root0Background color of the left sidebar.
--color-success@green_4:root4Success states and git additions.
--color-warn@orange_3:root8Warnings, restricted items and git conflicts.
--color-window-bg@window_bg_color:root6Main window background color.
--color-window-fg@window_fg_color:root14Main window foreground text and icons.
--disabled-opacity0.4:root4Opacity of disabled controls and of items being dragged.
--font-maininherit:root8Font family for interface text; inherit follows the system font.
--font-mono"JetBrains Mono", monospace:root9Monospace font family for list info, key caps, git badges and status text.
--shadowalpha(black, 0.25):root3Drop-shadow color of cards, popover menus and the selected sidebar row.
--shadow-hoveralpha(black, 0.35):root1Drop-shadow color of a hovered card.

GTK and Adwaita colors

These follow the system light or dark preference and accent color, so prefer them over hard-coded colors. Uses counts the references in the built-in stylesheet.

Named colors

ColorRoleUses
@accent_bg_colorAccent background for selected and active elements.2
@accent_fg_colorText and icons drawn on top of @accent_bg_color.3
@accent_colorAccent for text, icons and borders on a plain background.1
@window_bg_colorWindow background.1
@window_fg_colorWindow text and icons.1
@theme_fg_colorDefault foreground; also the base for translucent text, borders and hover tints.3
@headerbar_bg_colorHeader bar background.1
@headerbar_fg_colorHeader bar text and icons.1
@popover_bg_colorPopover background; the quick panel uses it.2
@popover_fg_colorPopover text; also the base for translucent tints on popovers.4
@sidebar_bg_colorSidebar background.1
@card_bg_colorBackground of file cards.1

Palette colors

Fixed GNOME palette colors. Unlike the named colors above, they do not change with the theme.

ColorRoleUses
@red_3Errors and destructive actions: broken symlinks, delete buttons, window close.1
@orange_3Warnings and restricted items: locked files, cut items, git conflicts.1
@green_4Success: full level bars and git added.1
@blue_3Git modified and mixed.1
@purple_3Git staged.1
@dark_2Git untracked.1