Skip to main content

LINUX

Constant LINUX 

Source
pub const LINUX: &str = "/*\n * lumen-skin-linux - libadwaita-leaning neutral skin for Linux desktops.\n *\n * Activated via `<root skin=\"linux\">` (or `[skin] name = \"linux\"` /\n * `\"auto\"` on Linux in lumen.toml). Linux has no single native look -\n * GNOME/Adwaita is the largest documented target and its flat\n * low-chrome look degrades gracefully on other desktops, so this skin\n * leans adwaita (libadwaita ~1.5/1.6-era geometry, 1.7 blue-tinted\n * dark greys). Light-first with a full dark override. Colors are the\n * documented libadwaita CSS variables; most metrics are honest\n * estimates (the current GNOME HIG publishes no numeric control sizes).\n *\n * Signatures reproduced: flat borderless controls filled with\n * currentColor-alpha overlays (rest ~10%, hover ~15%, active ~23%),\n * bold solid-accent suggested-action button, large 46x26 pill switch\n * with white knob (both `<toggle>` and the dedicated `<switch>` element\n * share this geometry - GNOME has one switch look), thin accent slider\n * trough, 12px-radius popovers / cards, the documented 50%-opacity\n * disabled treatment (state-routed `:disabled { opacity }`, and the\n * `disabled-opacity` fallback below for controls with no `:disabled`\n * rule of their own), and the single 2px accent-alpha focus ring, the\n * one platform focus style Lumen reproduces exactly.\n */\n\n:root {\n  --lumen-accent: #3584e4;\n  --lumen-accent-hover: #2f77ce;\n  --lumen-accent-active: #2a6ab8;\n  --lumen-on-accent: #ffffff;\n\n  --lumen-window-bg: #fafafb;\n  --lumen-surface: #0000001a;\n  --lumen-surface-hover: #00000026;\n  --lumen-surface-active: #0000003b;\n  --lumen-input-bg: #ffffff;\n\n  --lumen-panel: #ffffff;\n  --lumen-panel-hover: #00000012;\n\n  --lumen-border: #00000026;\n  --lumen-border-subtle: #0000001a;\n  --lumen-border-strong: #00000040;\n\n  --lumen-text: #000006cc;\n  --lumen-text-muted: #00000670;\n  --lumen-disabled-bg: #0000000d;\n\n  --lumen-track: #00000026;\n  --lumen-track-hover: #00000033;\n  --lumen-track-active: #00000040;\n  --lumen-knob: #ffffff;\n\n  --lumen-focus-ring: #3584e480;\n  --lumen-focus-ring-width: 2;\n\n  --lumen-radius-sm: 6;\n  --lumen-radius: 6;\n  --lumen-radius-lg: 12;\n  --lumen-shadow-panel: 0 4 12 #00000026;\n  --lumen-shadow-dialog: 0 12 36 #00000033;\n  --lumen-backdrop: #00000040;\n  --lumen-scrollbar-thumb: #00000059;\n  /* Tooltip dwell (ms) / cursor gap (px) - GTK-ish defaults. */\n  --lumen-tooltip-delay: 500;\n  --lumen-tooltip-offset: 12;\n\n  /* Indeterminate <progress> sweep period (ms) and moving-chunk width\n     as a fraction of the track. */\n  --lumen-progress-period: 1200;\n  --lumen-progress-chunk: 0.3;\n\n  /* Toggle / switch knob inset (px) and the slider thumb diameter (px). */\n  --lumen-knob-inset: 4;\n  --lumen-thumb-size: 16;\n\n  /* Gap (px) between a dropdown/menu trigger and its floating panel. */\n  --lumen-popup-gap: 4;\n\n  /* Opacity for a disabled control with no `:disabled { opacity }` /\n     `:disabled { bg }` rule of its own (view-switcher tabs, popover\n     rows) - the same 50% adwaita uses everywhere else. */\n  --lumen-disabled-opacity: 0.5;\n\n  /* Text-input caret. */\n  --lumen-caret-width: 2;\n  --lumen-caret-blink: 530ms;\n\n  /* Line-height multiplier. */\n  --lumen-line-height: 1.2;\n\n  /* Overlay scrollbar geometry / hover feedback / fade timing - GTK\'s\n     overlay scrollbars use the same mechanics Lumen implements, so the\n     shared runtime defaults apply as-is. */\n  --lumen-scrollbar-thickness: 8;\n  --lumen-scrollbar-thickness-thin: 4;\n  --lumen-scrollbar-margin: 2;\n  --lumen-scrollbar-min-thumb: 24;\n  --lumen-scrollbar-track-hover: #80808029;\n  --lumen-scrollbar-hover-boost: 1.6;\n  --lumen-scrollbar-fade-delay: 1000ms;\n  --lumen-scrollbar-fade-duration: 250ms;\n\n}\n\n@media (prefers-color-scheme: dark) {\n  :root {\n    --lumen-accent: #3584e4;\n    --lumen-accent-hover: #4a90e8;\n    --lumen-accent-active: #5f9feb;\n    --lumen-on-accent: #ffffff;\n\n    --lumen-window-bg: #222226;\n    --lumen-surface: #ffffff1a;\n    --lumen-surface-hover: #ffffff26;\n    --lumen-surface-active: #ffffff3b;\n    --lumen-input-bg: #1d1d20;\n\n    --lumen-panel: #36363a;\n    --lumen-panel-hover: #ffffff12;\n\n    --lumen-border: #ffffff26;\n    --lumen-border-subtle: #ffffff1a;\n    --lumen-border-strong: #ffffff40;\n\n    --lumen-text: #ffffff;\n    --lumen-text-muted: #ffffff8c;\n    --lumen-disabled-bg: #ffffff0d;\n\n    --lumen-track: #ffffff26;\n    --lumen-track-hover: #ffffff33;\n    --lumen-track-active: #ffffff40;\n    --lumen-knob: #ffffff;\n\n    --lumen-focus-ring: #81d0ff80;\n\n    --lumen-shadow-panel: 0 4 12 #00000059;\n    --lumen-shadow-dialog: 0 12 36 #00000066;\n    --lumen-backdrop: #00000059;\n    --lumen-scrollbar-thumb: #ffffff59;\n  }\n}\n\n/* === Base ===\n * Adwaita Sans (Inter variant, GNOME 47+) at the long-standing 11pt ~\n * 15px GNOME default; Cantarell / DejaVu are the pre-47 fallbacks.\n */\nroot {\n  bg: var(--lumen-window-bg);\n  text-color: var(--lumen-text);\n  font-family: \"Adwaita Sans\", Inter, Cantarell, \"DejaVu Sans\", sans-serif;\n  font-size: 15;\n  line-height: var(--lumen-line-height);\n}\n\n/* === Buttons ===\n * Flat, borderless, fg-alpha fill; disabled = the documented 50 %\n * opacity of the whole control.\n */\nbutton {\n  bg: var(--lumen-surface);\n  radius: var(--lumen-radius);\n  padding: 5 14;\n  min-height: 34;\n  text-color: var(--lumen-text);\n  transition: bg 150ms ease;\n}\nbutton:hover { bg: var(--lumen-surface-hover); }\nbutton:active { bg: var(--lumen-surface-active); }\nbutton:focus-visible { outline: 2 var(--lumen-focus-ring); }\nbutton:disabled { bg: var(--lumen-disabled-bg); opacity: 0.5; }\n\n/* Suggested-action: bold solid accent [ADW style-classes]. */\nbutton.primary {\n  bg: var(--lumen-accent);\n  text-color: var(--lumen-on-accent);\n  font-weight: 700;\n}\nbutton.primary:hover { bg: var(--lumen-accent-hover); }\nbutton.primary:active { bg: var(--lumen-accent-active); }\nbutton.primary:disabled { bg: var(--lumen-disabled-bg); opacity: 0.5; }\n\n/* === Entries (text fields) ===\n * Recessed borderless wells.\n */\ninput,\ntextarea {\n  bg: var(--lumen-input-bg);\n  radius: var(--lumen-radius);\n  padding: 5 10;\n  min-height: 34;\n  min-width: 160;\n  text-color: var(--lumen-text);\n  caret-width: var(--lumen-caret-width);\n  caret-blink: var(--lumen-caret-blink);\n}\ninput:hover, textarea:hover { bg: var(--lumen-input-bg); }\ninput:focus, textarea:focus { outline: 2 var(--lumen-focus-ring); }\ninput:disabled, textarea:disabled { bg: var(--lumen-disabled-bg); opacity: 0.5; }\n\n/* === Switch (GtkSwitch) ===\n * Large 46x26 pill with a white knob.\n */\ntoggle {\n  width: 46;\n  height: 26;\n  min-width: 46;\n  radius: 13;\n  bg: var(--lumen-track);\n  knob-color: var(--lumen-knob);\n  knob-inset: var(--lumen-knob-inset);\n  transition: bg 150ms ease;\n}\ntoggle:hover { bg: var(--lumen-track-hover); }\ntoggle:active { bg: var(--lumen-track-active); }\ntoggle:checked { bg: var(--lumen-accent); }\ntoggle:focus-visible { outline: 2 var(--lumen-focus-ring); }\ntoggle:disabled { bg: var(--lumen-disabled-bg); opacity: 0.5; }\n\n/* === Switch ===\n * `<switch>` is a separate element from `<toggle>`, but GNOME has only\n * one switch look, so it gets the same 46x26 pill and colors. The\n * `transition` here is not for a bg tween (adwaita switches don\'t tint\n * on hover) - it sets the duration/easing the thumb-slide animation\n * reuses, same TransitionSpecs lookup as the tint tweens above.\n */\nswitch {\n  width: 46;\n  height: 26;\n  min-width: 46;\n  radius: 13;\n  bg: var(--lumen-track);\n  knob-color: var(--lumen-knob);\n  knob-inset: var(--lumen-knob-inset);\n  transition: bg 140ms ease-out;\n}\nswitch:hover { bg: var(--lumen-track-hover); }\nswitch:active { bg: var(--lumen-track-active); }\nswitch:checked { bg: var(--lumen-accent); }\nswitch:focus-visible { outline: 2 var(--lumen-focus-ring); }\nswitch:disabled { bg: var(--lumen-disabled-bg); opacity: 0.5; }\n\n/* === Slider (scale) ===\n * Thin trough, round white knob with a subtle shadow at runtime.\n */\nslider {\n  height: 6;\n  min-width: 160;\n  radius: 3;\n  bg: var(--lumen-track);\n  knob-color: var(--lumen-knob);\n  thumb-size: var(--lumen-thumb-size);\n}\nslider:hover { bg: var(--lumen-track-hover); }\nslider:focus-visible { outline: 2 var(--lumen-focus-ring); }\nslider:disabled { bg: var(--lumen-disabled-bg); opacity: 0.5; }\n\n/* === Generic tiles === */\ntile:hover { bg: var(--lumen-panel-hover); }\ntile:focus-visible { outline: 2 var(--lumen-focus-ring); }\ntile:disabled { opacity: 0.5; }\n\n/* === Dropdown === */\n.dropdown-button {\n  bg: var(--lumen-surface);\n  radius: var(--lumen-radius);\n  padding: 5 10;\n  min-height: 34;\n  text-color: var(--lumen-text);\n  transition: bg 150ms ease;\n  text-overflow: ellipsis;\n}\n.dropdown-button:hover { bg: var(--lumen-surface-hover); }\n.dropdown-button:active { bg: var(--lumen-surface-active); }\n.dropdown-button:focus-visible { outline: 2 var(--lumen-focus-ring); }\n\n.dropdown-panel {\n  transition: opacity 150ms ease;\n  bg: var(--lumen-panel);\n  radius: var(--lumen-radius-lg);\n  shadow: var(--lumen-shadow-panel);\n  padding: 6;\n  popup-gap: var(--lumen-popup-gap);\n}\n.dropdown-option { bg: var(--lumen-panel); text-color: var(--lumen-text); text-align: start; radius: var(--lumen-radius); min-height: 32; padding: 0 10; transition: bg 150ms ease; text-overflow: ellipsis; disabled-opacity: var(--lumen-disabled-opacity); }\n.dropdown-option:hover { bg: var(--lumen-panel-hover); }\n.dropdown-option:focus { outline: 2 var(--lumen-focus-ring); }\n\n/* === Menus (popovers) === */\n.menu-panel {\n  transition: opacity 150ms ease;\n  bg: var(--lumen-panel);\n  radius: var(--lumen-radius-lg);\n  shadow: var(--lumen-shadow-panel);\n  padding: 6;\n  popup-gap: var(--lumen-popup-gap);\n}\n.menu-item { bg: var(--lumen-panel); text-color: var(--lumen-text); text-align: start; radius: var(--lumen-radius); min-height: 32; padding: 0 10; transition: bg 150ms ease; disabled-opacity: var(--lumen-disabled-opacity); }\n.menu-item:hover { bg: var(--lumen-panel-hover); }\n.menu-item:focus { outline: 2 var(--lumen-focus-ring); }\n.menu-separator { bg: var(--lumen-border); height: 1; margin: 4 0; }\n\n/* === Dialogs ===\n * Borderless 12px surface floating on a shade scrim.\n */\ndialog { bg: var(--lumen-backdrop); transition: opacity 150ms ease; }\n.dialog-surface {\n  bg: var(--lumen-window-bg);\n  radius: var(--lumen-radius-lg);\n  shadow: var(--lumen-shadow-dialog);\n  padding: 24;\n}\n\n/* === Cards === */\n.card {\n  bg: var(--lumen-panel);\n  radius: var(--lumen-radius-lg);\n  padding: 16;\n}\n\n/* === View switcher (tabs) ===\n * No well; the active view gets a fg-overlay fill, not accent.\n */\n.tab-strip { bg: #00000000; padding: 3; gap: 4; }\n.tab-btn {\n  bg: #00000000;\n  radius: var(--lumen-radius);\n  padding: 5 10;\n  min-height: 30;\n  text-color: var(--lumen-text-muted);\n  transition: bg 150ms ease;\n  text-overflow: ellipsis;\n  disabled-opacity: var(--lumen-disabled-opacity);\n}\n.tab-btn:hover { bg: var(--lumen-panel-hover); }\n.tab-btn:selected { bg: var(--lumen-surface-hover); }\n.tab-btn:focus-visible { outline: 2 var(--lumen-focus-ring); }\n\n/* === Tooltip ===\n * OSD-style dark bubble on both schemes.\n */\n.tooltip {\n  bg: #000000d9;\n  text-color: #ffffff;\n  radius: var(--lumen-radius);\n  shadow: var(--lumen-shadow-panel);\n  padding: 6 10;\n  font-size: 12;\n}\n\n/* === Scroll regions === */\nscroll {\n  scrollbar-color: var(--lumen-scrollbar-thumb);\n  scrollbar-width: thin;\n  scrollbar-thickness: var(--lumen-scrollbar-thickness);\n  scrollbar-thickness-thin: var(--lumen-scrollbar-thickness-thin);\n  scrollbar-margin: var(--lumen-scrollbar-margin);\n  scrollbar-min-thumb: var(--lumen-scrollbar-min-thumb);\n  scrollbar-track-hover: var(--lumen-scrollbar-track-hover);\n  scrollbar-hover-boost: var(--lumen-scrollbar-hover-boost);\n  scrollbar-fade-delay: var(--lumen-scrollbar-fade-delay);\n  scrollbar-fade-duration: var(--lumen-scrollbar-fade-duration);\n}\nscroll:focus { outline: 2 var(--lumen-focus-ring); }\n\n/* === Checkbox / Radio / Progress (W5 form controls) === */\ncheckbox          { disabled-opacity: var(--lumen-disabled-opacity); }\ncheckbox:checked  { bg: var(--lumen-accent); }\ncheckbox:focus-visible { outline: 2 var(--lumen-focus-ring); }\n.checkbox-box     { width: 18; height: 18; radius: 5; bg: var(--lumen-surface); border: 1px solid var(--lumen-border); text-color: var(--lumen-on-accent); font-size: 14; text-align: center; }\n.checkbox-label   { text-color: var(--lumen-text); }\nradio             { disabled-opacity: var(--lumen-disabled-opacity); }\nradio:selected    { bg: var(--lumen-accent); }\nradio:focus-visible { outline: 2 var(--lumen-focus-ring); }\n.radio-dot        { width: 18; height: 18; radius: 9; bg: var(--lumen-surface); border: 1px solid var(--lumen-border); }\n.radio-label      { text-color: var(--lumen-text); }\nprogress          { bg: var(--lumen-surface); radius: 3; height: 6; progress-duration: var(--lumen-progress-period); progress-chunk: var(--lumen-progress-chunk); }\n.progress-fill    { bg: var(--lumen-accent); radius: 3; }\n\n/* Dialog default button (Enter-anywhere target): accent ring. */\nbutton.default { border: 2px solid var(--lumen-accent); }\n";
Expand description

Linux (libadwaita-leaning neutral) skin: flat fg-alpha fills, bold accent, 12px popovers, 46x26 pill switches.