-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy path_code.css
More file actions
62 lines (50 loc) · 1.44 KB
/
_code.css
File metadata and controls
62 lines (50 loc) · 1.44 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
/* ----------- */
/* Code Blocks */
/* ----------- */
:root {
/* Mixin: Code
Styles inline code snippets. Fits nicely within a pagaraph. */
--code {
background-color: color(var(--base-gray) lightness(96%));
border: 1px solid color(var(--base-gray) lightness(85%));
border-radius: var(--global-border-radius);
color: var(--color-accent);
font-family: var(--font-monospace);
font-size: .8rem;
padding: .08rem .2rem;
white-space: normal;
}
/* Mixin: Pre
Default styling for code blocks. */
--pre {
background-color: color(var(--base-gray) lightness(96%));
border: 1px solid color(var(--base-gray) lightness(80%));
border-radius: var(--global-border-radius);
display: block;
font-family: var(--font-monospace);
font-size: .8rem;
line-height: inherit;
margin: 0 0 var(--default-margin);
padding: .5rem .8rem;
white-space: pre-wrap;
}
/* Mixin: Pre Dark
Dark theme for code blocks. Note: must be applied after --pre.*/
--pre-dark {
background-color: color(var(--base-gray) lightness(20%));
color: color(var(--base-gray) lightness(75%));
border: 1px solid color(var(--base-gray) lightness(14%));
}
/* Additive Mixin: Code blocks
WARNING: Creates classes in your css and styles them - not to be used inside
an element.
Adds Axis' styles to code blocks. */
--code-blocks {
code {
@apply --code;
}
pre {
@apply --pre;
}
}
}