From 3baabd14f828a79b08cbe9e4c896bd53e71601b3 Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 13:28:02 -0700 Subject: [PATCH 01/10] Use variables for user card colors --- app/assets/stylesheets/desktop/user-card.scss | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/app/assets/stylesheets/desktop/user-card.scss b/app/assets/stylesheets/desktop/user-card.scss index e04cecafa..bb9c61b51 100644 --- a/app/assets/stylesheets/desktop/user-card.scss +++ b/app/assets/stylesheets/desktop/user-card.scss @@ -1,6 +1,9 @@ // styles that apply to the "share" popup when sharing a link to a post or topic // Colors should mostly be absolute here, it will look the same in dark & light themes +$user_card_primary: #fff; +$user_card_background: #222; + #user-card { position: absolute; width: 500px; @@ -9,9 +12,9 @@ z-index: 990; box-shadow: 0 2px 12px rgba($primary, .6); margin-top: -2px; - color: #ffffff; + color: $user_card_primary; background-size: cover; - background: #222222 center center; + background: $user_card_background center center; min-height: 175px; -webkit-transition: opacity .2s, -webkit-transform .2s; transition: opacity .2s, transform .2s; @@ -29,7 +32,7 @@ .card-content { padding: 12px 12px 0 12px; - background: rgba(#222222, .85); + background: rgba($user_card_background, .85); margin-top: 80px; &:after { @@ -64,11 +67,11 @@ overflow: hidden; text-overflow: ellipsis; a { - color: #fff; + color: $user_card_primary; } i { font-size: .8em; - color: #fff; + color: $user_card_primary; } } @@ -82,7 +85,7 @@ overflow: hidden; text-overflow: ellipsis; a { - color: #fff; + color: $user_card_primary; } } @@ -90,11 +93,11 @@ font-size: 0.929em; font-weight: normal; margin-top: 0; - color: scale-color(#fff, $lightness: 25%); + color: scale-color($user_card_primary, $lightness: 25%); overflow: hidden; text-overflow: ellipsis; a { - color: scale-color(#222, $lightness: 50%); + color: scale-color($user_card_background, $lightness: 50%); } } @@ -102,10 +105,10 @@ font-size: 0.929em; font-weight: normal; margin-top: 0; - color: #222; + color: $user_card_background; .group-link { - color: #222; + color: $user_card_background; } } @@ -117,11 +120,11 @@ display: inline; margin-right: 5px; .desc, a { - color: scale-color(#fff, $lightness: 50%); + color: scale-color($user_card_primary, $lightness: 50%); } } - div {display: inline; color: scale-color(#222, $lightness: 50%); - .group-link {color: scale-color(#222, $lightness: 50%);} + div {display: inline; color: scale-color($user_card_background, $lightness: 50%); + .group-link {color: scale-color($user_card_background, $lightness: 50%);} } } @@ -139,7 +142,7 @@ clear: left; a { - color: #fff; + color: $user_card_primary; text-decoration: underline; } img { @@ -147,7 +150,7 @@ } a.mention { - background-color: scale-color(#fff, $lightness: 50%); + background-color: scale-color($user_card_primary, $lightness: 50%); } .overflow { max-height: 60px; @@ -179,7 +182,7 @@ } .new-user a { - color: scale-color(#222, $lightness: 70%); + color: scale-color($user_card_background, $lightness: 70%); } &.show-badges { @@ -209,12 +212,12 @@ .user-badge { background: transparent; - color: scale-color(#222, $lightness: 50%); - border-color: scale-color(#222, $lightness: 50%); + color: scale-color($user_card_background, $lightness: 50%); + border-color: scale-color($user_card_background, $lightness: 50%); } h3 { - color: #222; + color: $user_card_background; font-size: 1em; margin-bottom: -8px; } @@ -241,6 +244,6 @@ right: 12px; bottom: 12px; font-size: 2.143em; - i {color: #fff;} + i {color: $user_card_primary;} } } From cf559893b895c88340ac66afdb3e9474b1e19df2 Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 14:03:01 -0700 Subject: [PATCH 02/10] FIX: fully-read topic style in dark theme --- app/assets/stylesheets/common/base/_topic-list.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scss index 7518c2cc0..6a89dae2c 100644 --- a/app/assets/stylesheets/common/base/_topic-list.scss +++ b/app/assets/stylesheets/common/base/_topic-list.scss @@ -16,8 +16,8 @@ } } -html.anon .topic-list a.title:visited:not(.badge-notification) {color: scale-color($primary, $lightness: 45%);} -.topic-list a.title.visited:not(.badge-notification) {color: scale-color($primary, $lightness: 45%);} +html.anon .topic-list a.title:visited:not(.badge-notification) {color: dark-light-diff($primary, $secondary, 45%, -30%);} +.topic-list a.title.visited:not(.badge-notification) {color: dark-light-diff($primary, $secondary, 45%, -30%);} .topic-list { width: 100%; From 0282d89b29dafbdcee18e47151c3adc82b8a0392 Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 14:09:20 -0700 Subject: [PATCH 03/10] FIX: Lightboxes in dark theme --- app/assets/stylesheets/common/base/lightbox.scss | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/common/base/lightbox.scss b/app/assets/stylesheets/common/base/lightbox.scss index 681eec625..818c9b008 100644 --- a/app/assets/stylesheets/common/base/lightbox.scss +++ b/app/assets/stylesheets/common/base/lightbox.scss @@ -3,7 +3,6 @@ display: inline-block; &:hover .meta { - background: $primary; opacity: 1; transition: opacity .5s; } @@ -18,8 +17,8 @@ position: absolute; bottom: 0; width: 100%; - color: $secondary; - background: $primary; + color: dark-light-choose($secondary, $primary); + background: dark-light-choose($primary, lighten($secondary, 10%)); opacity: 0; transition: opacity .2s; @@ -39,7 +38,7 @@ .informations { margin: 6px; padding-right: 20px; - color: scale-color($primary, $lightness: 50%); + color: dark-light-diff($primary, $secondary, 50%, -50%); font-size: 1em; } From 4d0c32840441e426ad703eff5c4656017a5a0f47 Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 14:37:23 -0700 Subject: [PATCH 04/10] FIX: Header icons should be header_primary exactly --- app/assets/stylesheets/common/base/header.scss | 2 +- app/assets/stylesheets/common/foundation/colors.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/common/base/header.scss b/app/assets/stylesheets/common/base/header.scss index ed398f4a0..1b87a19c1 100644 --- a/app/assets/stylesheets/common/base/header.scss +++ b/app/assets/stylesheets/common/base/header.scss @@ -61,7 +61,7 @@ .icon { display: block; padding: 3px; - color: scale-color($header_primary, $lightness: 50%); + color: $header_primary; text-decoration: none; cursor: pointer; border-top: 1px solid transparent; diff --git a/app/assets/stylesheets/common/foundation/colors.scss b/app/assets/stylesheets/common/foundation/colors.scss index 8fe9170fc..6a7277ca4 100644 --- a/app/assets/stylesheets/common/foundation/colors.scss +++ b/app/assets/stylesheets/common/foundation/colors.scss @@ -3,7 +3,7 @@ $secondary: #ffffff !default; $tertiary: #0088cc !default; $quaternary: #e45735 !default; $header_background: #ffffff !default; -$header_primary: #333333 !default; +$header_primary: #999999 !default; $highlight: #ffff4d !default; $danger: #e45735 !default; $success: #009900 !default; From ca577248d06c839b873b3cb747a1f2ba2cfe3507 Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 14:44:52 -0700 Subject: [PATCH 05/10] FIX: Fix tag input select2 box --- app/assets/stylesheets/common/base/combobox.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/common/base/combobox.scss b/app/assets/stylesheets/common/base/combobox.scss index aa3d7d02f..3910ed555 100644 --- a/app/assets/stylesheets/common/base/combobox.scss +++ b/app/assets/stylesheets/common/base/combobox.scss @@ -37,7 +37,12 @@ } } - +.select2-container-multi .select2-choices { + background-color: $secondary; +} +.select2-container-multi .select2-choices .select2-search-field input.select2-active { + background: $secondary url(/assets/select2-spinner.gif) no-repeat 100% !important; +} .select2-container a.select2-choice { background: $secondary; From 78dcf30444b42c3d24a9609e701d415cbd2b87ad Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 14:50:36 -0700 Subject: [PATCH 06/10] FIX: Suggested topics box was bad in dark theme --- app/assets/stylesheets/desktop/compose.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/desktop/compose.scss b/app/assets/stylesheets/desktop/compose.scss index b09b0840d..4f23d9378 100644 --- a/app/assets/stylesheets/desktop/compose.scss +++ b/app/assets/stylesheets/desktop/compose.scss @@ -65,14 +65,14 @@ } .similar-topics { - background-color: scale-color($tertiary, $lightness: 60%); + background-color: dark-light-choose(scale-color($tertiary, $lightness: 60%), scale-color($tertiary, $lightness: -60%)); a[href] { - color: #000; + color: dark-light-diff($primary, $secondary, -10%, 10%); } .posts-count { - background-color: scale-color($tertiary, $lightness: -40%); + background-color: dark-light-choose(scale-color($tertiary, $lightness: -40%), scale-color($tertiary, $lightness: 40%)); } ul { @@ -82,7 +82,7 @@ } .search-link { .fa, .blurb { - color: scale-color($tertiary, $lightness: -40%); + color: dark-light-choose(scale-color($tertiary, $lightness: -40%), scale-color($tertiary, $lightness: 40%)); } } } From e81f21d8485811981cab84e14053316829f862bc Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 15:02:41 -0700 Subject: [PATCH 07/10] FIX: Github oneboxes in dark theme --- .../stylesheets/common/base/code_highlighting.scss | 10 +++++----- app/assets/stylesheets/common/base/onebox.scss | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/common/base/code_highlighting.scss b/app/assets/stylesheets/common/base/code_highlighting.scss index c5fe8d617..25c8a72f0 100644 --- a/app/assets/stylesheets/common/base/code_highlighting.scss +++ b/app/assets/stylesheets/common/base/code_highlighting.scss @@ -14,7 +14,7 @@ github.com style (c) Vasily Polovnyov .hljs-template_comment, .diff .hljs-header, .hljs-javadoc { - color: #998; + color: dark-light-choose(#998, #bba); font-style: italic; } @@ -33,14 +33,14 @@ github.com style (c) Vasily Polovnyov .hljs-number, .hljs-hexcolor, .ruby .hljs-constant { - color: #099; + color: dark-light-choose(#099, #aff); } .hljs-string, .hljs-tag .hljs-value, .hljs-phpdoc, .tex .hljs-formula { - color: dark-light-choose(#d14, #f66); + color: dark-light-choose(#d14, #f99); } .hljs-title, @@ -62,7 +62,7 @@ github.com style (c) Vasily Polovnyov .haskell .hljs-type, .vhdl .hljs-literal, .tex .hljs-command { - color: #458; + color: dark-light-choose(#458, #9AE); font-weight: bold; } @@ -89,7 +89,7 @@ github.com style (c) Vasily Polovnyov .lisp .hljs-keyword, .tex .hljs-special, .hljs-prompt { - color: #990073; + color: dark-light-choose(#990073, #fbe); } .hljs-built_in, diff --git a/app/assets/stylesheets/common/base/onebox.scss b/app/assets/stylesheets/common/base/onebox.scss index c2072b811..a533a15f1 100644 --- a/app/assets/stylesheets/common/base/onebox.scss +++ b/app/assets/stylesheets/common/base/onebox.scss @@ -159,7 +159,7 @@ pre.onebox code ol.lines li:before { display:inline-block; width:35px; left: -40px; - background: #F7F7F7; + background: dark-light-choose(#F7F7F7, #070707); color:#AFAFAF; text-align:right; padding-right:5px; @@ -174,8 +174,10 @@ pre.onebox code ol{ margin-left:0px; line-height:1.5em; } +pre.onebox code { + background-color: dark-light-choose(#fff, #000); +} pre.onebox code li{ - background-color:#fff; padding-left:5px; } @@ -194,7 +196,7 @@ pre.onebox code ol.lines li { } pre.onebox code li.selected{ - background-color:#F8EEC7 + background-color: dark-light-choose(#F8EEC7, #541); } pre.onebox code { From e5f4020c75fc54eb885fdab0ffda20e05ddb783b Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 15:05:05 -0700 Subject: [PATCH 08/10] FIX: User card badge, interface language select2 dark theme --- app/assets/stylesheets/common/base/combobox.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/common/base/combobox.scss b/app/assets/stylesheets/common/base/combobox.scss index 3910ed555..6b2e55690 100644 --- a/app/assets/stylesheets/common/base/combobox.scss +++ b/app/assets/stylesheets/common/base/combobox.scss @@ -56,7 +56,9 @@ border-radius: 3px 3px 0 0; border-color: $tertiary; } - +.select2-drop { + color: dark-light-diff($primary, $secondary, -50%, 50%); +} .select2-drop-active { border: 1px solid $tertiary; border-top: 0; From 13fdd35517222d4d4ba87541b8d89e0d82812f4f Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 15:11:13 -0700 Subject: [PATCH 09/10] Revert "FIX: Header icons should be header_primary exactly" This reverts commit 4d0c32840441e426ad703eff5c4656017a5a0f47. --- app/assets/stylesheets/common/base/header.scss | 2 +- app/assets/stylesheets/common/foundation/colors.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/common/base/header.scss b/app/assets/stylesheets/common/base/header.scss index 1b87a19c1..ed398f4a0 100644 --- a/app/assets/stylesheets/common/base/header.scss +++ b/app/assets/stylesheets/common/base/header.scss @@ -61,7 +61,7 @@ .icon { display: block; padding: 3px; - color: $header_primary; + color: scale-color($header_primary, $lightness: 50%); text-decoration: none; cursor: pointer; border-top: 1px solid transparent; diff --git a/app/assets/stylesheets/common/foundation/colors.scss b/app/assets/stylesheets/common/foundation/colors.scss index 6a7277ca4..8fe9170fc 100644 --- a/app/assets/stylesheets/common/foundation/colors.scss +++ b/app/assets/stylesheets/common/foundation/colors.scss @@ -3,7 +3,7 @@ $secondary: #ffffff !default; $tertiary: #0088cc !default; $quaternary: #e45735 !default; $header_background: #ffffff !default; -$header_primary: #999999 !default; +$header_primary: #333333 !default; $highlight: #ffff4d !default; $danger: #e45735 !default; $success: #009900 !default; From 924e67af9d6836fe1e00cf3fb02c8f399483270e Mon Sep 17 00:00:00 2001 From: Kane York Date: Tue, 18 Aug 2015 15:11:49 -0700 Subject: [PATCH 10/10] FIX: Header icons should be header_primray in dark theme --- app/assets/stylesheets/common/base/header.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/common/base/header.scss b/app/assets/stylesheets/common/base/header.scss index ed398f4a0..574d2744d 100644 --- a/app/assets/stylesheets/common/base/header.scss +++ b/app/assets/stylesheets/common/base/header.scss @@ -61,7 +61,7 @@ .icon { display: block; padding: 3px; - color: scale-color($header_primary, $lightness: 50%); + color: dark-light-choose(scale-color($header_primary, $lightness: 50%), $header_primary); text-decoration: none; cursor: pointer; border-top: 1px solid transparent;