-
-
Notifications
You must be signed in to change notification settings - Fork 303
/
CodeBlock.module.scss
112 lines (91 loc) · 2.16 KB
/
CodeBlock.module.scss
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
@use '../../everything' as *;
.block {
@include rmd-typography(body-1);
background-color: $solarized-base-03;
color: $solarized-base-1;
// always enforce ltr for blocked code
direction: ltr;
font-family: 'Source Code Pro', Consolas, Monaco, monospace;
margin: 0.5em 0;
overflow: auto;
padding: 1em;
&::selection,
*::selection {
background-color: $solarized-base-02;
}
// to help with the collapse transition on expandable code, update it so
// that only the vertical overflow is hidden.
&.rmd-collapse--no-overflow {
overflow-y: hidden;
}
// prismjs custom theme
// this is _basically_ my current vim theme, but not aas good since
// Prism doesn't have as many tokenizers
:global {
.token {
position: relative;
z-index: 1;
&.comment,
&.doctype {
color: $solarized-base-01;
}
&.keyword {
color: $solarized-green;
}
&.punctuation {
color: $solarized-base-01;
}
&.inserted,
&.string,
.language-tsx &.attr-value {
color: $solarized-cyan;
}
&.tag,
&.selector,
&.class-name {
color: $solarized-blue;
}
&.attr-name,
&.property,
&.builtin {
color: $solarized-yellow;
}
&.script,
&.interpolation {
color: $solarized-base-1;
}
&.deleted,
&.boolean,
&.number,
&.interpolation-punctuation {
color: $solarized-red;
}
&.important,
&.bold {
font-weight: map-get($rmd-typography-font-weights, bold);
}
&.italic {
font-style: italic;
}
&.entity {
cursor: help;
}
}
}
&:global(.language-scss) :global .token.function,
&:global(.language-scss) :global .token.variable {
color: $solarized-blue;
}
&:global(.language-ts) :global .token + .class-name,
&:global(.language-tsx) :global .token + .class-name {
color: $solarized-base-1;
}
&:global(.language-scss) :global .token.function,
&:global(.language-shell) :global .token.function {
color: $solarized-orange;
}
}
.counted {
padding-left: 3em;
position: relative;
}