zotero/scss/components/_toolbarbutton.scss
Dan Stillman 35a70117b0 fx153: Restore the toolbarbutton dropmarker
Bug 1980856 removed both wantdropmarker support and the rule that gave
.toolbarbutton-menu-dropmarker its image, once Firefox's last consumer
stopped using it, so the New Item, Add Attachment, and New Note buttons
lost their chevrons, along with the ones in advanced search, the feed
settings dialog, and Scaffold.

Draw it with a background, since a <dropmarker> doesn't render
list-style-image, and use chevron-6 to match the quick search dropmarker
and the menu marker on our own buttons. The rule also moves out of the
toolbarbutton block, since a plain <button> can host one too.
2026-08-03 11:48:42 -04:00

85 lines
1.6 KiB
SCSS

toolbarbutton {
appearance: none;
flex-shrink: 0;
&:not(.titlebar-button) {
border-radius: 5px;
}
margin: 0;
color: var(--fill-secondary);
-moz-context-properties: fill, fill-opacity, stroke, stroke-opacity;
background-color: transparent;
&:hover {
background-color: var(--fill-quinary);
}
&:active, &[selected] {
background-color: var(--fill-quarternary);
}
@include focus-ring;
&:disabled,
&[disabled] {
background-color: transparent;
color: var(--fill-tertiary);
.toolbarbutton-menu-dropmarker {
color: var(--fill-tertiary);
}
}
&[open="true"] {
background-color: var(--fill-quarternary);
}
}
// Also hosted by plain <button>s, e.g., in the feed settings dialog
.toolbarbutton-menu-dropmarker {
-moz-default-appearance: none;
@include svgicon("chevron-6", "universal", "8");
color: var(--fill-secondary);
width: 8px;
height: 8px;
}
@keyframes rotating {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
toolbarbutton[status=animate] {
.toolbarbutton-icon {
color: var(--fill-secondary);
animation: rotating 2s linear infinite;
}
}
.zotero-tb-separator {
height: 36px;
border-right: var(--material-panedivider);
}
$toolbarbutton-icons: (
collection-add: "add-collection",
collections-search: "magnifier",
add: "add-item",
lookup: "magic-wand",
attachment-add: "add-file",
note-add: "note",
tabs-menu: "chevron",
sync-error: "error",
sync: "sync",
toggle-item-pane-stacked: "sidebar-bottom",
);
@each $cls, $icon in $toolbarbutton-icons {
#zotero-tb-#{$cls} {
@include svgicon-menu($icon, "universal", "20");
}
};