DEV: More color transformation refactoring

This commit is contained in:
Penar Musaraj 2020-07-29 12:01:12 -04:00
parent 691edc16c9
commit 25dcc577ae
No known key found for this signature in database
GPG Key ID: E390435D881FF0F7
14 changed files with 87 additions and 50 deletions

View File

@ -7,12 +7,12 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
.hljs { .hljs {
display: block; display: block;
padding: 0.5em; padding: 0.5em;
color: dark-light-choose(#333, #f8f8f8); color: $primary-very-high;
} }
.hljs-comment, .hljs-comment,
.hljs-doctag { .hljs-doctag {
color: dark-light-choose(#998, #bba); color: $hljs-comment;
font-style: italic; font-style: italic;
} }
@ -22,26 +22,26 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
.hljs-subst, .hljs-subst,
.hljs-request, .hljs-request,
.hljs-status { .hljs-status {
color: dark-light-choose(#333, #f8f8f8); color: $primary-very-high;
font-weight: bold; font-weight: bold;
} }
.hljs-number, .hljs-number,
.ruby .hljs-constant { .ruby .hljs-constant {
color: dark-light-choose(#099, #aff); color: $hljs-number;
} }
.hljs-string, .hljs-string,
.hljs-tag .hljs-string, .hljs-tag .hljs-string,
.tex .hljs-formula { .tex .hljs-formula {
color: dark-light-choose(#d14, #f99); color: $hljs-string;
} }
.hljs-title, .hljs-title,
.hljs-name, .hljs-name,
.coffeescript .hljs-params, .coffeescript .hljs-params,
.scss .hljs-meta { .scss .hljs-meta {
color: dark-light-choose(#d14, #f99); color: $hljs-string;
font-weight: bold; font-weight: bold;
} }
@ -56,14 +56,14 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
.haskell .hljs-type, .haskell .hljs-type,
.vhdl .hljs-literal, .vhdl .hljs-literal,
.tex .hljs-command { .tex .hljs-command {
color: dark-light-choose(#458, #9ae); color: $hljs-literal;
font-weight: bold; font-weight: bold;
} }
.hljs-tag, .hljs-tag,
.hljs-tag .hljs-title, .hljs-tag .hljs-title,
.django .hljs-tag .hljs-keyword { .django .hljs-tag .hljs-keyword {
color: dark-light-choose(#000080, #99f); color: $hljs-tag;
font-weight: normal; font-weight: normal;
} }
@ -71,7 +71,7 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
.css .hljs-keyword, .css .hljs-keyword,
.hljs-variable, .hljs-variable,
.lisp .hljs-body { .lisp .hljs-body {
color: dark-light-choose(#008080, #0ee); color: $hljs-attribute;
} }
.hljs-regexp { .hljs-regexp {
@ -83,7 +83,7 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
.lisp .hljs-keyword, .lisp .hljs-keyword,
.tex .hljs-special, .tex .hljs-special,
.hljs-prompt { .hljs-prompt {
color: dark-light-choose(#990073, #fbe); color: $hljs-symbol;
} }
.hljs-built_in, .hljs-built_in,
@ -119,8 +119,8 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
p > code, p > code,
li > code, li > code,
pre > code { pre > code {
color: dark-light-choose(#333, #f8f8f8); color: $primary-very-high;
background: dark-light-choose(#f8f8f8, #333); background: $hljs-bg;
} }
// removed some unnecessary styles here // removed some unnecessary styles here

View File

@ -200,7 +200,7 @@
.unread-notifications { .unread-notifications {
left: auto; left: auto;
right: -3px; right: -3px;
background-color: dark-light-choose($tertiary-medium, $tertiary); background-color: $tertiary-med-or-tertiary;
} }
.unread-high-priority-notifications, .unread-high-priority-notifications,
.ring { .ring {

View File

@ -372,7 +372,7 @@ pre.onebox code ol.lines li {
} }
pre.onebox code li.selected { pre.onebox code li.selected {
background-color: dark-light-choose(#f8eec7, #541); background-color: $highlight-low-or-medium;
} }
pre.onebox code { pre.onebox code {

View File

@ -227,7 +227,7 @@
.reviewable-item { .reviewable-item {
padding-top: 2em; padding-top: 2em;
border-top: 1px solid dark-light-choose($primary-low, $secondary-low); border-top: 1px solid $primary-low;
.topic-statuses { .topic-statuses {
font-size: $font-up-2; font-size: $font-up-2;

View File

@ -49,15 +49,15 @@
margin-right: 8px; margin-right: 8px;
font-size: $font-up-4; font-size: $font-up-4;
.d-icon { .d-icon {
color: dark-light-choose($tertiary, white); color: $tertiary-or-white;
} }
.d-icon-fab-facebook { .d-icon-fab-facebook {
// Adheres to Facebook brand guidelines // Adheres to Facebook brand guidelines
color: dark-light-choose($facebook, white); color: $facebook-or-white;
} }
.d-icon-fab-twitter-square { .d-icon-fab-twitter-square {
// Adheres to Twitter brand guidelines // Adheres to Twitter brand guidelines
color: dark-light-choose($twitter, white); color: $twitter-or-white;
} }
} }

View File

@ -61,11 +61,9 @@
} }
} }
$tag-color: $primary-medium;
.discourse-tag-count { .discourse-tag-count {
font-size: $font-down-1; font-size: $font-down-1;
color: $tag-color; color: $primary-medium;
line-height: $line-height-small; line-height: $line-height-small;
vertical-align: middle; vertical-align: middle;
} }
@ -79,11 +77,11 @@ $tag-color: $primary-medium;
.discourse-tag { .discourse-tag {
margin: 0; margin: 0;
color: $tag-color; color: $primary-medium;
&:visited, &:visited,
&:hover { &:hover {
color: $tag-color; color: $primary-medium;
} }
.extra-info-wrapper & { .extra-info-wrapper & {
@ -181,7 +179,7 @@ $tag-color: $primary-medium;
} }
header .discourse-tag { header .discourse-tag {
color: $tag-color; color: $primary-medium;
} }
.list-tags { .list-tags {
@ -210,13 +208,14 @@ header .discourse-tag {
} }
.autocomplete { .autocomplete {
.d-icon-tag { a {
color: dark-light-choose($primary, $primary-low-mid); color: $primary-medium;
padding-right: 5px;
} }
a { .d-icon-tag {
color: $tag-color; padding-right: 5px;
vertical-align: middle;
height: 0.9em;
} }
} }

View File

@ -307,7 +307,7 @@ blockquote {
.btn:hover, .btn:hover,
.d-icon, .d-icon,
.btn:hover .d-icon { .btn:hover .d-icon {
color: dark-light-choose($secondary, $primary); color: $secondary-or-primary;
} }
.insert-quote + .quote-sharing { .insert-quote + .quote-sharing {
@ -693,8 +693,8 @@ pre {
kbd { kbd {
align-items: center; align-items: center;
background: dark-light-choose(#fafafa, #303030); border: 1px solid $primary-low-mid;
border: 1px solid dark-light-choose(#d0d0d0, #505050); background: $primary-very-low;
border-bottom-width: 2px; border-bottom-width: 2px;
border-radius: 3px; border-radius: 3px;
box-sizing: border-box; box-sizing: border-box;

View File

@ -169,7 +169,7 @@
font-size: $font-down-2; font-size: $font-down-2;
line-height: $line-height-small; line-height: $line-height-small;
text-align: center; text-align: center;
background-color: dark-light-choose($primary-low-mid, $secondary-low); background-color: $primary-low-mid-or-secondary-low;
&[href] { &[href] {
color: $secondary; color: $secondary;
} }
@ -182,7 +182,7 @@
&.new-posts, &.new-posts,
&.unread-posts { &.unread-posts {
background-color: dark-light-choose($tertiary-medium, $tertiary); background-color: $tertiary-med-or-tertiary;
color: $secondary; color: $secondary;
font-weight: dark-light-choose(normal, bold); font-weight: dark-light-choose(normal, bold);
} }

View File

@ -1,10 +1,10 @@
a.hashtag { a.hashtag {
color: dark-light-choose($primary, $primary-low-mid); color: $primary-or-primary-low-mid;
font-weight: bold; font-weight: bold;
&:visited, &:visited,
&:hover { &:hover {
color: dark-light-choose($primary, $primary-low-mid); color: $primary-or-primary-low-mid;
} }
&:hover { &:hover {

View File

@ -91,21 +91,63 @@ $blend-primary-secondary-5: blend-primary-secondary(5%) !default;
$primary-med-or-secondary-med: dark-light-choose( $primary-med-or-secondary-med: dark-light-choose(
$primary-medium, $primary-medium,
$secondary-medium $secondary-medium
); ) !default;
$primary-med-or-secondary-high: dark-light-choose( $primary-med-or-secondary-high: dark-light-choose(
$primary-medium, $primary-medium,
$secondary-high $secondary-high
); ) !default;
$primary-high-or-secondary-low: dark-light-choose( $primary-high-or-secondary-low: dark-light-choose(
$primary-high, $primary-high,
$secondary-low $secondary-low
); ) !default;
$primary-low-mid-or-secondary-high: dark-light-choose( $primary-low-mid-or-secondary-high: dark-light-choose(
$primary-low-mid, $primary-low-mid,
$secondary-high $secondary-high
); ) !default;
$highlight-low-or-medium: dark-light-choose($highlight-low, $highlight-medium); $primary-low-mid-or-secondary-low: dark-light-choose(
$primary-low-mid,
$secondary-low
) !default;
$primary-or-primary-low-mid: dark-light-choose(
$primary,
$primary-low-mid
) !default;
$highlight-low-or-medium: dark-light-choose(
$highlight-low,
$highlight-medium
) !default;
$tertiary-low-or-tertiary-high: dark-light-choose(
$tertiary-low,
$tertiary-high
) !default;
$tertiary-med-or-tertiary: dark-light-choose(
$tertiary-medium,
$tertiary
) !default;
$secondary-or-primary: dark-light-choose($secondary, $primary) !default;
$tertiary-or-white: dark-light-choose($tertiary, unquote("#fff")) !default;
$facebook-or-white: dark-light-choose($facebook, unquote("#fff")) !default;
$twitter-or-white: dark-light-choose($twitter, unquote("#fff")) !default;
// code highlighting
$hljs-comment: dark-light-choose(unquote("#998"), unquote("#bba")) !default;
$hljs-number: dark-light-choose(unquote("#099"), unquote("#aff")) !default;
$hljs-string: dark-light-choose(unquote("#d14"), unquote("#f99")) !default;
$hljs-literal: dark-light-choose(unquote("#458"), unquote("#9ae")) !default;
$hljs-tag: dark-light-choose(unquote("#000080"), unquote("#99f")) !default;
$hljs-attribute: dark-light-choose(
unquote("#008080"),
unquote("#0ee")
) !default;
$hljs-symbol: dark-light-choose(unquote("#990073"), unquote("#fbe")) !default;
$hljs-bg: dark-light-choose(unquote("#f8f8f8"), unquote("#333")) !default;

View File

@ -57,7 +57,7 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
border-top: 1px solid dark-light-choose($primary-low, $secondary-low); border-top: 1px solid $primary-low;
box-shadow: shadow("composer"); box-shadow: shadow("composer");
padding: 20px 0px; padding: 20px 0px;
z-index: z("fullscreen"); z-index: z("fullscreen");
@ -204,7 +204,7 @@
margin-top: 0.5em; margin-top: 0.5em;
margin-left: 0.5em; margin-left: 0.5em;
border-left: 1px solid; border-left: 1px solid;
border-color: dark-light-choose($tertiary-low, $tertiary-high); border-color: $tertiary-low-or-tertiary-high;
position: relative; position: relative;
-webkit-transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
} }
@ -220,7 +220,7 @@
.timeline-handle { .timeline-handle {
border-radius: 0.8em; border-radius: 0.8em;
width: 0.35em; width: 0.35em;
background-color: dark-light-choose($tertiary-low, $tertiary-high); background-color: $tertiary-low-or-tertiary-high;
height: 100%; height: 100%;
float: left; float: left;
z-index: z("base") + 1; z-index: z("base") + 1;

View File

@ -37,7 +37,7 @@
} }
.search-link .blurb { .search-link .blurb {
color: dark-light-choose($primary-high, $secondary-medium); color: $secondary-medium;
display: block; display: block;
word-wrap: break-word; word-wrap: break-word;
font-size: $font-down-2; font-size: $font-down-2;

View File

@ -6,10 +6,7 @@
.notification { .notification {
&.unread { &.unread {
background-color: dark-light-choose( background-color: $tertiary-low;
$tertiary-low,
srgb-scale($tertiary, $secondary, 15%)
);
} }
} }

View File

@ -382,7 +382,6 @@ tr.category-topic-link {
figure { figure {
float: left; float: left;
margin: 3px 7px 0 0; margin: 3px 7px 0 0;
color: dark-light-choose($primary, $secondary-low);
font-weight: bold; font-weight: bold;
font-size: $font-down-1; font-size: $font-down-1;
} }