Last active
October 4, 2024 21:29
-
-
Save raisabelatrix/857efd2395fdf48378aeaed4b1182603 to your computer and use it in GitHub Desktop.
Keeps the sidebar ribbon out of sight and only shows it upon hover. [Not tested on Obsidian 1.0+]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*HIDE RIBBON WHEN SIDEBAR IS COLLAPSED*/ | |
.side-dock-ribbon.mod-left.is-collapsed .side-dock-ribbon-action { | |
opacity: 0; | |
transition: opacity .3s; | |
} | |
.side-dock-ribbon.mod-left.is-collapsed:hover .side-dock-actions:hover .side-dock-ribbon-action, | |
.side-dock-ribbon.mod-left.is-collapsed:hover .side-dock-settings:hover .side-dock-ribbon-action { | |
opacity: 1; | |
} | |
/*HIDE RIBBON WHEN SIDEBAR IS EXPANDED*/ | |
.side-dock-ribbon.mod-left:not(.is-collapsed) .side-dock-ribbon-action, | |
.side-dock-ribbon.mod-left:not(.is-collapsed) .workspace-ribbon-collapse-btn svg { | |
opacity: 0; | |
} | |
.side-dock-ribbon.mod-left.is-collapsed .workspace-ribbon-collapse-btn:not(hover) + .side-dock-actions:hover .side-dock-ribbon-action, | |
.side-dock-ribbon.mod-left:hover:not(.is-collapsed) .side-dock-ribbon-action, | |
.side-dock-ribbon.mod-left:hover:not(.is-collapsed) .workspace-ribbon-collapse-btn svg { | |
opacity: 1; | |
} | |
.side-dock-ribbon.mod-left:not(.is-collapsed) { | |
flex: 0 0 5px; | |
transition: flex .2s; | |
} | |
.side-dock-ribbon.mod-left:hover:not(.is-collapsed) { | |
flex: 0 0 40px; | |
} |
@mawnir aaah I haven’t updated this snippet in a long time. I also never tested it on Mac. Just Windows 10
Just an FIY on version 1.6.7 on Windows :
The "Files" icon is hides behind the "Collapse" icon when the mouse hovers over it. The ribbon appears as intended but cannot access files anymore.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
only one problem "Files icon" is behind fullscreen button: