forked from google/docsy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_code.scss
85 lines (73 loc) · 1.44 KB
/
_code.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
// Code formatting.
.td-content {
// Highlighted code.
.highlight {
@extend .card;
margin: 2rem 0;
padding: 0;
position: relative;
.click-to-copy {
display: block;
text-align: right;
height: 1ex;
}
pre {
margin: 0;
padding: 1rem;
// Default click-to-copy button
button.td-click-to-copy {
position: absolute;
color: $gray-400;
border-radius: 3px;
border-width: 0;
background-color: inherit;
box-shadow: 1px 1px $gray-400;
right: 4px;
top: 2px;
&:hover {
color: $dark;
background-color: $gray-400;
}
&:active {
color: $dark;
background-color: $gray-400;
transform: translateY(2px);
}
}
}
}
// Inline code
p code,
li > code,
table code {
color: inherit;
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
word-break: normal;
background-color: rgba($black, 0.05);
border-radius: $border-radius;
br {
display: none;
}
}
// Code blocks
pre {
word-wrap: normal;
background-color: $gray-100;
padding: $spacer;
> code {
background-color: inherit !important;
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
border: 0;
}
}
pre.mermaid {
background-color: inherit;
font-size: 0;
}
}