zotero/scss/components/_splitter.scss
Dan Stillman 9415543cbf Move the library view into a <library-view> element (#6035)
Move the #zotero-pane subtree, with the collection and item trees, tag
selector, item pane, quick and Advanced Search, and their keyboard
navigation, into a <library-view> element so that a window can hold
more than one. ZoteroPane forwards its existing view properties and
methods to the window's active library view. Banners stay at the
window level, outside of the library view. No behavior change.

Elements in the subtree get a class matching their id, and CSS rules
select either (e.g., :is(#zotero-items-toolbar, .zotero-items-toolbar))
so that they also apply to additional views. Keeping the id in each
selector preserves the rule's specificity, even when matching only on
class.
2026-11-06 20:58:05 -05:00

91 lines
1.8 KiB
SCSS

@mixin splitter-invisible-size($side) {
border-#{$side}: 0;
border-#{another-side($side)}: var(--material-border-quarternary);
margin-#{$side}: calc(1px - var(--draggable-size));
margin-#{another-side($side)}: -1px;
&[state="collapsed"] {
border-#{$side}: var(--material-border-quarternary);
border-#{another-side($side)}: 0;
margin-#{$side}: 0;
margin-#{another-side($side)}: 0;
}
}
splitter {
appearance: none;
z-index: 1;
position: relative;
background: transparent;
border: none;
--draggable-size: 5px;
@include compact {
--draggable-size: 5px;
&[state="collapsed"] {
--draggable-size: 8px;
}
}
@include comfortable {
--draggable-size: 8px;
&[state="collapsed"] {
--draggable-size: 10px;
}
}
&[orient=vertical] {
min-height: var(--draggable-size);
&[collapse="before"],
&[substate="before"] {
@include splitter-invisible-size(bottom);
}
&[collapse="after"],
&[substate="after"] {
@include splitter-invisible-size(top);
}
}
&:not([orient=vertical]) {
min-width: var(--draggable-size);
&[collapse="before"],
&[substate="before"],
&[collapse="after"]:-moz-locale-dir(rtl),
&[substate="after"]:-moz-locale-dir(rtl) {
@include splitter-invisible-size(right);
}
&[collapse="after"],
&[substate="after"],
&[collapse="before"]:-moz-locale-dir(rtl),
&[substate="before"]:-moz-locale-dir(rtl) {
@include splitter-invisible-size(left);
}
}
}
:is(#zotero-items-splitter, .zotero-items-splitter),
#zotero-context-splitter,
#zotero-context-splitter-stacked {
&[orient=vertical] {
&[state="collapsed"] {
margin-bottom: -1px;
--draggable-size: 1px;
border: 0;
}
}
&:not([orient=vertical]) {
@include splitter-invisible-size(right);
&[state="collapsed"] {
margin-right: -1px;
--draggable-size: 1px;
border: 0;
}
}
}