Skip to content

Commit 98fb928

Browse files
committed
Formatting
1 parent 4418b76 commit 98fb928

File tree

1 file changed

+88
-79
lines changed

1 file changed

+88
-79
lines changed

assets/scss/_code.scss

Lines changed: 88 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,101 @@
11
// Code formatting.
22

33
.td-content {
4-
// Highlighted code.
5-
.highlight {
6-
@extend .card;
7-
8-
margin: 0.5rem 0 1rem 0;
9-
padding: 0;
10-
11-
pre {
12-
margin: 0;
13-
padding: 1rem;
14-
}
15-
}
164

17-
// Inline code
18-
p code, li > code, table code {
19-
color: inherit;
20-
padding: 0.2em 0.4em;
21-
margin: 0;
22-
font-size: 85%;
23-
word-break: normal;
24-
background-color: rgba($black, 0.05);
25-
border-radius: $border-radius;
26-
27-
br {
28-
display: none;
29-
}
30-
}
5+
// Highlighted code.
6+
.highlight {
7+
@extend .card;
318

9+
margin: 0.5rem 0 1rem 0;
10+
padding: 0;
3211

33-
// Code blocks
3412
pre {
35-
word-wrap: normal;
36-
background-color: $gray-100;
37-
padding: $spacer;
38-
39-
40-
> code {
41-
background-color: inherit !important;
42-
padding: 0;
43-
margin: 0;
44-
font-size: 100%;
45-
word-break: normal;
46-
white-space: pre;
47-
border: 0;
48-
}
13+
margin: 0;
14+
padding: 1rem;
4915
}
16+
}
5017

51-
pre.mermaid {
52-
background-color: inherit;
53-
font-size: 0;
54-
}
55-
}
18+
// Inline code
19+
p code,
20+
li>code,
21+
table code {
22+
color: inherit;
23+
padding: 0.2em 0.4em;
24+
margin: 0;
25+
font-size: 85%;
26+
word-break: normal;
27+
background-color: rgba($black, 0.05);
28+
border-radius: $border-radius;
5629

57-
.clipboard-button {
58-
position: absolute;
59-
right: 0;
60-
padding: 2px 7px 5px 7px;
61-
margin: 5px;
62-
color: #767676;
63-
border-color: #767676;
64-
background-color: #ededed;
65-
border: 1px solid;
66-
border-radius: 6px;
67-
font-size: 0.8em;
68-
z-index: 1;
69-
opacity: 0;
70-
transition: 0.1s;
71-
}
72-
.clipboard-button > svg {
73-
fill: #767676;
74-
}
75-
.clipboard-button:hover {
76-
cursor: pointer;
77-
border-color: #696969;
78-
background-color: #e0e0e0;
79-
}
80-
.clipboard-button:hover > svg {
81-
fill: #696969;
30+
br {
31+
display: none;
32+
}
8233
}
83-
.clipboard-button:focus {
84-
outline: 0;
34+
35+
36+
// Code blocks
37+
pre {
38+
word-wrap: normal;
39+
background-color: $gray-100;
40+
padding: $spacer;
41+
42+
43+
>code {
44+
background-color: inherit !important;
45+
padding: 0;
46+
margin: 0;
47+
font-size: 100%;
48+
word-break: normal;
49+
white-space: pre;
50+
border: 0;
51+
}
8552
}
86-
.highlight {
87-
position: relative;
53+
54+
pre.mermaid {
55+
background-color: inherit;
56+
font-size: 0;
8857
}
89-
.highlight:hover > .clipboard-button {
90-
opacity: 1;
91-
transition: 0.2s;
92-
}
58+
}
59+
60+
.clipboard-button {
61+
position: absolute;
62+
right: 0;
63+
padding: 2px 7px 5px 7px;
64+
margin: 5px;
65+
color: #767676;
66+
border-color: #767676;
67+
background-color: #ededed;
68+
border: 1px solid;
69+
border-radius: 6px;
70+
font-size: 0.8em;
71+
z-index: 1;
72+
opacity: 0;
73+
transition: 0.1s;
74+
}
75+
76+
.clipboard-button>svg {
77+
fill: #767676;
78+
}
79+
80+
.clipboard-button:hover {
81+
cursor: pointer;
82+
border-color: #696969;
83+
background-color: #e0e0e0;
84+
}
85+
86+
.clipboard-button:hover>svg {
87+
fill: #696969;
88+
}
89+
90+
.clipboard-button:focus {
91+
outline: 0;
92+
}
93+
94+
.highlight {
95+
position: relative;
96+
}
97+
98+
.highlight:hover>.clipboard-button {
99+
opacity: 1;
100+
transition: 0.2s;
101+
}

0 commit comments

Comments
 (0)