diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-07-26 12:08:07 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-07-26 12:08:26 -0400 |
commit | 38e6772260863afb465854dfc5cd581eaceccc4e (patch) | |
tree | 51993481518727cb031bd6db010f6116da35cc09 /.themes/classic/sass/partials/_syntax.scss | |
parent | 3ebe3e5a0e07987837637f8a03c21839431eb21e (diff) | |
download | my_new_personal_website-38e6772260863afb465854dfc5cd581eaceccc4e.tar.xz my_new_personal_website-38e6772260863afb465854dfc5cd581eaceccc4e.zip |
imrpoved support for light colored solarized theme
Diffstat (limited to '.themes/classic/sass/partials/_syntax.scss')
-rw-r--r-- | .themes/classic/sass/partials/_syntax.scss | 123 |
1 files changed, 74 insertions, 49 deletions
diff --git a/.themes/classic/sass/partials/_syntax.scss b/.themes/classic/sass/partials/_syntax.scss index 4ccd63d8..9bee3020 100644 --- a/.themes/classic/sass/partials/_syntax.scss +++ b/.themes/classic/sass/partials/_syntax.scss @@ -3,14 +3,22 @@ text-align: right; font-size: 13px; line-height: 1.45em; - background: $base02 $noise-bg !important; - border-right: 1px solid darken($base03, 2) !important; - @include box-shadow(lighten($base02, 2) -1px 0 inset); - text-shadow: darken($base02, 10) 0 -1px; + @if $solarized == light { + background: lighten($base03, 1) $noise-bg !important; + border-right: 1px solid darken($base02, 2) !important; + @include box-shadow(lighten($base03, 2) -1px 0 inset); + text-shadow: lighten($base02, 2) 0 -1px; + } @else { + background: $base02 $noise-bg !important; + border-right: 1px solid darken($base03, 2) !important; + @include box-shadow(lighten($base02, 2) -1px 0 inset); + text-shadow: darken($base02, 10) 0 -1px; + } span { color: $base01 !important; } padding: .8em !important; @include border-radius(0); } + border: 1px solid $pre-border !important; } html .gist .gist-file { margin-bottom: 1.8em; @@ -18,7 +26,11 @@ html .gist .gist-file { border: none; padding-top: image-height("code_bg.png") !important; .gist-syntax { - border-bottom: 1px solid darken($base03, 2) !important; + @if $solarized == dark { + border-bottom: 1px solid $base03 !important; + } @else if $solarized == light { + border-bottom: 0px; + } .gist-highlight{ background: $base03 !important; pre { @@ -31,7 +43,12 @@ html .gist .gist-file { border: 1px solid lighten($base02, 2) !important; color: $base01; font-size: .7em !important; - background: $base02 $noise-bg; + @if $solarized == light { + background: lighten($base03, 2) $noise-bg; + border-top: 1px solid lighten($base03, 2) !important; + } @else { + background: $base02 $noise-bg; + } @extend .sans; line-height: 1.5em; a { @@ -101,62 +118,62 @@ p code { .cp { color: $base01 !important; font-style: italic !important; } /* Comment.Preproc */ .c1 { color: $base01 !important; font-style: italic !important; } /* Comment.Single */ .cs { color: $base01 !important; font-weight: bold !important; font-style: italic !important; } /* Comment.Special */ - .err { color: $red !important; background: none !important; } /* Error */ - .k { color: $orange !important; } /* Keyword */ + .err { color: $solar-red !important; background: none !important; } /* Error */ + .k { color: $solar-orange !important; } /* Keyword */ .o { color: $base1 !important; font-weight: bold !important; } /* Operator */ .p { color: $base1 !important; } /* Operator */ - .ow { color: $cyan !important; font-weight: bold !important; } /* Operator.Word */ - .gd { color: $base1 !important; background-color: mix($red, $base03, 25%) !important; display: inline-block; } /* Generic.Deleted */ - .gd .x { color: $base1 !important; background-color: mix($red, $base03, 35%) !important; display: inline-block; } /* Generic.Deleted.Specific */ + .ow { color: $solar-cyan !important; font-weight: bold !important; } /* Operator.Word */ + .gd { color: $base1 !important; background-color: mix($solar-red, $base03, 25%) !important; display: inline-block; } /* Generic.Deleted */ + .gd .x { color: $base1 !important; background-color: mix($solar-red, $base03, 35%) !important; display: inline-block; } /* Generic.Deleted.Specific */ .ge { color: $base1 !important; font-style: italic !important; } /* Generic.Emph */ //.gr { color: #aa0000 } /* Generic.Error */ .gh { color: $base01 !important; } /* Generic.Heading */ - .gi { color: $base1 !important; background-color: mix($green, $base03, 20%) !important; display: inline-block; } /* Generic.Inserted */ - .gi .x { color: $base1 !important; background-color: mix($green, $base03, 40%) !important; display: inline-block; } /* Generic.Inserted.Specific */ + .gi { color: $base1 !important; background-color: mix($solar-green, $base03, 20%) !important; display: inline-block; } /* Generic.Inserted */ + .gi .x { color: $base1 !important; background-color: mix($solar-green, $base03, 40%) !important; display: inline-block; } /* Generic.Inserted.Specific */ //.go { color: #888888 } /* Generic.Output */ //.gp { color: #555555 } /* Generic.Prompt */ .gs { color: $base1 !important; font-weight: bold !important; } /* Generic.Strong */ - .gu { color: $violet !important; } /* Generic.Subheading */ + .gu { color: $solar-violet !important; } /* Generic.Subheading */ //.gt { color: #aa0000 } /* Generic.Traceback */ - .kc { color: $green !important; font-weight: bold !important; } /* Keyword.Constant */ - .kd { color: $blue !important; } /* Keyword.Declaration */ - .kp { color: $orange !important; font-weight: bold !important; } /* Keyword.Pseudo */ - .kr { color: $magenta !important; font-weight: bold !important; } /* Keyword.Reserved */ - .kt { color: $cyan !important; } /* Keyword.Type */ - .n { color: $blue !important; } - .na { color: $blue !important; } /* Name.Attribute */ - .nb { color: $green !important; } /* Name.Builtin */ - .nc { color: $magenta !important;} /* Name.Class */ - .no { color: $yellow !important; } /* Name.Constant */ + .kc { color: $solar-green !important; font-weight: bold !important; } /* Keyword.Constant */ + .kd { color: $solar-blue !important; } /* Keyword.Declaration */ + .kp { color: $solar-orange !important; font-weight: bold !important; } /* Keyword.Pseudo */ + .kr { color: $solar-magenta !important; font-weight: bold !important; } /* Keyword.Reserved */ + .kt { color: $solar-cyan !important; } /* Keyword.Type */ + .n { color: $solar-blue !important; } + .na { color: $solar-blue !important; } /* Name.Attribute */ + .nb { color: $solar-green !important; } /* Name.Builtin */ + .nc { color: $solar-magenta !important;} /* Name.Class */ + .no { color: $solar-yellow !important; } /* Name.Constant */ //.ni { color: #800080 } /* Name.Entity */ - .nl { color: $green !important; } - .ne { color: $blue !important; font-weight: bold !important; } /* Name.Exception */ - .nf { color: $blue !important; font-weight: bold !important; } /* Name.Function */ - .nn { color: $yellow !important; } /* Name.Namespace */ - .nt { color: $blue !important; font-weight: bold !important; } /* Name.Tag */ - .nx { color: $yellow !Important; } + .nl { color: $solar-green !important; } + .ne { color: $solar-blue !important; font-weight: bold !important; } /* Name.Exception */ + .nf { color: $solar-blue !important; font-weight: bold !important; } /* Name.Function */ + .nn { color: $solar-yellow !important; } /* Name.Namespace */ + .nt { color: $solar-blue !important; font-weight: bold !important; } /* Name.Tag */ + .nx { color: $solar-yellow !Important; } //.bp { color: #999999 } /* Name.Builtin.Pseudo */ //.vc { color: #008080 } /* Name.Variable.Class */ - .vg { color: $blue !important; } /* Name.Variable.Global */ - .vi { color: $blue !important; } /* Name.Variable.Instance */ - .nv { color: $blue !important; } /* Name.Variable */ + .vg { color: $solar-blue !important; } /* Name.Variable.Global */ + .vi { color: $solar-blue !important; } /* Name.Variable.Instance */ + .nv { color: $solar-blue !important; } /* Name.Variable */ //.w { color: #bbbbbb } /* Text.Whitespace */ - .mf { color: $cyan !important; } /* Literal.Number.Float */ - .m { color: $cyan !important; } /* Literal.Number */ - .mh { color: $cyan !important; } /* Literal.Number.Hex */ - .mi { color: $cyan !important; } /* Literal.Number.Integer */ + .mf { color: $solar-cyan !important; } /* Literal.Number.Float */ + .m { color: $solar-cyan !important; } /* Literal.Number */ + .mh { color: $solar-cyan !important; } /* Literal.Number.Hex */ + .mi { color: $solar-cyan !important; } /* Literal.Number.Integer */ //.mo { color: #009999 } /* Literal.Number.Oct */ - .s { color: $cyan !important; } /* Literal.String */ + .s { color: $solar-cyan !important; } /* Literal.String */ //.sb { color: #d14 } /* Literal.String.Backtick */ //.sc { color: #d14 } /* Literal.String.Char */ - .sd { color: $cyan !important; } /* Literal.String.Doc */ - .s2 { color: $cyan !important; } /* Literal.String.Double */ - .se { color: $red !important; } /* Literal.String.Escape */ + .sd { color: $solar-cyan !important; } /* Literal.String.Doc */ + .s2 { color: $solar-cyan !important; } /* Literal.String.Double */ + .se { color: $solar-red !important; } /* Literal.String.Escape */ //.sh { color: #d14 } /* Literal.String.Heredoc */ - .si { color: $blue !important; } /* Literal.String.Interpol */ + .si { color: $solar-blue !important; } /* Literal.String.Interpol */ //.sx { color: #d14 } /* Literal.String.Other */ - .sr { color: $cyan !important; } /* Literal.String.Regex */ - .s1 { color: $cyan !important; } /* Literal.String.Single */ + .sr { color: $solar-cyan !important; } /* Literal.String.Regex */ + .s1 { color: $solar-cyan !important; } /* Literal.String.Single */ //.ss { color: #990073 } /* Literal.String.Symbol */ //.il { color: #009999 } /* Literal.Number.Integer.Long */ div { .gd, .gd .x, .gi, .gi .x { display: block; }} @@ -169,9 +186,17 @@ p code { overflow-y: hidden; overflow-x: auto; } + +$solar-scroll-bg: rgba(#fff, .15); +$solar-scroll-thumb: rgba(#fff, .2); +@if $solarized == light { + $solar-scroll-bg: rgba(#000, .15); + $solar-scroll-thumb: rgba(#000, .15); +} + pre, .highlight, .gist-highlight { - &::-webkit-scrollbar { height: .5em; background: rgba(#fff, .15); } - &::-webkit-scrollbar-thumb:horizontal { background: rgba(#fff, .2); -webkit-border-radius: 4px; border-radius: 4px } + &::-webkit-scrollbar { height: .5em; background: $solar-scroll-bg; } + &::-webkit-scrollbar-thumb:horizontal { background: $solar-scroll-thumb; -webkit-border-radius: 4px; border-radius: 4px } } .highlight code { @extend .pre-code; background: #000;} @@ -186,7 +211,9 @@ figure[role=code] { @extend .code-title; a { @extend .download-source; } } - .highlight { margin-bottom: 0; border-bottom: 1px solid darken($base03, 2) !important; } + .highlight { + margin-bottom: 0; + } } .code-title { text-align: center; @@ -215,5 +242,3 @@ figure[role=code] { text-shadow: #cbcccc 0 1px 0; padding-left: 3em; } - - |