zotero/scss/elements/_collapsibleSection.scss
windingwind 6af4605bd0 Implement attachment preview
- Implement attachment preview
- Implement attachment-box redesign
- Make filename editable
- Use new reindex icon
- Update attachment note layout
- Fix reader.js eslint errors
- Add fallback attachment icon and use redesign
- Use attachment preview for regular items
- Fix pinned pane not exists error
- Double click preview to open to page
- Fix itemPane pin bug
- Preload preview iframe
- Fix item pane scroll
- Add media preview support
- Fix item pane scroll bar on macos
- Fix reader sidebar with standalone attachment
- Fix attributeChangedCallback
- Add attachmentBox _updateAttachmentIDs
- Make attachment notes readonly and simplify note window script
- Implement convert attachment note to new note
- Support preview dragging
- Annotations box redesign
- Support custom buttons in the collapsible-section
- Add preview toggle button
- Fix collapsible section attribute listener
- Make attachment box notify sync to fix errors in test
2024-01-24 23:32:15 -05:00

105 lines
2 KiB
SCSS

collapsible-section {
display: flex;
flex-direction: column;
gap: 2px;
padding-block: 4px;
:not(:last-child) > & {
border-bottom: 1px solid var(--fill-quinary);
}
& > .head {
@include comfortable {
padding-block: 2px;
}
display: flex;
align-items: center;
.title {
flex: 1;
display: flex;
align-items: center;
gap: 4px;
color: var(--fill-secondary);
font-weight: 590;
}
toolbarbutton {
flex-shrink: 0;
width: 20px;
height: 20px;
padding: 2px;
color: var(--fill-secondary);
border-radius: 2px;
}
toolbarbutton.add {
@include svgicon-menu("plus", "universal", "16");
&:hover {
background: var(--fill-quinary);
}
&:active {
background: var(--fill-quarternary);
}
}
toolbarbutton.twisty .toolbarbutton-icon {
@include svgicon-menu("chevron-12", "universal", "16");
transform: rotate(0deg);
transform-origin: center;
transition: transform 0.2s ease-in-out;
}
popupset > menupopup {
@include macOS-hide-menu-icons;
}
}
&[open]:not([empty]) > .head {
toolbarbutton.twisty .toolbarbutton-icon {
transform: rotate(-180deg);
}
}
&[empty] > .head > toolbarbutton.twisty {
fill: var(--fill-tertiary);
}
@each $pane, $color in $item-pane-sections {
&[data-pane="#{$pane}"] {
& > .head > .title::before {
content: '';
width: 16px;
height: 16px;
background: icon-url("itempane/16/#{$pane}.svg") no-repeat center;
-moz-context-properties: fill, fill-opacity, stroke, stroke-opacity;
fill: $color;
stroke: $color;
}
}
}
& > :not(.head) {
max-height: var(--open-height, auto);
opacity: 1;
transition: max-height 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
&:not([open]) {
& > :not(.head) {
max-height: 0;
opacity: 0;
visibility: hidden;
overflow-y: hidden;
transition: max-height 0.2s ease-in-out, opacity 0.2s ease-in-out, visibility 0s 0.2s, overflow-y 0s 0.2s;
}
}
&.disable-transitions * {
transition: none !important;
}
}