Skip to content

Commit 0c48855

Browse files
committed
Various small fixes for tables and indentation
1 parent f35a13e commit 0c48855

File tree

10 files changed

+176
-103
lines changed

10 files changed

+176
-103
lines changed

Minimal.css

Lines changed: 65 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,27 +1013,35 @@ body.is-mobile .CodeMirror-foldgutter-open:after {
10131013
font-family: sans-serif;
10141014
transform: rotate(360deg); }
10151015

1016-
/* Indentation Guides (Obsidian 0.14.0+) */
1016+
/* Indentation Guides (Obsidian 0.14.0+)
10171017
body {
10181018
--ig-adjust-reading:-0.95em;
1019-
--ig-adjust-edit: 2px; }
1019+
--ig-adjust-edit: 2px;
1020+
}
10201021
10211022
.markdown-rendered.show-indentation-guide li.task-list-item > ul::before,
10221023
.markdown-rendered.show-indentation-guide li.task-list-item > ol::before,
10231024
.markdown-rendered.show-indentation-guide li > ul::before,
10241025
.markdown-rendered.show-indentation-guide li > ol::before {
1025-
left: var(--ig-adjust-reading); }
1026+
left:var(--ig-adjust-reading);
1027+
}
10261028
1027-
/* Live Preview */
10281029
.markdown-source-view.mod-cm6 .cm-indent::before {
1029-
transform: translateX(var(--ig-adjust-edit)); }
1030+
transform:translateX(var(--ig-adjust-edit));
1031+
}
1032+
1033+
.is-mobile {
10301034
1031-
.is-mobile .markdown-rendered.show-indentation-guide li > ul::before,
1032-
.is-mobile .markdown-rendered.show-indentation-guide li > ol::before {
1033-
left: calc(0em + var(--ig-adjust-reading)); }
1034-
.is-mobile .markdown-source-view.mod-cm6 .cm-indent::before {
1035-
transform: translateX(calc(2px + var(--ig-adjust-edit))); }
1035+
.markdown-rendered.show-indentation-guide li > ul::before,
1036+
.markdown-rendered.show-indentation-guide li > ol::before {
1037+
left:calc(0em + var(--ig-adjust-reading));
1038+
}
1039+
.markdown-source-view.mod-cm6 .cm-indent::before {
1040+
transform:translateX(calc(2px + var(--ig-adjust-edit)));
1041+
}
10361042
1043+
}
1044+
*/
10371045
/* Modals */
10381046
.modal-button-container .mod-checkbox {
10391047
--checkbox-radius: 4px; }
@@ -1381,10 +1389,6 @@ body {
13811389
.is-rtl {
13821390
--adaptive-list-edit-offset: calc(var(--list-edit-offset)*-1); }
13831391

1384-
/* Live Preview */
1385-
.markdown-source-view.mod-cm6 .cm-content .HyperMD-list-line {
1386-
transform: translateX(var(--adaptive-list-edit-offset)); }
1387-
13881392
/* Space between list items */
13891393
.markdown-source-view ol > li,
13901394
.markdown-source-view ul > li,
@@ -1469,7 +1473,7 @@ body {
14691473
--table-column-last-border-width: 0;
14701474
--table-row-last-border-width: 0;
14711475
--table-edge-cell-padding-first: 0;
1472-
--table-edge-cell-padding-last: 10px;
1476+
--table-edge-cell-padding-last: 0;
14731477
--table-cell-padding: 4px 10px;
14741478
--table-header-size: var(--table-text-size); }
14751479

@@ -1489,10 +1493,18 @@ body {
14891493
.markdown-preview-view td:first-child,
14901494
.markdown-preview-view th:first-child {
14911495
padding-left: var(--table-edge-cell-padding-first); }
1496+
.markdown-source-view.mod-cm6 td:first-child .table-cell-wrapper, .markdown-source-view.mod-cm6 th:first-child .table-cell-wrapper,
1497+
.markdown-preview-view td:first-child .table-cell-wrapper,
1498+
.markdown-preview-view th:first-child .table-cell-wrapper {
1499+
padding-left: 0; }
14921500
.markdown-source-view.mod-cm6 td:last-child, .markdown-source-view.mod-cm6 th:last-child,
14931501
.markdown-preview-view td:last-child,
14941502
.markdown-preview-view th:last-child {
14951503
padding-right: var(--table-edge-cell-padding-last); }
1504+
.markdown-source-view.mod-cm6 td:last-child .table-cell-wrapper, .markdown-source-view.mod-cm6 th:last-child .table-cell-wrapper,
1505+
.markdown-preview-view td:last-child .table-cell-wrapper,
1506+
.markdown-preview-view th:last-child .table-cell-wrapper {
1507+
padding-right: 0; }
14961508

14971509
/* Override Sortable plugin */
14981510
.markdown-preview-view th,
@@ -1518,6 +1530,12 @@ body {
15181530
color: var(--text-faint);
15191531
font-weight: 400; }
15201532

1533+
.table-cell-wrapper {
1534+
display: inline-block; }
1535+
.table-cell-wrapper .cm-active {
1536+
font-size: var(--table-text-size);
1537+
line-height: var(--table-line-height); }
1538+
15211539
/* Tags */
15221540
body.minimal-unstyled-tags {
15231541
--tag-background: transparent;
@@ -1561,15 +1579,15 @@ body, input, button {
15611579

15621580
body,
15631581
.markdown-preview-view,
1564-
.markdown-source-view.mod-cm6.is-live-preview .cm-scroller,
1565-
.cm-s-obsidian {
1582+
.view-content > .markdown-source-view.mod-cm6.is-live-preview > .cm-scroller,
1583+
.view-content > .cm-s-obsidian {
15661584
font-size: var(--font-adaptive-normal);
15671585
font-weight: var(--normal-weight);
15681586
line-height: var(--line-height); }
15691587

1570-
.markdown-source-view.mod-cm6 .cm-scroller,
1571-
.markdown-source-view,
1572-
.cm-s-obsidian {
1588+
.view-content > .markdown-source-view.mod-cm6 .cm-scroller,
1589+
.view-content > .markdown-source-view,
1590+
.view-content > .cm-s-obsidian {
15731591
line-height: var(--line-height);
15741592
font-family: var(--font-editor); }
15751593

@@ -2815,11 +2833,13 @@ body.minimal-focus-mode.show-view-header .view-content {
28152833
--table-text-size: 75%; }
28162834

28172835
.row-hover {
2818-
--table-edge-cell-padding-first: 10px; }
2836+
--table-edge-cell-padding-first: 8px;
2837+
--table-edge-cell-padding-last: 8px; }
28192838

28202839
.row-alt {
28212840
--table-row-alt-background: var(--background-table-rows);
2822-
--table-edge-cell-padding-first: 10px; }
2841+
--table-edge-cell-padding-first: 8px;
2842+
--table-edge-cell-padding-last: 8px; }
28232843

28242844
.col-alt .markdown-rendered:not(.cards) {
28252845
--table-column-alt-background: var(--background-table-rows); }
@@ -2833,7 +2853,9 @@ body.minimal-focus-mode.show-view-header .view-content {
28332853
--table-column-first-border-width: var(--border-width);
28342854
--table-column-last-border-width:var(--border-width);
28352855
--table-row-last-border-width: var(--border-width);
2836-
--table-edge-cell-padding: 10px; }
2856+
--table-edge-cell-padding: 8px;
2857+
--table-edge-cell-padding-first: 8px;
2858+
--table-edge-cell-padding-last: 8px; }
28372859

28382860
.table-nowrap {
28392861
--table-white-space: nowrap; }
@@ -2842,22 +2864,26 @@ body.minimal-focus-mode.show-view-header .view-content {
28422864
.table-nowrap .table-wrap {
28432865
--table-white-space: normal; }
28442866

2845-
.table-numbers table:not(.calendar) {
2846-
counter-reset: section; }
2847-
.table-numbers table:not(.calendar) > thead > tr > th:first-child::before {
2848-
content: " ";
2849-
padding-right: 0.5em;
2850-
display: inline-block;
2851-
min-width: 2em; }
2852-
.table-numbers table:not(.calendar) > tbody > tr > td:first-child::before {
2853-
counter-increment: section;
2854-
content: counter(section) " ";
2855-
text-align: center;
2856-
padding-right: 0.5em;
2857-
display: inline-block;
2858-
min-width: 2em;
2859-
color: var(--text-faint);
2860-
font-variant-numeric: tabular-nums; }
2867+
.table-numbers {
2868+
--table-numbers-padding-right: 0.5em; }
2869+
.table-numbers table:not(.calendar) {
2870+
counter-reset: section; }
2871+
.table-numbers table:not(.calendar) > thead > tr > th:first-child::before {
2872+
content: " ";
2873+
padding-right: var(--table-numbers-padding-right);
2874+
display: inline-block;
2875+
min-width: 2em; }
2876+
.table-numbers table:not(.calendar):not(.table-editor) > tbody > tr > td:first-child::before, .table-numbers table:not(.calendar).table-editor > tbody > tr > td:first-child .table-cell-wrapper::before {
2877+
counter-increment: section;
2878+
content: counter(section) " ";
2879+
text-align: center;
2880+
padding-right: var(--table-numbers-padding-right);
2881+
display: inline-block;
2882+
min-width: 2em;
2883+
color: var(--text-faint);
2884+
font-variant-numeric: tabular-nums; }
2885+
.table-numbers .table-editor {
2886+
--table-numbers-padding-right: 0; }
28612887

28622888
.row-lines-off table:not(.calendar) tbody > tr > td,
28632889
.row-lines-off .table-view-table > tbody > tr > td,

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Minimal",
3-
"version": "7.3.2",
3+
"version": "7.3.3",
44
"minAppVersion": "1.1.9",
55
"author": "@kepano",
66
"authorUrl": "https://twitter.com/kepano",

src/css/main.css

Lines changed: 65 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -970,27 +970,35 @@ body.is-mobile .CodeMirror-foldgutter-open:after {
970970
font-family: sans-serif;
971971
transform: rotate(360deg); }
972972

973-
/* Indentation Guides (Obsidian 0.14.0+) */
973+
/* Indentation Guides (Obsidian 0.14.0+)
974974
body {
975975
--ig-adjust-reading:-0.95em;
976-
--ig-adjust-edit: 2px; }
976+
--ig-adjust-edit: 2px;
977+
}
977978
978979
.markdown-rendered.show-indentation-guide li.task-list-item > ul::before,
979980
.markdown-rendered.show-indentation-guide li.task-list-item > ol::before,
980981
.markdown-rendered.show-indentation-guide li > ul::before,
981982
.markdown-rendered.show-indentation-guide li > ol::before {
982-
left: var(--ig-adjust-reading); }
983+
left:var(--ig-adjust-reading);
984+
}
983985
984-
/* Live Preview */
985986
.markdown-source-view.mod-cm6 .cm-indent::before {
986-
transform: translateX(var(--ig-adjust-edit)); }
987+
transform:translateX(var(--ig-adjust-edit));
988+
}
989+
990+
.is-mobile {
987991
988-
.is-mobile .markdown-rendered.show-indentation-guide li > ul::before,
989-
.is-mobile .markdown-rendered.show-indentation-guide li > ol::before {
990-
left: calc(0em + var(--ig-adjust-reading)); }
991-
.is-mobile .markdown-source-view.mod-cm6 .cm-indent::before {
992-
transform: translateX(calc(2px + var(--ig-adjust-edit))); }
992+
.markdown-rendered.show-indentation-guide li > ul::before,
993+
.markdown-rendered.show-indentation-guide li > ol::before {
994+
left:calc(0em + var(--ig-adjust-reading));
995+
}
996+
.markdown-source-view.mod-cm6 .cm-indent::before {
997+
transform:translateX(calc(2px + var(--ig-adjust-edit)));
998+
}
993999
1000+
}
1001+
*/
9941002
/* Modals */
9951003
.modal-button-container .mod-checkbox {
9961004
--checkbox-radius: 4px; }
@@ -1338,10 +1346,6 @@ body {
13381346
.is-rtl {
13391347
--adaptive-list-edit-offset: calc(var(--list-edit-offset)*-1); }
13401348

1341-
/* Live Preview */
1342-
.markdown-source-view.mod-cm6 .cm-content .HyperMD-list-line {
1343-
transform: translateX(var(--adaptive-list-edit-offset)); }
1344-
13451349
/* Space between list items */
13461350
.markdown-source-view ol > li,
13471351
.markdown-source-view ul > li,
@@ -1426,7 +1430,7 @@ body {
14261430
--table-column-last-border-width: 0;
14271431
--table-row-last-border-width: 0;
14281432
--table-edge-cell-padding-first: 0;
1429-
--table-edge-cell-padding-last: 10px;
1433+
--table-edge-cell-padding-last: 0;
14301434
--table-cell-padding: 4px 10px;
14311435
--table-header-size: var(--table-text-size); }
14321436

@@ -1446,10 +1450,18 @@ body {
14461450
.markdown-preview-view td:first-child,
14471451
.markdown-preview-view th:first-child {
14481452
padding-left: var(--table-edge-cell-padding-first); }
1453+
.markdown-source-view.mod-cm6 td:first-child .table-cell-wrapper, .markdown-source-view.mod-cm6 th:first-child .table-cell-wrapper,
1454+
.markdown-preview-view td:first-child .table-cell-wrapper,
1455+
.markdown-preview-view th:first-child .table-cell-wrapper {
1456+
padding-left: 0; }
14491457
.markdown-source-view.mod-cm6 td:last-child, .markdown-source-view.mod-cm6 th:last-child,
14501458
.markdown-preview-view td:last-child,
14511459
.markdown-preview-view th:last-child {
14521460
padding-right: var(--table-edge-cell-padding-last); }
1461+
.markdown-source-view.mod-cm6 td:last-child .table-cell-wrapper, .markdown-source-view.mod-cm6 th:last-child .table-cell-wrapper,
1462+
.markdown-preview-view td:last-child .table-cell-wrapper,
1463+
.markdown-preview-view th:last-child .table-cell-wrapper {
1464+
padding-right: 0; }
14531465

14541466
/* Override Sortable plugin */
14551467
.markdown-preview-view th,
@@ -1475,6 +1487,12 @@ body {
14751487
color: var(--text-faint);
14761488
font-weight: 400; }
14771489

1490+
.table-cell-wrapper {
1491+
display: inline-block; }
1492+
.table-cell-wrapper .cm-active {
1493+
font-size: var(--table-text-size);
1494+
line-height: var(--table-line-height); }
1495+
14781496
/* Tags */
14791497
body.minimal-unstyled-tags {
14801498
--tag-background: transparent;
@@ -1518,15 +1536,15 @@ body, input, button {
15181536

15191537
body,
15201538
.markdown-preview-view,
1521-
.markdown-source-view.mod-cm6.is-live-preview .cm-scroller,
1522-
.cm-s-obsidian {
1539+
.view-content > .markdown-source-view.mod-cm6.is-live-preview > .cm-scroller,
1540+
.view-content > .cm-s-obsidian {
15231541
font-size: var(--font-adaptive-normal);
15241542
font-weight: var(--normal-weight);
15251543
line-height: var(--line-height); }
15261544

1527-
.markdown-source-view.mod-cm6 .cm-scroller,
1528-
.markdown-source-view,
1529-
.cm-s-obsidian {
1545+
.view-content > .markdown-source-view.mod-cm6 .cm-scroller,
1546+
.view-content > .markdown-source-view,
1547+
.view-content > .cm-s-obsidian {
15301548
line-height: var(--line-height);
15311549
font-family: var(--font-editor); }
15321550

@@ -2772,11 +2790,13 @@ body.minimal-focus-mode.show-view-header .view-content {
27722790
--table-text-size: 75%; }
27732791

27742792
.row-hover {
2775-
--table-edge-cell-padding-first: 10px; }
2793+
--table-edge-cell-padding-first: 8px;
2794+
--table-edge-cell-padding-last: 8px; }
27762795

27772796
.row-alt {
27782797
--table-row-alt-background: var(--background-table-rows);
2779-
--table-edge-cell-padding-first: 10px; }
2798+
--table-edge-cell-padding-first: 8px;
2799+
--table-edge-cell-padding-last: 8px; }
27802800

27812801
.col-alt .markdown-rendered:not(.cards) {
27822802
--table-column-alt-background: var(--background-table-rows); }
@@ -2790,7 +2810,9 @@ body.minimal-focus-mode.show-view-header .view-content {
27902810
--table-column-first-border-width: var(--border-width);
27912811
--table-column-last-border-width:var(--border-width);
27922812
--table-row-last-border-width: var(--border-width);
2793-
--table-edge-cell-padding: 10px; }
2813+
--table-edge-cell-padding: 8px;
2814+
--table-edge-cell-padding-first: 8px;
2815+
--table-edge-cell-padding-last: 8px; }
27942816

27952817
.table-nowrap {
27962818
--table-white-space: nowrap; }
@@ -2799,22 +2821,26 @@ body.minimal-focus-mode.show-view-header .view-content {
27992821
.table-nowrap .table-wrap {
28002822
--table-white-space: normal; }
28012823

2802-
.table-numbers table:not(.calendar) {
2803-
counter-reset: section; }
2804-
.table-numbers table:not(.calendar) > thead > tr > th:first-child::before {
2805-
content: " ";
2806-
padding-right: 0.5em;
2807-
display: inline-block;
2808-
min-width: 2em; }
2809-
.table-numbers table:not(.calendar) > tbody > tr > td:first-child::before {
2810-
counter-increment: section;
2811-
content: counter(section) " ";
2812-
text-align: center;
2813-
padding-right: 0.5em;
2814-
display: inline-block;
2815-
min-width: 2em;
2816-
color: var(--text-faint);
2817-
font-variant-numeric: tabular-nums; }
2824+
.table-numbers {
2825+
--table-numbers-padding-right: 0.5em; }
2826+
.table-numbers table:not(.calendar) {
2827+
counter-reset: section; }
2828+
.table-numbers table:not(.calendar) > thead > tr > th:first-child::before {
2829+
content: " ";
2830+
padding-right: var(--table-numbers-padding-right);
2831+
display: inline-block;
2832+
min-width: 2em; }
2833+
.table-numbers table:not(.calendar):not(.table-editor) > tbody > tr > td:first-child::before, .table-numbers table:not(.calendar).table-editor > tbody > tr > td:first-child .table-cell-wrapper::before {
2834+
counter-increment: section;
2835+
content: counter(section) " ";
2836+
text-align: center;
2837+
padding-right: var(--table-numbers-padding-right);
2838+
display: inline-block;
2839+
min-width: 2em;
2840+
color: var(--text-faint);
2841+
font-variant-numeric: tabular-nums; }
2842+
.table-numbers .table-editor {
2843+
--table-numbers-padding-right: 0; }
28182844

28192845
.row-lines-off table:not(.calendar) tbody > tr > td,
28202846
.row-lines-off .table-view-table > tbody > tr > td,

src/css/main.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)