aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Brattlof <hello@bryanbrattlof.com>2020-04-25 17:00:42 -0400
committerBryan Brattlof <hello@bryanbrattlof.com>2020-04-25 18:15:32 -0400
commita9f1627f2dd4c9c5e7919f29f91d4115b9527d64 (patch)
tree0ba822db870e6698a68e63cd89ca5d3805017912
parent401b710fbc80ddfebac4fae29ec225c68e19e43c (diff)
downloadbryanbrattlof.com-a9f1627f2dd4c9c5e7919f29f91d4115b9527d64.tar.gz
bryanbrattlof.com-a9f1627f2dd4c9c5e7919f29f91d4115b9527d64.tar.bz2
take the color out of code blocks
convert the code and code-block elements from solorize dark theme into black & white style, which is much lighter & looks better everything goes with black
-rw-r--r--stylesheets/code.scss151
1 files changed, 59 insertions, 92 deletions
diff --git a/stylesheets/code.scss b/stylesheets/code.scss
index 1618bd2..93bc4e4 100644
--- a/stylesheets/code.scss
+++ b/stylesheets/code.scss
@@ -12,16 +12,9 @@
*/
/* Solarized Dark */
-$code-background: rgb(0, 43, 54) !default;
-%code-background { background-color: rgb(0, 43, 54); }
-%code-comments { color: rgb(88, 110, 117); }
-%code-default-code { color: rgb(147, 161, 161); }
-%code-constants { color: rgb(203, 75, 22); }
-%code-regex { color: rgb(220, 50, 47); }
-%code-keywords { color: rgb(38, 139, 210); }
-%code-strings { color: rgb(42, 161, 152); }
-%code-operators { color: rgb(133, 153, 0); }
-%code-builtin-name { color: rgb(181, 137, 0); }
+$code-background: rgb(30, 30, 30) !default;
+%code-background { background-color: $code-background; }
+%code-color { color: rgb(255, 255, 255); }
%code-font {
/* Correct the inheritance and scaling of font size in all browsers. */
@@ -34,7 +27,7 @@ $code-background: rgb(0, 43, 54) !default;
code {
@extend %code-font;
@extend %code-background;
- @extend %code-default-code;
+ @extend %code-color;
white-space: pre;
@@ -44,16 +37,14 @@ code {
.highlight {
- @extend %code-default-code;
+ @extend %code-color;
@extend %code-background;
- margin: 0 0 20px 0;
- padding: 0;
+ margin: 0;
+ padding: 0 $default-spacing;
/* ensure the right side during scroll has padding */
box-sizing: content-box;
- border-right: 20px solid $code-background;
- border-left: 20px solid $code-background;
border-radius: 3px;
/* add scroll bars for smaller screens */
@@ -61,23 +52,23 @@ code {
white-space: pre;
.lineno { /* inline line numbers */
- margin-right: 10px;
+ margin-right: 10px;
}
.err { /* Error */
- border: 1px solid #FF0000;
- border-radius: 3px;
+ border: 1px solid #FF0000;
+ border-radius: 3px;
}
@include print {
- background: none;;
+ background: none;;
- border-right: none;
- border-left: none;
- border-top: 1px solid black;
- border-bottom: 1px solid black;
+ border-right: none;
+ border-left: none;
+ border-top: 1px solid black;
+ border-bottom: 1px solid black;
- page-break-inside: avoid;
+ page-break-inside: avoid;
}
}
@@ -85,73 +76,49 @@ code {
%code-italic { font-style: italic; }
%code-strong { font-weight: bold; }
-.c { @extend %code-comments; } /* Comment */
-.g { @extend %code-default-code; } /* Generic */
-.k { @extend %code-operators; } /* Keyword */
-.l { @extend %code-default-code; } /* Literal */
-.n { @extend %code-default-code; } /* Name */
-.o { @extend %code-operators; } /* Operator */
-.x { @extend %code-constants; } /* Other */
-.p { @extend %code-default-code; } /* Punctuation */
-.cm { @extend %code-comments; } /* Comment.Multiline */
-.cp { @extend %code-operators; } /* Comment.Preproc */
-.c1 { @extend %code-comments; } /* Comment.Single */
-.cs { @extend %code-operators; } /* Comment.Special */
-.gd { @extend %code-strings; } /* Generic.Deleted */
-.ge { @extend %code-default-code; @extend %code-italic; } /* Generic.Emph */
-.gr { @extend %code-regex; } /* Generic.Error */
-.gh { @extend %code-constants; } /* Generic.Heading */
-.gi { @extend %code-operators; } /* Generic.Inserted */
-.go { @extend %code-default-code; } /* Generic.Output */
-.gp { @extend %code-default-code; } /* Generic.Prompt */
-.gs { @extend %code-default-code; @extend %code-strong; } /* Generic.Strong */
-.gu { @extend %code-constants; } /* Generic.Subheading */
-.gt { @extend %code-default-code; } /* Generic.Traceback */
-.kc { @extend %code-constants; } /* Keyword.Constant */
-.kd { @extend %code-keywords; } /* Keyword.Declaration */
-.kn { @extend %code-operators; } /* Keyword.Namespace */
-.kp { @extend %code-operators; } /* Keyword.Pseudo */
-.kr { @extend %code-keywords; } /* Keyword.Reserved */
-.kt { @extend %code-regex; } /* Keyword.Type */
-.ld { @extend %code-default-code; } /* Literal.Date */
-.m { @extend %code-strings; } /* Literal.Number */
-.s { @extend %code-strings; } /* Literal.String */
-.na { @extend %code-default-code; } /* Name.Attribute */
-.nb { @extend %code-builtin-name; } /* Name.Builtin */
-.nc { @extend %code-keywords; } /* Name.Class */
-.no { @extend %code-constants; } /* Name.Constant */
-.nd { @extend %code-keywords; } /* Name.Decorator */
-.ni { @extend %code-constants; } /* Name.Entity */
-.ne { @extend %code-constants; } /* Name.Exception */
-.nf { @extend %code-keywords; } /* Name.Function */
-.nl { @extend %code-default-code; } /* Name.Label */
-.nn { @extend %code-default-code; } /* Name.Namespace */
-.nx { @extend %code-default-code; } /* Name.Other */
-.py { @extend %code-default-code; } /* Name.Property */
-.nt { @extend %code-keywords; } /* Name.Tag */
-.nv { @extend %code-keywords; } /* Name.Variable */
-.ow { @extend %code-operators; } /* Operator.Word */
-.w { @extend %code-default-code; } /* Text.Whitespace */
-.mf { @extend %code-strings; } /* Literal.Number.Float */
-.mh { @extend %code-strings; } /* Literal.Number.Hex */
-.mi { @extend %code-strings; } /* Literal.Number.Integer */
-.mo { @extend %code-strings; } /* Literal.Number.Oct */
-.sb { @extend %code-comments; } /* Literal.String.Backtick */
-.sc { @extend %code-strings; } /* Literal.String.Char */
-.sd { @extend %code-default-code; } /* Literal.String.Doc */
-.s2 { @extend %code-strings; } /* Literal.String.Double */
-.se { @extend %code-constants; } /* Literal.String.Escape */
-.sh { @extend %code-default-code; } /* Literal.String.Heredoc */
-.si { @extend %code-strings; } /* Literal.String.Interpol */
-.sx { @extend %code-strings; } /* Literal.String.Other */
-.sr { @extend %code-regex; } /* Literal.String.Regex */
-.s1 { @extend %code-strings; } /* Literal.String.Single */
-.ss { @extend %code-strings; } /* Literal.String.Symbol */
-.bp { @extend %code-keywords; } /* Name.Builtin.Pseudo */
-.vc { @extend %code-keywords; } /* Name.Variable.Class */
-.vg { @extend %code-keywords; } /* Name.Variable.Global */
-.vi { @extend %code-keywords; } /* Name.Variable.Instance */
-.il { @extend %code-strings; } /* Literal.Number.Integer.Long */
+.hll { background-color: #ffffcc }
+.c { @extend %code-italic; } /* Comment */
+.k { @extend %code-strong; } /* Keyword */
+.ch { @extend %code-italic; } /* Comment.Hashbang */
+.cm { @extend %code-italic; } /* Comment.Multiline */
+.cpf { @extend %code-italic; } /* Comment.PreprocFile */
+.c1 { @extend %code-italic; } /* Comment.Single */
+.cs { @extend %code-italic; } /* Comment.Special */
+.ge { @extend %code-italic; } /* Generic.Emph */
+.gh { @extend %code-strong; } /* Generic.Heading */
+.gp { @extend %code-strong; } /* Generic.Prompt */
+.gs { @extend %code-strong; } /* Generic.Strong */
+.gu { @extend %code-strong; } /* Generic.Subheading */
+.kc { @extend %code-strong; } /* Keyword.Constant */
+.kd { @extend %code-strong; } /* Keyword.Declaration */
+.kn { @extend %code-strong; } /* Keyword.Namespace */
+.kr { @extend %code-strong; } /* Keyword.Reserved */
+.s { @extend %code-italic; } /* Literal.String */
+.nc { @extend %code-strong; } /* Name.Class */
+.ni { @extend %code-strong; } /* Name.Entity */
+.ne { @extend %code-strong; } /* Name.Exception */
+.nn { @extend %code-strong; } /* Name.Namespace */
+.nt { @extend %code-strong; } /* Name.Tag */
+.ow { @extend %code-strong; } /* Operator.Word */
+.sa { @extend %code-italic; } /* Literal.String.Affix */
+.sb { @extend %code-italic; } /* Literal.String.Backtick */
+.sc { @extend %code-italic; } /* Literal.String.Char */
+.dl { @extend %code-italic; } /* Literal.String.Delimiter */
+.sd { @extend %code-italic; } /* Literal.String.Doc */
+.s2 { @extend %code-italic; } /* Literal.String.Double */
+.se { /* Literal.String.Escape */
+ @extend %code-strong;;
+ @extend %code-italic;;
+}
+.sh { @extend %code-italic; } /* Literal.String.Heredoc */
+.si { /* Literal.String.Interpol */
+ @extend %code-strong;;
+ @extend %code-italic;;
+}
+.sx { @extend %code-italic; } /* Literal.String.Other */
+.sr { @extend %code-italic; } /* Literal.String.Regex */
+.s1 { @extend %code-italic; } /* Literal.String.Single */
+.ss { @extend %code-italic; } /* Literal.String.Symbol */
@include print {