mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
refactor(next): remove use of :has for performance reasons
This commit is contained in:
parent
2fac2a8c5e
commit
24340d3a8e
@ -71,13 +71,13 @@ body.background-effects.platform-win32.layout-vertical #vertical-main-container
|
||||
/* #endregion */
|
||||
|
||||
/* Matches when the left pane is collapsed */
|
||||
#horizontal-main-container:has(#left-pane.hidden-int) {
|
||||
#horizontal-main-container.left-pane-hidden {
|
||||
--center-pane-border-radius: 0;
|
||||
--tab-first-item-horiz-offset: 5px;
|
||||
}
|
||||
|
||||
/* Add a border to the vertical launch bar if collapsed. */
|
||||
body.layout-vertical #horizontal-main-container:has(#left-pane.hidden-int) #launcher-pane.vertical {
|
||||
body.layout-vertical #horizontal-main-container.left-pane-hidden #launcher-pane.vertical {
|
||||
border-right: 2px solid var(--left-pane-collapsed-border-color);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ export default class LeftPaneContainer extends FlexContainer<Component> {
|
||||
this.currentLeftPaneVisible = leftPaneVisible ?? !this.currentLeftPaneVisible;
|
||||
const visible = this.isEnabled();
|
||||
this.toggleInt(visible);
|
||||
this.parent?.$widget.toggleClass("left-pane-hidden", !visible);
|
||||
|
||||
if (visible) {
|
||||
this.triggerEvent("focusTree", {});
|
||||
|
Loading…
x
Reference in New Issue
Block a user