mirror of https://github.com/grafana/grafana
pull/15550/head
parent
89c153d44b
commit
f80c8cc06c
@ -0,0 +1,387 @@ |
||||
import { GrafanaTheme } from '../types'; |
||||
|
||||
export const darkThemeVarsTemplate = (theme: GrafanaTheme) => ` |
||||
// Global values
|
||||
// --------------------------------------------------
|
||||
|
||||
$theme-name: dark; |
||||
|
||||
// Grays
|
||||
// -------------------------
|
||||
$black: #000; |
||||
$dark-1: #141414; |
||||
$dark-2: #1f1f20; |
||||
$dark-3: #262628; |
||||
$dark-4: #333333; |
||||
$dark-5: #444444; |
||||
$gray-1: #555555; |
||||
$gray-2: #8e8e8e; |
||||
$gray-3: #b3b3b3; |
||||
$gray-4: #d8d9da; |
||||
$gray-5: #ececec; |
||||
$gray-7: #fbfbfb; |
||||
|
||||
$gray-blue: #212327; |
||||
$input-black: #09090b; |
||||
|
||||
$white: #fff; |
||||
|
||||
// Accent colors
|
||||
// -------------------------
|
||||
$blue: ${theme.colors.blue}; |
||||
$blue-dark: #005f81; |
||||
$green: #299c46; |
||||
$red: #d44a3a; |
||||
$yellow: #ecbb13; |
||||
$purple: #9933cc; |
||||
$variable: #32d1df; |
||||
$orange: #eb7b18; |
||||
|
||||
$brand-primary: $orange; |
||||
$brand-success: $green; |
||||
$brand-warning: $brand-primary; |
||||
$brand-danger: $red; |
||||
|
||||
$query-red: #e24d42; |
||||
$query-green: #74e680; |
||||
$query-purple: #fe85fc; |
||||
$query-keyword: #66d9ef; |
||||
$query-orange: $orange; |
||||
|
||||
// Status colors
|
||||
// -------------------------
|
||||
$online: #10a345; |
||||
$warn: #f79520; |
||||
$critical: #ed2e18; |
||||
|
||||
// Scaffolding
|
||||
// -------------------------
|
||||
$body-bg: rgb(23, 24, 25); |
||||
$page-bg: rgb(22, 23, 25); |
||||
|
||||
$body-color: $gray-4; |
||||
$text-color: $gray-4; |
||||
$text-color-strong: $white; |
||||
$text-color-weak: $gray-2; |
||||
$text-color-faint: $dark-5; |
||||
$text-color-emphasis: $gray-5; |
||||
|
||||
$text-shadow-faint: 1px 1px 4px rgb(45, 45, 45); |
||||
$textShadow: none; |
||||
|
||||
// gradients
|
||||
$brand-gradient: linear-gradient( |
||||
to right, |
||||
rgba(255, 213, 0, 0.7) 0%, |
||||
rgba(255, 68, 0, 0.7) 99%, |
||||
rgba(255, 68, 0, 0.7) 100% |
||||
); |
||||
|
||||
$page-gradient: linear-gradient(180deg, #222426 10px, rgb(22, 23, 25) 100px); |
||||
$edit-gradient: linear-gradient(180deg, rgb(22, 23, 25) 50%, #090909); |
||||
|
||||
// Links
|
||||
// -------------------------
|
||||
$link-color: darken($white, 11%); |
||||
$link-color-disabled: darken($link-color, 30%); |
||||
$link-hover-color: $white; |
||||
$external-link-color: $blue; |
||||
|
||||
// Typography
|
||||
// -------------------------
|
||||
$headings-color: darken($white, 11%); |
||||
$abbr-border-color: $gray-3 !default; |
||||
$text-muted: $text-color-weak; |
||||
|
||||
$hr-border-color: $dark-4; |
||||
|
||||
// Panel
|
||||
// -------------------------
|
||||
$panel-bg: #212124; |
||||
$panel-border: solid 1px $dark-1; |
||||
$panel-header-hover-bg: $dark-4; |
||||
$panel-corner: $panel-bg; |
||||
|
||||
// page header
|
||||
$page-header-bg: linear-gradient(90deg, #292a2d, black); |
||||
$page-header-shadow: inset 0px -4px 14px $dark-2; |
||||
$page-header-border-color: $dark-4; |
||||
|
||||
$divider-border-color: $gray-1; |
||||
|
||||
// Graphite Target Editor
|
||||
$tight-form-bg: $dark-3; |
||||
$tight-form-func-bg: $dark-4; |
||||
$tight-form-func-highlight-bg: $dark-5; |
||||
|
||||
$modal-backdrop-bg: #353c42; |
||||
$code-tag-bg: $dark-1; |
||||
$code-tag-border: $dark-4; |
||||
|
||||
// cards
|
||||
$card-background: linear-gradient(135deg, #2f2f32, #262628); |
||||
$card-background-hover: linear-gradient(135deg, #343436, #262628); |
||||
$card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.3); |
||||
|
||||
// Lists
|
||||
$list-item-bg: $card-background; |
||||
$list-item-hover-bg: lighten($gray-blue, 2%); |
||||
$list-item-link-color: $text-color; |
||||
$list-item-shadow: $card-shadow; |
||||
|
||||
$empty-list-cta-bg: $gray-blue; |
||||
|
||||
// Scrollbars
|
||||
$scrollbarBackground: #404357; |
||||
$scrollbarBackground2: #3a3a3a; |
||||
$scrollbarBorder: black; |
||||
|
||||
// Tables
|
||||
// -------------------------
|
||||
$table-bg: transparent; // overall background-color
|
||||
$table-bg-accent: $dark-3; // for striping
|
||||
$table-border: $dark-3; // table and cell border
|
||||
|
||||
$table-bg-odd: $dark-2; |
||||
$table-bg-hover: $dark-3; |
||||
|
||||
// Buttons
|
||||
// -------------------------
|
||||
$btn-primary-bg: #ff6600; |
||||
$btn-primary-bg-hl: #bc3e06; |
||||
|
||||
$btn-secondary-bg-hl: lighten($blue-dark, 5%); |
||||
$btn-secondary-bg: $blue-dark; |
||||
|
||||
$btn-success-bg: $green; |
||||
$btn-success-bg-hl: darken($green, 6%); |
||||
|
||||
$btn-warning-bg: $brand-warning; |
||||
$btn-warning-bg-hl: lighten($brand-warning, 8%); |
||||
|
||||
$btn-danger-bg: $red; |
||||
$btn-danger-bg-hl: darken($red, 8%); |
||||
|
||||
$btn-inverse-bg: $dark-3; |
||||
$btn-inverse-bg-hl: lighten($dark-3, 4%); |
||||
$btn-inverse-text-color: $link-color; |
||||
$btn-inverse-text-shadow: 0px 1px 0 rgba(0, 0, 0, 0.1); |
||||
|
||||
$btn-link-color: $gray-3; |
||||
|
||||
$iconContainerBackground: $black; |
||||
|
||||
$btn-divider-left: $dark-4; |
||||
$btn-divider-right: $dark-2; |
||||
|
||||
$btn-drag-image: '../img/grab_dark.svg'; |
||||
|
||||
// Forms
|
||||
// -------------------------
|
||||
$input-bg: $input-black; |
||||
$input-bg-disabled: $dark-3; |
||||
|
||||
$input-color: $gray-4; |
||||
$input-border-color: $dark-3; |
||||
$input-box-shadow: inset 1px 0px 0.3rem 0px rgba(150, 150, 150, 0.1); |
||||
$input-border-focus: $input-border-color; |
||||
$input-box-shadow-focus: rgba(102, 175, 233, 0.6); |
||||
$input-color-placeholder: $gray-1 !default; |
||||
$input-label-bg: $gray-blue; |
||||
$input-label-border-color: $dark-3; |
||||
$input-color-select-arrow: $white; |
||||
|
||||
// Input placeholder text color
|
||||
$placeholderText: darken($text-color, 25%); |
||||
|
||||
// Search
|
||||
$search-shadow: 0 0 30px 0 $black; |
||||
$search-filter-box-bg: $gray-blue; |
||||
|
||||
// Typeahead
|
||||
$typeahead-shadow: 0 5px 10px 0 $black; |
||||
$typeahead-selected-bg: $dark-4; |
||||
$typeahead-selected-color: $yellow; |
||||
|
||||
// Dropdowns
|
||||
// -------------------------
|
||||
$dropdownBackground: $dark-3; |
||||
$dropdownBorder: rgba(0, 0, 0, 0.2); |
||||
$dropdownDividerTop: transparent; |
||||
$dropdownDividerBottom: #444; |
||||
|
||||
$dropdownLinkColor: $text-color; |
||||
$dropdownLinkColorHover: $white; |
||||
$dropdownLinkColorActive: $white; |
||||
|
||||
$dropdownLinkBackgroundHover: $dark-4; |
||||
|
||||
// Horizontal forms & lists
|
||||
// -------------------------
|
||||
$horizontalComponentOffset: 180px; |
||||
|
||||
// Navbar
|
||||
// -------------------------
|
||||
$navbarHeight: 55px; |
||||
|
||||
$navbarBackground: $panel-bg; |
||||
$navbarBorder: 1px solid $dark-3; |
||||
$navbarShadow: 0 0 20px black; |
||||
|
||||
$navbarLinkColor: $gray-4; |
||||
|
||||
$navbarButtonBackground: $navbarBackground; |
||||
$navbarButtonBackgroundHighlight: $body-bg; |
||||
|
||||
$navbar-button-border: #2f2f32; |
||||
|
||||
// Sidemenu
|
||||
// -------------------------
|
||||
$side-menu-bg: $black; |
||||
$side-menu-bg-mobile: $side-menu-bg; |
||||
$side-menu-item-hover-bg: $dark-2; |
||||
$side-menu-shadow: 0 0 20px black; |
||||
$side-menu-link-color: $link-color; |
||||
|
||||
// Menu dropdowns
|
||||
// -------------------------
|
||||
$menu-dropdown-bg: $body-bg; |
||||
$menu-dropdown-hover-bg: $dark-2; |
||||
$menu-dropdown-shadow: 5px 5px 20px -5px $black; |
||||
|
||||
// Tabs
|
||||
// -------------------------
|
||||
$tab-border-color: $dark-4; |
||||
|
||||
// Toolbar
|
||||
$toolbar-bg: $input-black; |
||||
|
||||
// Form states and alerts
|
||||
// -------------------------
|
||||
$warning-text-color: $warn; |
||||
$error-text-color: #e84d4d; |
||||
$success-text-color: #12d95a; |
||||
$info-text-color: $blue-dark; |
||||
|
||||
$alert-error-bg: linear-gradient(90deg, #d44939, #e0603d); |
||||
$alert-success-bg: linear-gradient(90deg, #3aa655, #47b274); |
||||
$alert-warning-bg: linear-gradient(90deg, #d44939, #e0603d); |
||||
$alert-info-bg: linear-gradient(100deg, #1a4552, #00374a); |
||||
|
||||
// popover
|
||||
$popover-bg: $page-bg; |
||||
$popover-color: $text-color; |
||||
$popover-border-color: $dark-4; |
||||
$popover-shadow: 0 0 20px black; |
||||
|
||||
$popover-help-bg: $btn-secondary-bg; |
||||
$popover-help-color: $text-color; |
||||
|
||||
$popover-error-bg: $btn-danger-bg; |
||||
|
||||
// Tooltips and popovers
|
||||
// -------------------------
|
||||
$tooltipColor: $popover-help-color; |
||||
$tooltipArrowWidth: 5px; |
||||
$tooltipLinkColor: $link-color; |
||||
$graph-tooltip-bg: $dark-1; |
||||
|
||||
$tooltipBackground: $black; |
||||
$tooltipColor: $gray-4; |
||||
$tooltipArrowColor: $tooltipBackground; |
||||
$tooltipBackgroundError: $brand-danger; |
||||
|
||||
// images
|
||||
$checkboxImageUrl: '../img/checkbox.png'; |
||||
|
||||
// info box
|
||||
$info-box-border-color: darken($blue, 12%); |
||||
|
||||
// footer
|
||||
$footer-link-color: $gray-2; |
||||
$footer-link-hover: $gray-4; |
||||
|
||||
// json-explorer
|
||||
$json-explorer-default-color: $text-color; |
||||
$json-explorer-string-color: #23d662; |
||||
$json-explorer-number-color: $variable; |
||||
$json-explorer-boolean-color: $variable; |
||||
$json-explorer-null-color: #eec97d; |
||||
$json-explorer-undefined-color: rgb(239, 143, 190); |
||||
$json-explorer-function-color: #fd48cb; |
||||
$json-explorer-rotate-time: 100ms; |
||||
$json-explorer-toggler-opacity: 0.6; |
||||
$json-explorer-bracket-color: #9494ff; |
||||
$json-explorer-key-color: #23a0db; |
||||
$json-explorer-url-color: #027bff; |
||||
|
||||
// Changelog and diff
|
||||
// -------------------------
|
||||
$diff-label-bg: $dark-2; |
||||
$diff-label-fg: $white; |
||||
|
||||
$diff-group-bg: $dark-4; |
||||
$diff-arrow-color: $white; |
||||
|
||||
$diff-json-bg: $dark-4; |
||||
$diff-json-fg: $gray-5; |
||||
|
||||
$diff-json-added: #457740; |
||||
$diff-json-deleted: #a04338; |
||||
|
||||
$diff-json-old: #a04338; |
||||
$diff-json-new: #457740; |
||||
|
||||
$diff-json-changed-fg: $gray-5; |
||||
$diff-json-changed-num: $text-color; |
||||
|
||||
$diff-json-icon: $gray-7; |
||||
|
||||
//Submenu
|
||||
$variable-option-bg: $blue-dark; |
||||
|
||||
//Switch Slider
|
||||
// -------------------------
|
||||
$switch-bg: $input-bg; |
||||
$switch-slider-color: $dark-2; |
||||
$switch-slider-off-bg: $gray-1; |
||||
$switch-slider-on-bg: linear-gradient(90deg, $orange, $red); |
||||
$switch-slider-shadow: 0 0 3px black; |
||||
|
||||
//Checkbox
|
||||
// -------------------------
|
||||
$checkbox-bg: $dark-1; |
||||
$checkbox-border: 1px solid $gray-1; |
||||
$checkbox-checked-bg: linear-gradient(0deg, $orange, $red); |
||||
$checkbox-color: $dark-1; |
||||
|
||||
//Panel Edit
|
||||
// -------------------------
|
||||
$panel-editor-shadow: 0 0 20px black; |
||||
$panel-editor-side-menu-shadow: drop-shadow(0 0 10px $black); |
||||
$panel-editor-viz-item-shadow: 0 0 8px $dark-5; |
||||
$panel-editor-viz-item-border: 1px solid $dark-5; |
||||
$panel-editor-viz-item-shadow-hover: 0 0 4px $blue; |
||||
$panel-editor-viz-item-border-hover: 1px solid $blue; |
||||
$panel-editor-viz-item-bg: $input-black; |
||||
$panel-editor-tabs-line-color: #e3e3e3; |
||||
$panel-editor-viz-item-bg-hover: darken($blue, 47%); |
||||
|
||||
$panel-options-group-border: none; |
||||
$panel-options-group-header-bg: $gray-blue; |
||||
|
||||
$panel-grid-placeholder-bg: darken($blue, 47%); |
||||
$panel-grid-placeholder-shadow: 0 0 4px $blue; |
||||
|
||||
// logs
|
||||
$logs-color-unkown: $gray-2; |
||||
|
||||
// toggle-group
|
||||
$button-toggle-group-btn-active-bg: linear-gradient(90deg, $orange, $red); |
||||
$button-toggle-group-btn-active-shadow: inset 0 0 4px $black; |
||||
$button-toggle-group-btn-seperator-border: 1px solid $page-bg; |
||||
|
||||
$vertical-resize-handle-bg: $dark-5; |
||||
$vertical-resize-handle-dots: $gray-1; |
||||
$vertical-resize-handle-dots-hover: $gray-2; |
||||
`;
|
@ -1,383 +1,384 @@ |
||||
// Global values |
||||
// -------------------------------------------------- |
||||
|
||||
$theme-name: dark; |
||||
|
||||
// Grays |
||||
// ------------------------- |
||||
$black: #000; |
||||
$dark-1: #141414; |
||||
$dark-2: #1f1f20; |
||||
$dark-3: #262628; |
||||
$dark-4: #333333; |
||||
$dark-5: #444444; |
||||
$gray-1: #555555; |
||||
$gray-2: #8e8e8e; |
||||
$gray-3: #b3b3b3; |
||||
$gray-4: #d8d9da; |
||||
$gray-5: #ececec; |
||||
$gray-7: #fbfbfb; |
||||
|
||||
$gray-blue: #212327; |
||||
$input-black: #09090b; |
||||
|
||||
$white: #fff; |
||||
|
||||
// Accent colors |
||||
// ------------------------- |
||||
$blue: #33b5e5; |
||||
$blue-dark: #005f81; |
||||
$green: #299c46; |
||||
$red: #d44a3a; |
||||
$yellow: #ecbb13; |
||||
$purple: #9933cc; |
||||
$variable: #32d1df; |
||||
$orange: #eb7b18; |
||||
|
||||
$brand-primary: $orange; |
||||
$brand-success: $green; |
||||
$brand-warning: $brand-primary; |
||||
$brand-danger: $red; |
||||
|
||||
$query-red: #e24d42; |
||||
$query-green: #74e680; |
||||
$query-purple: #fe85fc; |
||||
$query-keyword: #66d9ef; |
||||
$query-orange: $orange; |
||||
|
||||
// Status colors |
||||
// ------------------------- |
||||
$online: #10a345; |
||||
$warn: #f79520; |
||||
$critical: #ed2e18; |
||||
|
||||
// Scaffolding |
||||
// ------------------------- |
||||
$body-bg: rgb(23, 24, 25); |
||||
$page-bg: rgb(22, 23, 25); |
||||
|
||||
$body-color: $gray-4; |
||||
$text-color: $gray-4; |
||||
$text-color-strong: $white; |
||||
$text-color-weak: $gray-2; |
||||
$text-color-faint: $dark-5; |
||||
$text-color-emphasis: $gray-5; |
||||
|
||||
$text-shadow-faint: 1px 1px 4px rgb(45, 45, 45); |
||||
$textShadow: none; |
||||
|
||||
// gradients |
||||
$brand-gradient: linear-gradient( |
||||
to right, |
||||
rgba(255, 213, 0, 0.7) 0%, |
||||
rgba(255, 68, 0, 0.7) 99%, |
||||
rgba(255, 68, 0, 0.7) 100% |
||||
); |
||||
|
||||
$page-gradient: linear-gradient(180deg, #222426 10px, rgb(22, 23, 25) 100px); |
||||
$edit-gradient: linear-gradient(180deg, rgb(22, 23, 25) 50%, #090909); |
||||
|
||||
// Links |
||||
// ------------------------- |
||||
$link-color: darken($white, 11%); |
||||
$link-color-disabled: darken($link-color, 30%); |
||||
$link-hover-color: $white; |
||||
$external-link-color: $blue; |
||||
|
||||
// Typography |
||||
// ------------------------- |
||||
$headings-color: darken($white, 11%); |
||||
$abbr-border-color: $gray-3 !default; |
||||
$text-muted: $text-color-weak; |
||||
|
||||
$hr-border-color: $dark-4; |
||||
|
||||
// Panel |
||||
// ------------------------- |
||||
$panel-bg: #212124; |
||||
$panel-border: solid 1px $dark-1; |
||||
$panel-header-hover-bg: $dark-4; |
||||
$panel-corner: $panel-bg; |
||||
|
||||
// page header |
||||
$page-header-bg: linear-gradient(90deg, #292a2d, black); |
||||
$page-header-shadow: inset 0px -4px 14px $dark-2; |
||||
$page-header-border-color: $dark-4; |
||||
|
||||
$divider-border-color: $gray-1; |
||||
|
||||
// Graphite Target Editor |
||||
$tight-form-bg: $dark-3; |
||||
$tight-form-func-bg: $dark-4; |
||||
$tight-form-func-highlight-bg: $dark-5; |
||||
|
||||
$modal-backdrop-bg: #353c42; |
||||
$code-tag-bg: $dark-1; |
||||
$code-tag-border: $dark-4; |
||||
|
||||
// cards |
||||
$card-background: linear-gradient(135deg, #2f2f32, #262628); |
||||
$card-background-hover: linear-gradient(135deg, #343436, #262628); |
||||
$card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.3); |
||||
|
||||
// Lists |
||||
$list-item-bg: $card-background; |
||||
$list-item-hover-bg: lighten($gray-blue, 2%); |
||||
$list-item-link-color: $text-color; |
||||
$list-item-shadow: $card-shadow; |
||||
|
||||
$empty-list-cta-bg: $gray-blue; |
||||
|
||||
// Scrollbars |
||||
$scrollbarBackground: #404357; |
||||
$scrollbarBackground2: #3a3a3a; |
||||
$scrollbarBorder: black; |
||||
|
||||
// Tables |
||||
// ------------------------- |
||||
$table-bg: transparent; // overall background-color |
||||
$table-bg-accent: $dark-3; // for striping |
||||
$table-border: $dark-3; // table and cell border |
||||
|
||||
$table-bg-odd: $dark-2; |
||||
$table-bg-hover: $dark-3; |
||||
|
||||
// Buttons |
||||
// ------------------------- |
||||
$btn-primary-bg: #ff6600; |
||||
$btn-primary-bg-hl: #bc3e06; |
||||
|
||||
$btn-secondary-bg-hl: lighten($blue-dark, 5%); |
||||
$btn-secondary-bg: $blue-dark; |
||||
|
||||
$btn-success-bg: $green; |
||||
$btn-success-bg-hl: darken($green, 6%); |
||||
|
||||
$btn-warning-bg: $brand-warning; |
||||
$btn-warning-bg-hl: lighten($brand-warning, 8%); |
||||
|
||||
$btn-danger-bg: $red; |
||||
$btn-danger-bg-hl: darken($red, 8%); |
||||
|
||||
$btn-inverse-bg: $dark-3; |
||||
$btn-inverse-bg-hl: lighten($dark-3, 4%); |
||||
$btn-inverse-text-color: $link-color; |
||||
$btn-inverse-text-shadow: 0px 1px 0 rgba(0, 0, 0, 0.1); |
||||
|
||||
$btn-link-color: $gray-3; |
||||
|
||||
$iconContainerBackground: $black; |
||||
|
||||
$btn-divider-left: $dark-4; |
||||
$btn-divider-right: $dark-2; |
||||
|
||||
$btn-drag-image: '../img/grab_dark.svg'; |
||||
|
||||
// Forms |
||||
// ------------------------- |
||||
$input-bg: $input-black; |
||||
$input-bg-disabled: $dark-3; |
||||
|
||||
$input-color: $gray-4; |
||||
$input-border-color: $dark-3; |
||||
$input-box-shadow: inset 1px 0px 0.3rem 0px rgba(150, 150, 150, 0.1); |
||||
$input-border-focus: $input-border-color; |
||||
$input-box-shadow-focus: rgba(102, 175, 233, 0.6); |
||||
$input-color-placeholder: $gray-1 !default; |
||||
$input-label-bg: $gray-blue; |
||||
$input-label-border-color: $dark-3; |
||||
$input-color-select-arrow: $white; |
||||
|
||||
// Input placeholder text color |
||||
$placeholderText: darken($text-color, 25%); |
||||
|
||||
// Search |
||||
$search-shadow: 0 0 30px 0 $black; |
||||
$search-filter-box-bg: $gray-blue; |
||||
|
||||
// Typeahead |
||||
$typeahead-shadow: 0 5px 10px 0 $black; |
||||
$typeahead-selected-bg: $dark-4; |
||||
$typeahead-selected-color: $yellow; |
||||
|
||||
// Dropdowns |
||||
// ------------------------- |
||||
$dropdownBackground: $dark-3; |
||||
$dropdownBorder: rgba(0, 0, 0, 0.2); |
||||
$dropdownDividerTop: transparent; |
||||
$dropdownDividerBottom: #444; |
||||
|
||||
$dropdownLinkColor: $text-color; |
||||
$dropdownLinkColorHover: $white; |
||||
$dropdownLinkColorActive: $white; |
||||
|
||||
$dropdownLinkBackgroundHover: $dark-4; |
||||
|
||||
// Horizontal forms & lists |
||||
// ------------------------- |
||||
$horizontalComponentOffset: 180px; |
||||
|
||||
// Navbar |
||||
// ------------------------- |
||||
$navbarHeight: 55px; |
||||
|
||||
$navbarBackground: $panel-bg; |
||||
$navbarBorder: 1px solid $dark-3; |
||||
$navbarShadow: 0 0 20px black; |
||||
|
||||
$navbarLinkColor: $gray-4; |
||||
|
||||
$navbarButtonBackground: $navbarBackground; |
||||
$navbarButtonBackgroundHighlight: $body-bg; |
||||
|
||||
$navbar-button-border: #2f2f32; |
||||
|
||||
// Sidemenu |
||||
// ------------------------- |
||||
$side-menu-bg: $black; |
||||
$side-menu-bg-mobile: $side-menu-bg; |
||||
$side-menu-item-hover-bg: $dark-2; |
||||
$side-menu-shadow: 0 0 20px black; |
||||
$side-menu-link-color: $link-color; |
||||
|
||||
// Menu dropdowns |
||||
// ------------------------- |
||||
$menu-dropdown-bg: $body-bg; |
||||
$menu-dropdown-hover-bg: $dark-2; |
||||
$menu-dropdown-shadow: 5px 5px 20px -5px $black; |
||||
|
||||
// Tabs |
||||
// ------------------------- |
||||
$tab-border-color: $dark-4; |
||||
|
||||
// Toolbar |
||||
$toolbar-bg: $input-black; |
||||
|
||||
// Form states and alerts |
||||
// ------------------------- |
||||
$warning-text-color: $warn; |
||||
$error-text-color: #e84d4d; |
||||
$success-text-color: #12d95a; |
||||
$info-text-color: $blue-dark; |
||||
|
||||
$alert-error-bg: linear-gradient(90deg, #d44939, #e0603d); |
||||
$alert-success-bg: linear-gradient(90deg, #3aa655, #47b274); |
||||
$alert-warning-bg: linear-gradient(90deg, #d44939, #e0603d); |
||||
$alert-info-bg: linear-gradient(100deg, #1a4552, #00374a); |
||||
|
||||
// popover |
||||
$popover-bg: $page-bg; |
||||
$popover-color: $text-color; |
||||
$popover-border-color: $dark-4; |
||||
$popover-shadow: 0 0 20px black; |
||||
|
||||
$popover-help-bg: $btn-secondary-bg; |
||||
$popover-help-color: $text-color; |
||||
|
||||
$popover-error-bg: $btn-danger-bg; |
||||
|
||||
// Tooltips and popovers |
||||
// ------------------------- |
||||
$tooltipColor: $popover-help-color; |
||||
$tooltipArrowWidth: 5px; |
||||
$tooltipLinkColor: $link-color; |
||||
$graph-tooltip-bg: $dark-1; |
||||
|
||||
$tooltipBackground: $black; |
||||
$tooltipColor: $gray-4; |
||||
$tooltipArrowColor: $tooltipBackground; |
||||
$tooltipBackgroundError: $brand-danger; |
||||
|
||||
// images |
||||
$checkboxImageUrl: '../img/checkbox.png'; |
||||
|
||||
// info box |
||||
$info-box-border-color: darken($blue, 12%); |
||||
|
||||
// footer |
||||
$footer-link-color: $gray-2; |
||||
$footer-link-hover: $gray-4; |
||||
|
||||
// json-explorer |
||||
$json-explorer-default-color: $text-color; |
||||
$json-explorer-string-color: #23d662; |
||||
$json-explorer-number-color: $variable; |
||||
$json-explorer-boolean-color: $variable; |
||||
$json-explorer-null-color: #eec97d; |
||||
$json-explorer-undefined-color: rgb(239, 143, 190); |
||||
$json-explorer-function-color: #fd48cb; |
||||
$json-explorer-rotate-time: 100ms; |
||||
$json-explorer-toggler-opacity: 0.6; |
||||
$json-explorer-bracket-color: #9494ff; |
||||
$json-explorer-key-color: #23a0db; |
||||
$json-explorer-url-color: #027bff; |
||||
|
||||
// Changelog and diff |
||||
// ------------------------- |
||||
$diff-label-bg: $dark-2; |
||||
$diff-label-fg: $white; |
||||
|
||||
$diff-group-bg: $dark-4; |
||||
$diff-arrow-color: $white; |
||||
|
||||
$diff-json-bg: $dark-4; |
||||
$diff-json-fg: $gray-5; |
||||
|
||||
$diff-json-added: #457740; |
||||
$diff-json-deleted: #a04338; |
||||
|
||||
$diff-json-old: #a04338; |
||||
$diff-json-new: #457740; |
||||
|
||||
$diff-json-changed-fg: $gray-5; |
||||
$diff-json-changed-num: $text-color; |
||||
|
||||
$diff-json-icon: $gray-7; |
||||
|
||||
//Submenu |
||||
$variable-option-bg: $blue-dark; |
||||
|
||||
//Switch Slider |
||||
// ------------------------- |
||||
$switch-bg: $input-bg; |
||||
$switch-slider-color: $dark-2; |
||||
$switch-slider-off-bg: $gray-1; |
||||
$switch-slider-on-bg: linear-gradient(90deg, $orange, $red); |
||||
$switch-slider-shadow: 0 0 3px black; |
||||
|
||||
//Checkbox |
||||
// ------------------------- |
||||
$checkbox-bg: $dark-1; |
||||
$checkbox-border: 1px solid $gray-1; |
||||
$checkbox-checked-bg: linear-gradient(0deg, $orange, $red); |
||||
$checkbox-color: $dark-1; |
||||
|
||||
//Panel Edit |
||||
// ------------------------- |
||||
$panel-editor-shadow: 0 0 20px black; |
||||
$panel-editor-side-menu-shadow: drop-shadow(0 0 10px $black); |
||||
$panel-editor-viz-item-shadow: 0 0 8px $dark-5; |
||||
$panel-editor-viz-item-border: 1px solid $dark-5; |
||||
$panel-editor-viz-item-shadow-hover: 0 0 4px $blue; |
||||
$panel-editor-viz-item-border-hover: 1px solid $blue; |
||||
$panel-editor-viz-item-bg: $input-black; |
||||
$panel-editor-tabs-line-color: #e3e3e3; |
||||
$panel-editor-viz-item-bg-hover: darken($blue, 47%); |
||||
|
||||
$panel-options-group-border: none; |
||||
$panel-options-group-header-bg: $gray-blue; |
||||
|
||||
$panel-grid-placeholder-bg: darken($blue, 47%); |
||||
$panel-grid-placeholder-shadow: 0 0 4px $blue; |
||||
|
||||
// logs |
||||
$logs-color-unkown: $gray-2; |
||||
|
||||
// toggle-group |
||||
$button-toggle-group-btn-active-bg: linear-gradient(90deg, $orange, $red); |
||||
$button-toggle-group-btn-active-shadow: inset 0 0 4px $black; |
||||
$button-toggle-group-btn-seperator-border: 1px solid $page-bg; |
||||
|
||||
$vertical-resize-handle-bg: $dark-5; |
||||
$vertical-resize-handle-dots: $gray-1; |
||||
|
||||
// Global values |
||||
// -------------------------------------------------- |
||||
|
||||
$theme-name: dark; |
||||
|
||||
// Grays |
||||
// ------------------------- |
||||
$black: #000; |
||||
$dark-1: #141414; |
||||
$dark-2: #1f1f20; |
||||
$dark-3: #262628; |
||||
$dark-4: #333333; |
||||
$dark-5: #444444; |
||||
$gray-1: #555555; |
||||
$gray-2: #8e8e8e; |
||||
$gray-3: #b3b3b3; |
||||
$gray-4: #d8d9da; |
||||
$gray-5: #ececec; |
||||
$gray-7: #fbfbfb; |
||||
|
||||
$gray-blue: #212327; |
||||
$input-black: #09090b; |
||||
|
||||
$white: #fff; |
||||
|
||||
// Accent colors |
||||
// ------------------------- |
||||
$blue: #ff0000; |
||||
$blue-dark: #005f81; |
||||
$green: #299c46; |
||||
$red: #d44a3a; |
||||
$yellow: #ecbb13; |
||||
$purple: #9933cc; |
||||
$variable: #32d1df; |
||||
$orange: #eb7b18; |
||||
|
||||
$brand-primary: $orange; |
||||
$brand-success: $green; |
||||
$brand-warning: $brand-primary; |
||||
$brand-danger: $red; |
||||
|
||||
$query-red: #e24d42; |
||||
$query-green: #74e680; |
||||
$query-purple: #fe85fc; |
||||
$query-keyword: #66d9ef; |
||||
$query-orange: $orange; |
||||
|
||||
// Status colors |
||||
// ------------------------- |
||||
$online: #10a345; |
||||
$warn: #f79520; |
||||
$critical: #ed2e18; |
||||
|
||||
// Scaffolding |
||||
// ------------------------- |
||||
$body-bg: rgb(23, 24, 25); |
||||
$page-bg: rgb(22, 23, 25); |
||||
|
||||
$body-color: $gray-4; |
||||
$text-color: $gray-4; |
||||
$text-color-strong: $white; |
||||
$text-color-weak: $gray-2; |
||||
$text-color-faint: $dark-5; |
||||
$text-color-emphasis: $gray-5; |
||||
|
||||
$text-shadow-faint: 1px 1px 4px rgb(45, 45, 45); |
||||
$textShadow: none; |
||||
|
||||
// gradients |
||||
$brand-gradient: linear-gradient( |
||||
to right, |
||||
rgba(255, 213, 0, 0.7) 0%, |
||||
rgba(255, 68, 0, 0.7) 99%, |
||||
rgba(255, 68, 0, 0.7) 100% |
||||
); |
||||
|
||||
$page-gradient: linear-gradient(180deg, #222426 10px, rgb(22, 23, 25) 100px); |
||||
$edit-gradient: linear-gradient(180deg, rgb(22, 23, 25) 50%, #090909); |
||||
|
||||
// Links |
||||
// ------------------------- |
||||
$link-color: darken($white, 11%); |
||||
$link-color-disabled: darken($link-color, 30%); |
||||
$link-hover-color: $white; |
||||
$external-link-color: $blue; |
||||
|
||||
// Typography |
||||
// ------------------------- |
||||
$headings-color: darken($white, 11%); |
||||
$abbr-border-color: $gray-3 !default; |
||||
$text-muted: $text-color-weak; |
||||
|
||||
$hr-border-color: $dark-4; |
||||
|
||||
// Panel |
||||
// ------------------------- |
||||
$panel-bg: #212124; |
||||
$panel-border: solid 1px $dark-1; |
||||
$panel-header-hover-bg: $dark-4; |
||||
$panel-corner: $panel-bg; |
||||
|
||||
// page header |
||||
$page-header-bg: linear-gradient(90deg, #292a2d, black); |
||||
$page-header-shadow: inset 0px -4px 14px $dark-2; |
||||
$page-header-border-color: $dark-4; |
||||
|
||||
$divider-border-color: $gray-1; |
||||
|
||||
// Graphite Target Editor |
||||
$tight-form-bg: $dark-3; |
||||
$tight-form-func-bg: $dark-4; |
||||
$tight-form-func-highlight-bg: $dark-5; |
||||
|
||||
$modal-backdrop-bg: #353c42; |
||||
$code-tag-bg: $dark-1; |
||||
$code-tag-border: $dark-4; |
||||
|
||||
// cards |
||||
$card-background: linear-gradient(135deg, #2f2f32, #262628); |
||||
$card-background-hover: linear-gradient(135deg, #343436, #262628); |
||||
$card-shadow: -1px -1px 0 0 hsla(0, 0%, 100%, 0.1), 1px 1px 0 0 rgba(0, 0, 0, 0.3); |
||||
|
||||
// Lists |
||||
$list-item-bg: $card-background; |
||||
$list-item-hover-bg: lighten($gray-blue, 2%); |
||||
$list-item-link-color: $text-color; |
||||
$list-item-shadow: $card-shadow; |
||||
|
||||
$empty-list-cta-bg: $gray-blue; |
||||
|
||||
// Scrollbars |
||||
$scrollbarBackground: #404357; |
||||
$scrollbarBackground2: #3a3a3a; |
||||
$scrollbarBorder: black; |
||||
|
||||
// Tables |
||||
// ------------------------- |
||||
$table-bg: transparent; // overall background-color |
||||
$table-bg-accent: $dark-3; // for striping |
||||
$table-border: $dark-3; // table and cell border |
||||
|
||||
$table-bg-odd: $dark-2; |
||||
$table-bg-hover: $dark-3; |
||||
|
||||
// Buttons |
||||
// ------------------------- |
||||
$btn-primary-bg: #ff6600; |
||||
$btn-primary-bg-hl: #bc3e06; |
||||
|
||||
$btn-secondary-bg-hl: lighten($blue-dark, 5%); |
||||
$btn-secondary-bg: $blue-dark; |
||||
|
||||
$btn-success-bg: $green; |
||||
$btn-success-bg-hl: darken($green, 6%); |
||||
|
||||
$btn-warning-bg: $brand-warning; |
||||
$btn-warning-bg-hl: lighten($brand-warning, 8%); |
||||
|
||||
$btn-danger-bg: $red; |
||||
$btn-danger-bg-hl: darken($red, 8%); |
||||
|
||||
$btn-inverse-bg: $dark-3; |
||||
$btn-inverse-bg-hl: lighten($dark-3, 4%); |
||||
$btn-inverse-text-color: $link-color; |
||||
$btn-inverse-text-shadow: 0px 1px 0 rgba(0, 0, 0, 0.1); |
||||
|
||||
$btn-link-color: $gray-3; |
||||
|
||||
$iconContainerBackground: $black; |
||||
|
||||
$btn-divider-left: $dark-4; |
||||
$btn-divider-right: $dark-2; |
||||
|
||||
$btn-drag-image: '../img/grab_dark.svg'; |
||||
|
||||
// Forms |
||||
// ------------------------- |
||||
$input-bg: $input-black; |
||||
$input-bg-disabled: $dark-3; |
||||
|
||||
$input-color: $gray-4; |
||||
$input-border-color: $dark-3; |
||||
$input-box-shadow: inset 1px 0px 0.3rem 0px rgba(150, 150, 150, 0.1); |
||||
$input-border-focus: $input-border-color; |
||||
$input-box-shadow-focus: rgba(102, 175, 233, 0.6); |
||||
$input-color-placeholder: $gray-1 !default; |
||||
$input-label-bg: $gray-blue; |
||||
$input-label-border-color: $dark-3; |
||||
$input-color-select-arrow: $white; |
||||
|
||||
// Input placeholder text color |
||||
$placeholderText: darken($text-color, 25%); |
||||
|
||||
// Search |
||||
$search-shadow: 0 0 30px 0 $black; |
||||
$search-filter-box-bg: $gray-blue; |
||||
|
||||
// Typeahead |
||||
$typeahead-shadow: 0 5px 10px 0 $black; |
||||
$typeahead-selected-bg: $dark-4; |
||||
$typeahead-selected-color: $yellow; |
||||
|
||||
// Dropdowns |
||||
// ------------------------- |
||||
$dropdownBackground: $dark-3; |
||||
$dropdownBorder: rgba(0, 0, 0, 0.2); |
||||
$dropdownDividerTop: transparent; |
||||
$dropdownDividerBottom: #444; |
||||
|
||||
$dropdownLinkColor: $text-color; |
||||
$dropdownLinkColorHover: $white; |
||||
$dropdownLinkColorActive: $white; |
||||
|
||||
$dropdownLinkBackgroundHover: $dark-4; |
||||
|
||||
// Horizontal forms & lists |
||||
// ------------------------- |
||||
$horizontalComponentOffset: 180px; |
||||
|
||||
// Navbar |
||||
// ------------------------- |
||||
$navbarHeight: 55px; |
||||
|
||||
$navbarBackground: $panel-bg; |
||||
$navbarBorder: 1px solid $dark-3; |
||||
$navbarShadow: 0 0 20px black; |
||||
|
||||
$navbarLinkColor: $gray-4; |
||||
|
||||
$navbarButtonBackground: $navbarBackground; |
||||
$navbarButtonBackgroundHighlight: $body-bg; |
||||
|
||||
$navbar-button-border: #2f2f32; |
||||
|
||||
// Sidemenu |
||||
// ------------------------- |
||||
$side-menu-bg: $black; |
||||
$side-menu-bg-mobile: $side-menu-bg; |
||||
$side-menu-item-hover-bg: $dark-2; |
||||
$side-menu-shadow: 0 0 20px black; |
||||
$side-menu-link-color: $link-color; |
||||
|
||||
// Menu dropdowns |
||||
// ------------------------- |
||||
$menu-dropdown-bg: $body-bg; |
||||
$menu-dropdown-hover-bg: $dark-2; |
||||
$menu-dropdown-shadow: 5px 5px 20px -5px $black; |
||||
|
||||
// Tabs |
||||
// ------------------------- |
||||
$tab-border-color: $dark-4; |
||||
|
||||
// Toolbar |
||||
$toolbar-bg: $input-black; |
||||
|
||||
// Form states and alerts |
||||
// ------------------------- |
||||
$warning-text-color: $warn; |
||||
$error-text-color: #e84d4d; |
||||
$success-text-color: #12d95a; |
||||
$info-text-color: $blue-dark; |
||||
|
||||
$alert-error-bg: linear-gradient(90deg, #d44939, #e0603d); |
||||
$alert-success-bg: linear-gradient(90deg, #3aa655, #47b274); |
||||
$alert-warning-bg: linear-gradient(90deg, #d44939, #e0603d); |
||||
$alert-info-bg: linear-gradient(100deg, #1a4552, #00374a); |
||||
|
||||
// popover |
||||
$popover-bg: $page-bg; |
||||
$popover-color: $text-color; |
||||
$popover-border-color: $dark-4; |
||||
$popover-shadow: 0 0 20px black; |
||||
|
||||
$popover-help-bg: $btn-secondary-bg; |
||||
$popover-help-color: $text-color; |
||||
|
||||
$popover-error-bg: $btn-danger-bg; |
||||
|
||||
// Tooltips and popovers |
||||
// ------------------------- |
||||
$tooltipColor: $popover-help-color; |
||||
$tooltipArrowWidth: 5px; |
||||
$tooltipLinkColor: $link-color; |
||||
$graph-tooltip-bg: $dark-1; |
||||
|
||||
$tooltipBackground: $black; |
||||
$tooltipColor: $gray-4; |
||||
$tooltipArrowColor: $tooltipBackground; |
||||
$tooltipBackgroundError: $brand-danger; |
||||
|
||||
// images |
||||
$checkboxImageUrl: '../img/checkbox.png'; |
||||
|
||||
// info box |
||||
$info-box-border-color: darken($blue, 12%); |
||||
|
||||
// footer |
||||
$footer-link-color: $gray-2; |
||||
$footer-link-hover: $gray-4; |
||||
|
||||
// json-explorer |
||||
$json-explorer-default-color: $text-color; |
||||
$json-explorer-string-color: #23d662; |
||||
$json-explorer-number-color: $variable; |
||||
$json-explorer-boolean-color: $variable; |
||||
$json-explorer-null-color: #eec97d; |
||||
$json-explorer-undefined-color: rgb(239, 143, 190); |
||||
$json-explorer-function-color: #fd48cb; |
||||
$json-explorer-rotate-time: 100ms; |
||||
$json-explorer-toggler-opacity: 0.6; |
||||
$json-explorer-bracket-color: #9494ff; |
||||
$json-explorer-key-color: #23a0db; |
||||
$json-explorer-url-color: #027bff; |
||||
|
||||
// Changelog and diff |
||||
// ------------------------- |
||||
$diff-label-bg: $dark-2; |
||||
$diff-label-fg: $white; |
||||
|
||||
$diff-group-bg: $dark-4; |
||||
$diff-arrow-color: $white; |
||||
|
||||
$diff-json-bg: $dark-4; |
||||
$diff-json-fg: $gray-5; |
||||
|
||||
$diff-json-added: #457740; |
||||
$diff-json-deleted: #a04338; |
||||
|
||||
$diff-json-old: #a04338; |
||||
$diff-json-new: #457740; |
||||
|
||||
$diff-json-changed-fg: $gray-5; |
||||
$diff-json-changed-num: $text-color; |
||||
|
||||
$diff-json-icon: $gray-7; |
||||
|
||||
//Submenu |
||||
$variable-option-bg: $blue-dark; |
||||
|
||||
//Switch Slider |
||||
// ------------------------- |
||||
$switch-bg: $input-bg; |
||||
$switch-slider-color: $dark-2; |
||||
$switch-slider-off-bg: $gray-1; |
||||
$switch-slider-on-bg: linear-gradient(90deg, $orange, $red); |
||||
$switch-slider-shadow: 0 0 3px black; |
||||
|
||||
//Checkbox |
||||
// ------------------------- |
||||
$checkbox-bg: $dark-1; |
||||
$checkbox-border: 1px solid $gray-1; |
||||
$checkbox-checked-bg: linear-gradient(0deg, $orange, $red); |
||||
$checkbox-color: $dark-1; |
||||
|
||||
//Panel Edit |
||||
// ------------------------- |
||||
$panel-editor-shadow: 0 0 20px black; |
||||
$panel-editor-side-menu-shadow: drop-shadow(0 0 10px $black); |
||||
$panel-editor-viz-item-shadow: 0 0 8px $dark-5; |
||||
$panel-editor-viz-item-border: 1px solid $dark-5; |
||||
$panel-editor-viz-item-shadow-hover: 0 0 4px $blue; |
||||
$panel-editor-viz-item-border-hover: 1px solid $blue; |
||||
$panel-editor-viz-item-bg: $input-black; |
||||
$panel-editor-tabs-line-color: #e3e3e3; |
||||
$panel-editor-viz-item-bg-hover: darken($blue, 47%); |
||||
|
||||
$panel-options-group-border: none; |
||||
$panel-options-group-header-bg: $gray-blue; |
||||
|
||||
$panel-grid-placeholder-bg: darken($blue, 47%); |
||||
$panel-grid-placeholder-shadow: 0 0 4px $blue; |
||||
|
||||
// logs |
||||
$logs-color-unkown: $gray-2; |
||||
|
||||
// toggle-group |
||||
$button-toggle-group-btn-active-bg: linear-gradient(90deg, $orange, $red); |
||||
$button-toggle-group-btn-active-shadow: inset 0 0 4px $black; |
||||
$button-toggle-group-btn-seperator-border: 1px solid $page-bg; |
||||
|
||||
$vertical-resize-handle-bg: $dark-5; |
||||
$vertical-resize-handle-dots: $gray-1; |
||||
$vertical-resize-handle-dots-hover: $gray-2; |
||||
|
@ -0,0 +1,7 @@ |
||||
|
||||
{ |
||||
"watch": ["packages/grafana-ui/src/themes"], |
||||
"ext": "ts", |
||||
"ignore": ["src/**/*.spec.ts"], |
||||
"exec": "ts-node ./src/index.ts" |
||||
} |
@ -0,0 +1,6 @@ |
||||
{ |
||||
"extends": "../../tsconfig.json", |
||||
"compilerOptions": { |
||||
"module": "commonjs" |
||||
} |
||||
} |
@ -0,0 +1,24 @@ |
||||
// import chokidar from 'chokidar';
|
||||
import darkTheme from '@grafana/ui/src/themes/dark'; |
||||
import { darkThemeVarsTemplate } from '@grafana/ui/src/themes/_variables.dark.scss.tmpl'; |
||||
import fs from 'fs'; |
||||
|
||||
console.log(__dirname + '../../packages/grafana-ui/src/themes/dark.ts'); |
||||
|
||||
const fileToWatch = [ |
||||
__dirname + '/../../packages/grafana-ui/src/themes/dark.ts', |
||||
__dirname + '/../../packages/grafana-ui/src/themes/light.ts', |
||||
]; |
||||
// const watchService = chokidar.watch(fileToWatch);
|
||||
console.log(`Watching for file changes on ${fileToWatch}`); |
||||
|
||||
// watchService.on('change', path => {
|
||||
|
||||
const result = darkThemeVarsTemplate(darkTheme); |
||||
console.log(result); |
||||
|
||||
fs.writeFile(__dirname + '/../../public/sass/_variables.dark.scss', result, e => { |
||||
console.log(e); |
||||
}); |
||||
|
||||
// });
|
Loading…
Reference in new issue