zotero/scss/components/_item-tree.scss
2024-01-24 03:39:09 -05:00

164 lines
2.9 KiB
SCSS

@use "sass:map";
#zotero-items-pane {
min-width: 290px;
min-height: 150px;
height: 150px;
width: 290px;
}
#zotero-items-tree {
.virtualized-table-header .icon {
width: 13px;
height: 13px;
}
.cell.primary {
.retracted {
width: 12px;
margin-inline-start: 3px;
}
.tag-swatch {
display: inline-block;
min-width: .728em;
min-height: .728em;
margin-inline-start: 3px;
border-radius: .15em;
}
}
.cell.hasAttachment {
box-sizing: content-box;
padding: 0 4px;
height: 100%;
// Don't show ellipsis
text-overflow: unset;
.icon-treeitemattachmentpdf {
min-width: 10px;
max-width: 10px;
margin: 3px;
}
.icon-link {
min-width: 14px;
max-width: 14px;
margin: 2px 1px;
}
.icon-missing-file {
opacity: 0.4;
}
}
.cell.numNotes {
text-align: center;
}
$itemTypesIcons: (
artwork,
attachment-epub,
attachment-file, // mapped to document below
attachment-link,
attachment-pdf-link,
attachment-pdf,
attachment-snapshot,
attachment-web-link,
audio-recording,
bill,
blog-post,
book-section,
book,
case,
computer-program,
conference-paper,
dataset,
dictionary-entry,
document,
email,
encyclopedia-article,
epub,
film,
forum-post,
hearing,
instant-message,
interview,
journal-article,
letter,
magazine-article,
manuscript,
map,
newspaper-article,
note,
patent,
podcast,
preprint,
presentation,
radio-broadcast,
report,
standard,
statute,
thesis,
tv-broadcast,
video-recording,
webpage
);
$itemTypesMap: (
"attachment-file": "document"
);
.icon-item-type {
width: 16px;
height: 16px;
}
.row {
@mixin item-type-icon($icon) {
&:not(:-moz-window-inactive) {
@include state('.row.selected') {
@include svgicon($icon, "white", "16", "item-type", true);
}
}
@include state('.row:not(.selected)') {
@media (prefers-color-scheme: light) {
@include svgicon($icon, "light", "16", "item-type", true);
}
@media (prefers-color-scheme: dark) {
@include svgicon($icon, "dark", "16", "item-type", true);
}
}
@include state('.row.selected') {
&:-moz-window-inactive {
@media (prefers-color-scheme: light) {
@include svgicon($icon, "light", "16", "item-type", true);
}
@media (prefers-color-scheme: dark) {
@include svgicon($icon, "dark", "16", "item-type", true);
}
}
}
}
@each $itemTypeIcon in $itemTypesIcons {
$itemType: camelCase(str-replace(str-replace($itemTypeIcon, "pdf", "PDF"), "epub", "EPUB"));
@if map.has-key($itemTypesMap, $itemTypeIcon) {
$itemTypeIcon: map.get($itemTypesMap, $itemTypeIcon);
}
.icon-item-type {
@include item-type-icon("document"); // default icon, for known item types more specific selectors below will apply
}
.icon-item-type[data-item-type=#{$itemType}] {
@include item-type-icon($itemTypeIcon);
}
}
}
}