forked from Chalarangelo/30-seconds-of-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_code.scss
More file actions
121 lines (109 loc) · 2.67 KB
/
Copy path_code.scss
File metadata and controls
121 lines (109 loc) · 2.67 KB
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
113
114
115
116
117
118
119
120
121
// Style code
code, kbd, pre {
font-size: 0.875em;
}
code, kbd, pre, code *, pre *, kbd *, code[class*="language-"], pre[class*="language-"] {
font-family: 'Roboto Mono', Menlo, Consolas, monospace;
}
code {
background: var(--code-back-color);
color: var(--code-fore-color);
padding: 0.125rem 0.375rem;
border-radius: 0.125rem;
}
pre {
overflow: auto; // Responsiveness
background: var(--pre-back-color);
color: var(--pre-fore-color);
padding: 0.375rem;
margin: 0.5rem;
border: 0;
}
code[class*="language-"], pre[class*="language-"] {
color: var(--pre-fore-color);
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.8;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
-webkit-hypens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"] {
padding: 1rem;
overflow: auto;
margin: 0.5rem 0;
white-space: pre-wrap;
}
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
background: var(--pre-selected-color);
}
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
background: var(--pre-selected-color);
}
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.namespace {
opacity: .7;
}
.token {
&.comment, &.prolog, &.doctype, &.cdata {
color: var(--token-color-a);
}
&.punctuation {
color: var(--token-color-b);
}
&.property, &.tag, &.boolean, &.constant, &.symbol, &.deleted, &.function {
color: var(--token-color-c);
}
&.number, &.class-name {
color: var(--token-color-d);
}
&.selector, &.attr-name, &.string, &.char, &.builtin, &.inserted {
color: var(--token-color-e);
}
&.operator, &.entity, &.url, &.atrule, &.attr-value, &.keyword, &.interpolation-punctuation {
color: var(--token-color-f);
}
&.regex {
color: var(--token-color-g);
}
&.important, &.variable {
color: var(--token-color-h);
}
&.italic, &.comment {
font-style: italic;
}
&.important, &.bold {
font-weight: 500;
}
&.entity {
cursor: help;
}
}
.language-css .token.string, .style .token.string {
color: var(--token-color-f);
}
p > code, a > code {
&, &[class*="language-"] {
color: var(--code-fore-color);
background: var(--code-back-color);
&::-moz-selection, & ::-moz-selection {
background: var(--code-selected-color);
}
&::selection, & ::selection {
background: var(--code-selected-color);
}
}
}