From 204d4df0249b5254dfb39390693ae4c78060b52d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 19 Oct 2020 17:41:35 +0200 Subject: [PATCH] _scss: reformat _variables.scss, and unify colors in variables file Signed-off-by: Sebastiaan van Stijn --- _scss/_buttons.scss | 2 +- _scss/_landing.scss | 16 +++-------- _scss/_navigation.scss | 9 +------ _scss/_night-mode.scss | 23 +++++++++------- _scss/_overrides.scss | 4 +-- _scss/_typography.scss | 7 +---- _scss/_variables.scss | 60 ++++++++++++++++++++++-------------------- 7 files changed, 52 insertions(+), 69 deletions(-) diff --git a/_scss/_buttons.scss b/_scss/_buttons.scss index 179652a68f..62c357db63 100755 --- a/_scss/_buttons.scss +++ b/_scss/_buttons.scss @@ -21,7 +21,7 @@ a.button.outline-btn.min-hgt { .button { margin: 10px 10px 10px 0; - font-family: Geomanist Book, sans-serif; + font-family: $buttons; padding: 12px 35px 10px; min-width: 200px; box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.1); diff --git a/_scss/_landing.scss b/_scss/_landing.scss index c9428c2cc6..f4639ba580 100644 --- a/_scss/_landing.scss +++ b/_scss/_landing.scss @@ -1,10 +1,10 @@ $dark-blue: #002c66; -$bg-card-night: #0F161E; body.landing { + background-color: $bg-body-landing; h2, h5, h6 { - font-family: 'Geomanist Regular', sans-serif; + font-family: $headings-landing; } section { @@ -162,7 +162,7 @@ body.landing { $icons: rocket, download-docker, guides, whats-new, manuals, reference; .card { - background-color: $bg-body; + background-color: $bg-card; box-shadow: 0 3px 6px rgba(11, 33, 74, 0.09), 0 -2px 2px rgba(11, 33, 74, 0.03); padding: 24px 36px; @@ -385,13 +385,3 @@ body.landing { body.landing:not(.night) { background-color: $bg-sidebar; } - -body.landing.night { - .card { - background-color: $bg-card-night; - } - - .cardlet { - background-color: $bg-card-night; - } -} diff --git a/_scss/_navigation.scss b/_scss/_navigation.scss index 179a3e6ec8..9524e44743 100755 --- a/_scss/_navigation.scss +++ b/_scss/_navigation.scss @@ -45,7 +45,7 @@ .nav-sidebar ul { list-style: none; - padding: 0px 15px; + padding: 0 15px; text-align: left; li { @@ -296,10 +296,3 @@ input:checked+.slider:before { float: left; margin: 2px 0 0; } - -.divider { - height: 1px; - margin: 9px 29px; - overflow: hidden; - background-color: #077CBC; -} diff --git a/_scss/_night-mode.scss b/_scss/_night-mode.scss index 7b5130d1f7..5cf9ebb967 100755 --- a/_scss/_night-mode.scss +++ b/_scss/_night-mode.scss @@ -1,9 +1,18 @@ body.night { background-color: $bg-body-night; - color: $body-text-night; - p, - ol, - ul, + color: $body-text-night; + + &.landing { + background-color: $bg-body-landing-night; + .header > .container { + background-color: $bg-header-night; + } + .card, .cardlet { + background-color: $bg-card-night; + } + } + + p,ol,ul, .rating-nero-value, .reading-time { color: $body-text-night !important; @@ -213,9 +222,3 @@ body.night { color: $white!important; } } - -body.landing.night { - .header>.container { - background-color: $bg-header-night; - } -} diff --git a/_scss/_overrides.scss b/_scss/_overrides.scss index 6e38865cb4..69a0a91452 100755 --- a/_scss/_overrides.scss +++ b/_scss/_overrides.scss @@ -73,11 +73,11 @@ * Bootstrap expand/collapse accordions **************************************** */ -.panel-heading .chevron:after { +.panel-heading .chevron::after { content: "\f0d8"; } -.panel-heading.collapsed .chevron:after { +.panel-heading.collapsed .chevron::after { content: "\f0d7"; } diff --git a/_scss/_typography.scss b/_scss/_typography.scss index cd80225dc9..0c6ef7d426 100755 --- a/_scss/_typography.scss +++ b/_scss/_typography.scss @@ -39,12 +39,7 @@ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } -h1, -h2, -h3, -h4, -h5, -h6 { +h1,h2,h3,h4,h5,h6 { font-family: $headings; color: $body-text; clear: both; diff --git a/_scss/_variables.scss b/_scss/_variables.scss index 86f9b7e1b9..d4a83d96f7 100755 --- a/_scss/_variables.scss +++ b/_scss/_variables.scss @@ -2,11 +2,13 @@ /* * global */ -$headings: "Geomanist Book", sans-serif; -$font: "Open Sans", sans-serif; -$body-text-size: 14px; -$global-header-height: 440px; -$bg-secondary-tabs: rgba(0, 0, 0, 0.05); +$headings: "Geomanist Book", sans-serif; +$headings-landing: 'Geomanist Regular', sans-serif; +$buttons: "Geomanist Book", sans-serif; +$font: "Open Sans", sans-serif; +$body-text-size: 14px; +$global-header-height: 440px; +$bg-secondary-tabs: rgba(0, 0, 0, 0.05); $white: #fff; $black: #000; $clear: 0; @@ -14,40 +16,40 @@ $clear: 0; /* * standard mode */ -$body-text: #33444c; -$primary-links: #2496ed; +$body-text: #33444c; +$primary-links: #2496ed; -$bg-body: #ffffff; -$bg-header: #2496ed; -$bg-secondary: #2496ed; -$bg-sidebar: #fbfbfc; -$bg-footer: #ffffff; +$bg-body: #ffffff; +$bg-body-landing: #fbfbfc; +$bg-header: #2496ed; +$bg-secondary: #2496ed; +$bg-sidebar: #fbfbfc; +$bg-footer: #ffffff; -$bg-component: #fbfbfc; -$bdr-sidebar: rgba(204, 204, 204, 0.29); +$bg-component: #fbfbfc; +$bg-card: #ffffff; -$slider-bg: #c3e4f7; -$slider-btn: #2496ed; - -$code-blocks: rgba(12, 81, 118, 0.1); - -$table-head: #cfd2d4; +$slider-bg: #c3e4f7; +$slider-btn: #2496ed; +$table-head: #cfd2d4; /* * night mode */ -$body-text-night: #d3d4d4; -$primary-links-night: #9cd7f7; +$body-text-night: #d3d4d4; +$primary-links-night: #9cd7f7; -$bg-body-night: #061F2F; -$bg-header-night: #101c29; -$bg-secondary-night: #101c29; -$bg-sidebar-night: #101e26; -$bg-footer-night: #000000; +$bg-body-night: #061f2f; +$bg-body-landing-night: #061f2f; +$bg-header-night: #101c29; +$bg-secondary-night: #101c29; +$bg-sidebar-night: #101e26; +$bg-footer-night: #000000; -$bg-component-night: #101c29; +$bg-component-night: #101c29; +$bg-card-night: #0f161e; -$active-sidebar-night: #9cd7f7; +$active-sidebar-night: #9cd7f7; $bg-search-results-night: rgba(10, 10, 10, 0.95);