-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtable-mod.css
52 lines (41 loc) · 1.55 KB
/
table-mod.css
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
/* Table Mod */
body {
--table-width: 88cqw;
--table-border-color: rgba(169, 169, 169, 0.2);
}
body:not(.table-width-obsidian-default) .markdown-source-view.mod-cm6 .cm-table-widget .table-wrapper,
body:not(.table-width-obsidian-default) :is(.markdown-rendered, .markdown-source-view.mod-cm6.is-live-preview) table {
width: 100% !important;
}
.markdown-source-view,
.markdown-reading-view {
container-type: inline-size;
}
.table-width-customized .markdown-source-view.mod-cm6.is-live-preview .cm-content>.cm-table-widget,
.table-width-customized .markdown-rendered .markdown-preview-sizer>div:has(>table) {
overflow: auto;
width: var(--table-width) !important;
margin-left: calc((var(--table-width) - 100%) / -2) !important;
}
:root table {
--table-border-radius: 8px;
border-collapse: separate;
border-spacing: 2px;
}
tr td,
tr th {
border-radius: var(--table-border-radius);
}
:root :is(td, th) {
border-width: 1px;
}
/* Uncomment the lines below to remove border spacing and combine all table boxes together */
/* === erase this line to uncomment === //
:root table {border-spacing: 0;}
tr td, tr th {border-radius: 0;}
th:first-child {border-top-left-radius: var(--table-border-radius);}
th:last-child {border-top-right-radius: var(--table-border-radius);}
tr:last-child td:first-child {border-bottom-left-radius: var(--table-border-radius);}
tr:last-child td:last-child {border-bottom-right-radius: var(--table-border-radius);}
:root :is(td, th) {border-width: 0 var(--table-border-width) var(--table-border-width) 0;}
/* */