aboutsummaryrefslogtreecommitdiff
path: root/_sass/code.scss
blob: 79791b355fc8d5a9fb9801139427ce5725cc6c94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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); }