Skip to content

Commit 383696d

Browse files
committed
Refactor CSS class names from .post-content to .md-content
1 parent f1b2dea commit 383696d

4 files changed

Lines changed: 59 additions & 59 deletions

File tree

assets/css/common/md-content.css

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,161 +1,161 @@
1-
.post-content {
1+
.md-content {
22
color: var(--content);
33
margin: 30px 0;
44
}
55

6-
.post-content h3,
7-
.post-content h4,
8-
.post-content h5,
9-
.post-content h6 {
6+
.md-content h3,
7+
.md-content h4,
8+
.md-content h5,
9+
.md-content h6 {
1010
margin: 24px 0 16px;
1111
}
1212

13-
.post-content h1 {
13+
.md-content h1 {
1414
margin: 40px auto 32px;
1515
font-size: 40px;
1616
}
1717

18-
.post-content h2 {
18+
.md-content h2 {
1919
margin: 32px auto 24px;
2020
font-size: 32px;
2121
}
2222

23-
.post-content h3 {
23+
.md-content h3 {
2424
font-size: 24px;
2525
}
2626

27-
.post-content h4 {
27+
.md-content h4 {
2828
font-size: 16px;
2929
}
3030

31-
.post-content h5 {
31+
.md-content h5 {
3232
font-size: 14px;
3333
}
3434

35-
.post-content h6 {
35+
.md-content h6 {
3636
font-size: 12px;
3737
}
3838

39-
.post-content a {
39+
.md-content a {
4040
box-shadow: 0 1px 0;
4141
box-decoration-break: clone;
4242
-webkit-box-decoration-break: clone;
4343
}
4444

45-
.post-content a code {
45+
.md-content a code {
4646
margin: auto 0;
4747
border-radius: 0;
4848
box-shadow: 0 -1px 0 var(--primary) inset;
4949
}
5050

51-
.post-content del {
51+
.md-content del {
5252
text-decoration: line-through;
5353
}
5454

55-
.post-content dl,
56-
.post-content ol,
57-
.post-content p,
58-
.post-content figure,
59-
.post-content ul {
55+
.md-content dl,
56+
.md-content ol,
57+
.md-content p,
58+
.md-content figure,
59+
.md-content ul {
6060
margin-bottom: var(--content-gap);
6161
}
6262

63-
.post-content ol,
64-
.post-content ul {
63+
.md-content ol,
64+
.md-content ul {
6565
padding-inline-start: 20px;
6666
}
6767

68-
.post-content li {
68+
.md-content li {
6969
margin-top: 5px;
7070
}
7171

72-
.post-content li p {
72+
.md-content li p {
7373
margin-bottom: 0;
7474
}
7575

76-
.post-content dl {
76+
.md-content dl {
7777
display: flex;
7878
flex-wrap: wrap;
7979
margin: 0;
8080
}
8181

82-
.post-content dt {
82+
.md-content dt {
8383
width: 25%;
8484
font-weight: 700;
8585
}
8686

87-
.post-content dd {
87+
.md-content dd {
8888
width: 75%;
8989
margin-inline-start: 0;
9090
padding-inline-start: 10px;
9191
}
9292

93-
.post-content dd~dd,
94-
.post-content dt~dt {
93+
.md-content dd~dd,
94+
.md-content dt~dt {
9595
margin-top: 10px;
9696
}
9797

98-
.post-content table {
98+
.md-content table {
9999
margin-bottom: var(--content-gap);
100100
}
101101

102-
.post-content table th,
103-
.post-content table:not(.highlighttable, .highlight table, .gist .highlight) td {
102+
.md-content table th,
103+
.md-content table:not(.highlighttable, .highlight table, .gist .highlight) td {
104104
min-width: 80px;
105105
padding: 8px 5px;
106106
line-height: 1.5;
107107
border-bottom: 1px solid var(--border);
108108
}
109109

110-
.post-content table th {
110+
.md-content table th {
111111
text-align: start;
112112
}
113113

114-
.post-content table:not(.highlighttable) td code:only-child {
114+
.md-content table:not(.highlighttable) td code:only-child {
115115
margin: auto 0;
116116
}
117117

118-
.post-content .highlight table {
118+
.md-content .highlight table {
119119
border-radius: var(--radius);
120120
}
121121

122-
.post-content .highlight:not(table) {
122+
.md-content .highlight:not(table) {
123123
margin: 10px auto;
124124
background: var(--code-block-bg) !important;
125125
border-radius: var(--radius);
126126
direction: ltr;
127127
}
128128

129-
.post-content li>.highlight {
129+
.md-content li>.highlight {
130130
margin-inline-end: 0;
131131
}
132132

133-
.post-content ul pre {
133+
.md-content ul pre {
134134
margin-inline-start: calc(var(--gap) * -2);
135135
}
136136

137-
.post-content .highlight pre {
137+
.md-content .highlight pre {
138138
margin: 0;
139139
}
140140

141-
.post-content .highlighttable {
141+
.md-content .highlighttable {
142142
table-layout: fixed;
143143
}
144144

145-
.post-content .highlighttable td:first-child {
145+
.md-content .highlighttable td:first-child {
146146
width: 40px;
147147
}
148148

149-
.post-content .highlighttable td .linenodiv {
149+
.md-content .highlighttable td .linenodiv {
150150
padding-inline-end: 0 !important;
151151
}
152152

153-
.post-content .highlighttable td .highlight,
154-
.post-content .highlighttable td .linenodiv pre {
153+
.md-content .highlighttable td .highlight,
154+
.md-content .highlighttable td .linenodiv pre {
155155
margin-bottom: 0;
156156
}
157157

158-
.post-content code {
158+
.md-content code {
159159
margin: auto 4px;
160160
padding: 4px 6px;
161161
font-size: 0.78em;
@@ -164,7 +164,7 @@
164164
border-radius: 2px;
165165
}
166166

167-
.post-content pre code {
167+
.md-content pre code {
168168
display: grid;
169169
margin: auto 0;
170170
padding: 10px;
@@ -175,44 +175,44 @@
175175
word-break: break-all;
176176
}
177177

178-
.post-content blockquote {
178+
.md-content blockquote {
179179
margin: 20px 0;
180180
padding: 0 14px;
181181
border-inline-start: 3px solid var(--primary);
182182
}
183183

184-
.post-content hr {
184+
.md-content hr {
185185
margin: 30px 0;
186186
height: 2px;
187187
background: var(--tertiary);
188188
border: 0;
189189
}
190190

191-
.post-content iframe {
191+
.md-content iframe {
192192
max-width: 100%;
193193
}
194194

195-
.post-content img {
195+
.md-content img {
196196
border-radius: 4px;
197197
margin: 1rem 0;
198198
}
199199

200-
.post-content img[src*="#center"] {
200+
.md-content img[src*="#center"] {
201201
margin: 1rem auto;
202202
}
203203

204-
.post-content figure.align-center {
204+
.md-content figure.align-center {
205205
text-align: center;
206206
}
207207

208-
.post-content figure>figcaption {
208+
.md-content figure>figcaption {
209209
color: var(--primary);
210210
font-size: 16px;
211211
font-weight: bold;
212212
margin: 8px 0 16px;
213213
}
214214

215-
.post-content figure>figcaption>p {
215+
.md-content figure>figcaption>p {
216216
color: var(--secondary);
217217
font-size: 14px;
218218
font-weight: normal;

assets/css/includes/scroll-bar.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
}
2323

2424
/* from post-single */
25-
.post-content .highlighttable td .highlight pre code::-webkit-scrollbar {
25+
.md-content .highlighttable td .highlight pre code::-webkit-scrollbar {
2626
display: none;
2727
}
2828

29-
.post-content :not(table) ::-webkit-scrollbar-thumb {
29+
.md-content :not(table) ::-webkit-scrollbar-thumb {
3030
border: 2px solid var(--code-block-bg);
3131
background: rgb(113, 113, 117);
3232
}
3333

34-
.post-content :not(table) ::-webkit-scrollbar-thumb:hover {
34+
.md-content :not(table) ::-webkit-scrollbar-thumb:hover {
3535
background: rgb(163, 163, 165);
3636
}
3737

@@ -44,7 +44,7 @@
4444
background: rgb(112, 112, 112);
4545
}
4646

47-
.post-content table::-webkit-scrollbar-thumb {
47+
.md-content table::-webkit-scrollbar-thumb {
4848
border-width: 2px;
4949
}
5050

layouts/_default/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h1>
3131
{{- end }}
3232

3333
{{- if .Content }}
34-
<div class="post-content">
34+
<div class="md-content">
3535
{{- if not (.Param "disableAnchoredHeadings") }}
3636
{{- partial "anchored_headings.html" .Content -}}
3737
{{- else }}{{ .Content }}{{ end }}

layouts/_default/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h1 class="post-title entry-hint-parent">
3535
{{- end }}
3636

3737
{{- if .Content }}
38-
<div class="post-content">
38+
<div class="post-content md-content">
3939
{{- if not (.Param "disableAnchoredHeadings") }}
4040
{{- partial "anchored_headings.html" .Content -}}
4141
{{- else }}{{ .Content }}{{ end }}

0 commit comments

Comments
 (0)