aboutsummaryrefslogtreecommitdiff
path: root/_sass/code.scss
blob: cc27a5e5fd6b0d8dc4b61193afd15756544480a1 (plain)
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
pre.highlight {
	code { color: var(--code); }
	// https://github.com/rouge-ruby/rouge/wiki/List-of-tokens
	@each $c in c,cm,cp,c1,cs { .#{$c} { @extend %token_comment } }
	@each $c in k,kc,kd,kn,kp,kr,kt { .#{$c} { @extend %token_keyword } }
	@each $c in s,sb,sc,sd,s2,se,sh,si,sx,sr,s1,ss { .#{$c} { @extend %token_string } }
	@each $c in m,mf,mh,mi,il,mo,mx,mb { .#{$c} { @extend %token_number } }
	@each $c in o,ow { .#{$c} { @extend %token_operator } }
}

%token_comment { font-style: italic; }
%token_keyword { font-weight: 700; }

%token_comment { color: var(--code-comment); }
%token_keyword { color: var(--code-keyword); }
%token_string { color: var(--code-string); }
%token_number { color: var(--code-number); }
%token_operator { color: var(--code-operator); }

:root {
	--code-comment: #556885;
	--code-keyword: #a72076;
	--code-string: #755a1c;
	--code-number: #c94f29;
	--code-operator: #6327c1;
}