Skip to content

Instantly share code, notes, and snippets.

@swartzrock
Created April 13, 2014 18:33
Show Gist options
  • Save swartzrock/10596208 to your computer and use it in GitHub Desktop.
Save swartzrock/10596208 to your computer and use it in GitHub Desktop.
Bks2.com code styling
// Source Code boxes
.highlight, pre, .gist-data {
@include border-radius( 0 );
@include box-shadow(#bbb 0 0 6px);
code, .line-numbers, .line_data, .line_data pre, .line_numbers { font-size: 15px; line-height: 1.5em; }
.line-numbers, .line_numbers { background: #f6f6f6; color: #999; }
}
.code-title {
@include border-top-radius(0);
font: normal 14px $mono;
text-shadow: none;
color: #666;
line-height: 2em;
background: #f6f6f6;
border: 1px solid #ddd;
}
.highlight {
border-top: none;
}
//
// Solarized
//
@mixin default() { color: #000; font-weight: normal; }
@mixin keyword() { color: #007; font-weight: bold; }
@mixin strings() { color: #888; font-weight: bold; }
@mixin names() { color: #56a; font-weight: bold; }
@mixin comments(){ color: #888; font-style: normal; }
$solarizedBase01: #222;
$solarizedBase03: #002b36;
$solarizedBase1: #93a1a1;
#main .pre-code {
background: white;
.bp { @include default(); } /* Name.Builtin.Pseudo */
.c { @include comments(); } /* Comment */
.c1 { @include comments(); } /* Comment.Single */
.cm { @include comments(); } /* Comment.Multiline */
.cp { color: $solarizedBase01; } /* Comment.Preproc */
.cs { color: $solarizedBase01; font-weight: bold; } /* Comment.Special */
.err { @include default(); } /* Error */
.gd { color: $solarizedBase1; background-color: mix(black, $solarizedBase03, 25%); display: inline-block; } /* Generic.Deleted */
.gd .x { color: $solarizedBase1; background-color: mix(black, $solarizedBase03, 35%); display: inline-block; } /* Generic.Deleted.Specific */
.ge { color: $solarizedBase1; font-style: italic; } /* Generic.Emph */
.gh { color: $solarizedBase01; } /* Generic.Heading */
.gi { color: $solarizedBase1; background-color: mix(black, $solarizedBase03, 20%); display: inline-block; } /* Generic.Inserted */
.gi .x { color: $solarizedBase1; background-color: mix(black, $solarizedBase03, 40%); display: inline-block; } /* Generic.Inserted.Specific */
.go { @include default(); } /* Generic.Output */
.gp { @include default(); } /* Generic.Prompt */
.gr { @include default(); } /* Generic.Error */
.gs { color: $solarizedBase1; font-weight: bold; } /* Generic.Strong */
.gt { @include default(); } /* Generic.Traceback */
.gu { @include default(); } /* Generic.Subheading */
.il { @include default(); } /* Literal.Number.Integer.Long */
.k { @include keyword; } /* Keyword */
.kc { @include default(); } /* Keyword.Constant */
.kd { @include keyword; } /* Keyword.Declaration */
.kp { @include default(); } /* Keyword.Pseudo */
.kr { @include default(); } /* Keyword.Reserved */
.kt { @include names(); } /* Keyword.Type */
.m { @include default(); } /* Literal.Number */
.mf { @include default(); } /* Literal.Number.Float */
.mh { @include default(); } /* Literal.Number.Hex */
.mi { @include default(); } /* Literal.Number.Integer */
.mo { @include default(); } /* Literal.Number.Oct */
.n { @include default(); }
.na { @include default(); } /* Name.Attribute */
.nb { @include default(); } /* Name.Builtin */
.nc { @include names;} /* Name.Class */
.ne { @include default(); } /* Name.Exception */
.nf { @include default(); } /* Name.Function */
.ni { @include default(); } /* Name.Entity */
.nl { @include default(); }
.nn { @include default(); } /* Name.Namespace */
.no { @include default(); } /* Name.Constant */
.nt { @include default(); } /* Name.Tag */
.nv { @include default(); } /* Name.Variable */
.nx { @include default(); }
.o { @include default(); } /* Operator */
.ow { @include default(); } /* Operator.Word */
.p { @include default(); } /* Operator */
.s { @include strings; } /* Literal.String */
.s1 { @include strings; } /* Literal.String.Single */
.s2 { @include strings; } /* Literal.String.Double */
.sb { @include default(); } /* Literal.String.Backtick */
.sc { @include default(); } /* Literal.String.Char */
.sd { @include default(); } /* Literal.String.Doc */
.se { @include default(); } /* Literal.String.Escape */
.sh { @include default(); } /* Literal.String.Heblackoc */
.si { @include default(); } /* Literal.String.Interpol */
.sr { @include default(); } /* Literal.String.Regex */
.ss { @include default(); } /* Literal.String.Symbol */
.sx { @include default(); } /* Literal.String.Other */
.vc { @include default(); } /* Name.Variable.Class */
.vg { @include default(); } /* Name.Variable.Global */
.vi { @include default(); } /* Name.Variable.Instance */
.w { @include default(); } /* Text.Whitespace */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment