Skip to content

Commit c2c2752

Browse files
committed
Move filepreview css to own file; clean up some rules
1 parent 6c8b2ad commit c2c2752

File tree

3 files changed

+43
-29
lines changed

3 files changed

+43
-29
lines changed

web_src/css/index.css

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
@import "./markup/content.css";
3131
@import "./markup/codecopy.css";
3232
@import "./markup/asciicast.css";
33+
@import "./markup/filepreview.css";
3334

3435
@import "./chroma/base.css";
3536
@import "./codemirror/base.css";

web_src/css/markup/content.css

+7-29
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
.markup ul,
129129
.markup ol,
130130
.markup dl,
131-
.markup table:not(.file-preview),
131+
.markup table,
132132
.markup pre {
133133
margin-top: 0;
134134
margin-bottom: 16px;
@@ -281,29 +281,29 @@
281281
margin-bottom: 0;
282282
}
283283

284-
.markup table:not(.file-preview) {
284+
.markup table {
285285
display: block;
286286
width: 100%;
287287
width: max-content;
288288
max-width: 100%;
289289
overflow: auto;
290290
}
291291

292-
.markup table:not(.file-preview) th {
292+
.markup table th {
293293
font-weight: var(--font-weight-semibold);
294294
}
295295

296-
.markup table:not(.file-preview) th,
297-
.markup table:not(.file-preview) td {
296+
.markup table th,
297+
.markup table td {
298298
padding: 6px 13px !important;
299299
border: 1px solid var(--color-secondary) !important;
300300
}
301301

302-
.markup table:not(.file-preview) tr {
302+
.markup table tr {
303303
border-top: 1px solid var(--color-secondary);
304304
}
305305

306-
.markup table:not(.file-preview) tr:nth-child(2n) {
306+
.markup table tr:nth-child(2n) {
307307
background-color: var(--color-markup-table-row);
308308
}
309309

@@ -586,25 +586,3 @@
586586
.file-view.markup.orgmode li.indeterminate > p {
587587
display: inline-block;
588588
}
589-
590-
.markup .file-preview-box {
591-
margin-bottom: 16px;
592-
}
593-
594-
.markup .file-preview-box div:nth-child(1) {
595-
padding: .5rem;
596-
padding-left: 1rem;
597-
border: 1px solid var(--color-secondary);
598-
border-bottom: none;
599-
border-radius: 0.28571429rem 0.28571429rem 0 0;
600-
background: var(--color-box-header);
601-
}
602-
603-
.markup .file-preview-box div:nth-child(1) > a {
604-
display: block;
605-
}
606-
607-
.markup .file-preview-box .table {
608-
margin-top: 0;
609-
border-radius: 0 0 0.28571429rem 0.28571429rem;
610-
}

web_src/css/markup/filepreview.css

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.markup table.file-preview {
2+
margin-bottom: 0px;
3+
}
4+
5+
.markup table.file-preview td {
6+
padding: 0 10px 0 10px !important;
7+
border: none !important;
8+
}
9+
10+
.markup table.file-preview tr {
11+
border-top: none;
12+
background-color: inherit !important;
13+
}
14+
15+
.markup .file-preview-box {
16+
margin-bottom: 16px;
17+
}
18+
19+
.markup .file-preview-box .header {
20+
padding: .5rem;
21+
padding-left: 1rem;
22+
border: 1px solid var(--color-secondary);
23+
border-bottom: none;
24+
border-radius: 0.28571429rem 0.28571429rem 0 0;
25+
background: var(--color-box-header);
26+
}
27+
28+
.markup .file-preview-box .header > a {
29+
display: block;
30+
}
31+
32+
.markup .file-preview-box .table {
33+
margin-top: 0;
34+
border-radius: 0 0 0.28571429rem 0.28571429rem;
35+
}

0 commit comments

Comments
 (0)