Skip to content

Commit 8c39827

Browse files
author
Palash
committed
separated out sidebar modifiers from main theme
1 parent 03c4752 commit 8c39827

File tree

2 files changed

+55
-21
lines changed

2 files changed

+55
-21
lines changed

roam-mappletons-andy-subdued.css

+22-21
Original file line numberDiff line numberDiff line change
@@ -371,21 +371,41 @@ span.rm-page-ref[data-tag="Alive"] {
371371
}
372372
/* modifications begin */
373373

374+
374375
/* sidebar magic 🔥 :)
375376
* resets the padding changes when sidebar is visible.
376-
* This allows the sidebar to overlay the content, instead of pushing it.
377+
* This allows the sidebar to overlay the content, instead of pushing it.
377378
* on click, the content gets pushed (as expected)
378379
* ~ is the sibling CSS selector; to detect the closed state of the sidebar
379380
*/
380381
.roam-sidebar-container:not([style^='left: 0px; top: 0px; bottom: 0px;']) ~ .roam-main .roam-body-main {
381382
width: 100vw !important;
382-
}
383+
}
383384

384385
.roam-sidebar-container:not([style^='left: 0px; top: 0px; bottom: 0px;']) ~ .roam-main .roam-body-main > .roam-center > div:first-child {
385386
padding-right: calc((100% - 800px) / 2) !important;
386387
padding-left: calc((100% - 800px) / 2) !important;
387388
}
388389

390+
/* Prevents weird siderbar scroll */
391+
html {
392+
overflow: hidden;
393+
}
394+
395+
/* more sidebar fixes */
396+
397+
/* makes the shortcuts stick edge-to-edge,
398+
* with spacing on the left
399+
*/
400+
.starred-pages-wrapper {
401+
padding: 8px 0 !important;
402+
}
403+
404+
.roam-body .roam-app .roam-sidebar-container .roam-sidebar-content .starred-pages-wrapper .starred-pages .page,
405+
.starred-pages-wrapper > div.flex-h-box {
406+
padding-left: 20px;
407+
}
408+
389409
/*
390410
* ⌗ for block refs 🚀
391411
*/
@@ -486,25 +506,6 @@ div::-webkit-scrollbar-thumb:hover {
486506
opacity: 0.4;
487507
}
488508

489-
/* prevents annoying scroll on the sidebar */
490-
491-
html {
492-
overflow: hidden;
493-
}
494-
495-
/* makes the shortcuts stick edge-to-edge, with spacing on the left */
496-
.starred-pages-wrapper {
497-
padding: 0 0 0 20px !important;
498-
}
499-
500-
/* makes the seperater above shortcuts full width */
501-
.starred-pages-wrapper > div:first-child {
502-
position: absolute;
503-
left: 0;
504-
right: 0;
505-
height: 1px;
506-
background-color: #dbdbdb !important;
507-
}
508509

509510
.block-highlight-yellow {
510511
background-color: #ffec99;

roam-sidebar-modifier.css

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* sidebar magic 🔥 :)
2+
* resets the padding changes when sidebar is visible.
3+
* This allows the sidebar to overlay the content, instead of pushing it.
4+
* on click, the content gets pushed (as expected)
5+
* ~ is the sibling CSS selector; to detect the closed state of the sidebar
6+
*/
7+
.roam-sidebar-container:not([style^='left: 0px; top: 0px; bottom: 0px;']) ~ .roam-main .roam-body-main {
8+
width: 100vw !important;
9+
}
10+
11+
.roam-sidebar-container:not([style^='left: 0px; top: 0px; bottom: 0px;']) ~ .roam-main .roam-body-main > .roam-center > div:first-child {
12+
padding-right: calc((100% - 800px) / 2) !important;
13+
padding-left: calc((100% - 800px) / 2) !important;
14+
}
15+
16+
/* Prevents weird siderbar scroll */
17+
html {
18+
overflow: hidden;
19+
}
20+
21+
/* more sidebar fixes */
22+
23+
/* makes the shortcuts stick edge-to-edge,
24+
* with spacing on the left
25+
*/
26+
.starred-pages-wrapper {
27+
padding: 8px 0 !important;
28+
}
29+
30+
.roam-body .roam-app .roam-sidebar-container .roam-sidebar-content .starred-pages-wrapper .starred-pages .page,
31+
.starred-pages-wrapper > div.flex-h-box {
32+
padding-left: 20px;
33+
}

0 commit comments

Comments
 (0)