mirror of
https://github.com/hasanyilmaz/hide-sidebars.git
synced 2026-07-22 07:00:06 +00:00
79 lines
2 KiB
CSS
79 lines
2 KiB
CSS
/* Hide Sidebars Plugin v1.0.0 */
|
|
|
|
/*
|
|
Overlay Mode
|
|
position: absolute floats the sidebar over content.
|
|
pointer-events: none on container, auto on children for click-through.
|
|
*/
|
|
.hide-sidebars-overlay-left {
|
|
position: absolute;
|
|
left: var(--ribbon-width, 40px);
|
|
top: 0;
|
|
bottom: 0;
|
|
z-index: 10;
|
|
box-shadow: 2px 0 20px var(--background-modifier-box-shadow, rgba(0, 0, 0, 0.3));
|
|
height: 100%;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.hide-sidebars-overlay-left > * {
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.hide-sidebars-overlay-right {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
z-index: 10;
|
|
box-shadow: -2px 0 20px var(--background-modifier-box-shadow, rgba(0, 0, 0, 0.3));
|
|
height: 100%;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.hide-sidebars-overlay-right > * {
|
|
pointer-events: auto;
|
|
}
|
|
|
|
/* Content inside overlay sidebars above main content */
|
|
.hide-sidebars-overlay-left > *,
|
|
.hide-sidebars-overlay-right > * {
|
|
position: relative;
|
|
z-index: 50;
|
|
}
|
|
|
|
/* Ribbons always visible on top */
|
|
.hide-sidebars-autohide ~ .workspace-ribbon.mod-left,
|
|
.hide-sidebars-autohide ~ .workspace-ribbon.mod-right {
|
|
z-index: 60;
|
|
position: relative;
|
|
}
|
|
|
|
/*
|
|
macOS Frameless Window Fix
|
|
Themes add margin-top/padding-top to .workspace-tab-header-container
|
|
for traffic light clearance. In overlay mode (position: absolute),
|
|
this creates a dead zone where icons are visible but not clickable.
|
|
Reset theme spacing so visual position matches clickable area.
|
|
*/
|
|
body.is-hidden-frameless .workspace-split.mod-left-split.hide-sidebars-overlay-left .workspace-tabs .workspace-tab-header-container {
|
|
margin-top: 0;
|
|
padding-top: 0;
|
|
}
|
|
|
|
/* Hide native sidebar toggle buttons in overlay mode */
|
|
.hide-sidebars-overlay-left .sidebar-toggle-button.mod-left {
|
|
display: none;
|
|
}
|
|
|
|
.hide-sidebars-overlay-right .sidebar-toggle-button.mod-right {
|
|
display: none;
|
|
}
|
|
|
|
/* Virtual Collapse State for Overlay Mode */
|
|
.hide-sidebars-hidden {
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
pointer-events: none;
|
|
transition: opacity 0.3s ease, visibility 0.3s ease;
|
|
}
|