It must be close. Maybe some element tags changed. It actually does make a subtle difference.
When I don’t have the snippet, the ribbon background fades between matching the color of my sidebar vs. the background of my notes, when toggling.
When I activate this snippet, that no longer occurs. But something is fading in and out, and you can make it more apparent by increasing the 0.2s easing to 1.0 or something.
If I change both instances of the “nth-child” lines to n+1, like this:
&:hover > :nth-child(n + 2) {
to
&:hover > :nth-child(n + 1) {
Then the fading out works, and the ribbon disappears. And if you hover over it, it eases back in.
The width of the ribbon doesn’t change. I tried putting in a width: 0px; in a couple different places, but it’s quite glitchy, and not quite right yet. But if you want to keep the hover-return, maybe you don’t want the width animating.
The Expand/collapse sidebar button moves under the system’s Maximize button with this, even though both buttons remain functional with this. The issue is purely cosmetic:
A possible workaround is to hide the left sidebar button completely and rely on hotkeys to expand/collapse it. But that’d be a very roundabout way to achieve what you can already do with the “Toggle ribbon” command–which is what I think I’ll do. Cmd + R is vacant anyway…
The gorgeous Border Theme has a ribbon auto-hide option in its Style Settings. Maybe someone would be willing to dig around in its code and extract the code needed for that feature, and make it compatible with other themes…
may be a bit the late but I did dig around the border theme’s code and made this snippet where you can activate the ribbon auto-hide in style settings.
I’m not really good at css and don’t participate in these forums but I was also looking for this a while back and decided to try and find a solution myself, sorry if the need for style settings is a hassle this was the best I could do. hope it helps you.
The Minimal theme, too, offers an option to auto-hide the ribbon via Style Settings. Though it’s independent of whether the sidebar is collapsed or not.