aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/code.scss
blob: d37addb0330f17100179876faec1f3e882675742 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
%code-block {
    background-color: $title-font-color;
    color: rgb(255, 255, 255);

    box-sizing: content-box;
    border-radius: 3px;
    white-space: pre-wrap;

    font-family: $code-font, $code-font;

}
%code-italic { font-style: italic; }
%code-strong { font-weight: bold; }

code {
    @extend %code-block;

    padding: 3px 5px;
    border-radius: 3px;
}

.highlight {
    @extend %code-block;

    margin: $default-spacing 0;
    padding: 0 $default-spacing;
    overflow-x: auto;

    .err { /* Error */
	    border: 1px solid #FF0000;
	    border-radius: 3px;
    }

    @include print {
	    background: none;

	    border-top: 1px solid black;
	    border-bottom: 1px solid black;

	    page-break-inside: avoid;
    }
}

.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 */