tab-stash/styles/themes/icons.less

108 lines
2.2 KiB
Plaintext

.item-icon {
.icon-wrapper();
.icon-background-setup();
& > img,
& > span {
.icon();
}
}
.icon-wrapper {
display: inline-block;
box-sizing: border-box;
width: var(--icon-btn-size);
height: var(--icon-btn-size);
padding: var(--icon-p);
text-align: center;
vertical-align: middle;
border: none;
border-radius: var(--ctrl-border-radius);
}
.icon-background-setup {
background-size: var(--icon-size) var(--icon-size);
background-position: center;
background-repeat: no-repeat;
background-color: transparent;
}
.icon {
display: inline-block;
box-sizing: border-box;
width: var(--icon-size);
height: var(--icon-size);
object-fit: fill;
.icon-background-setup();
border: none;
}
// Function to define the set of icons used in each theme. Must be called from
// the theme-* files for themes which have their own icons.
.icon-vars(@theme, @inverse) {
.icon(@id) {
--icon-@{id}: url("icons/@{theme}/@{id}.svg");
--icon-@{id}-inverse: url("icons/@{inverse}/@{id}.svg");
}
& {
.icon(back);
.icon(cancel);
.icon(collapse-closed);
.icon(collapse-open);
.icon(delete-opened);
.icon(delete-stashed);
.icon(delete);
.icon(filtered-hidden);
.icon(filtered-visible);
.icon(folder);
.icon(item-menu);
.icon(logo);
.icon(mainmenu);
.icon(move-menu);
.icon(new-empty-group);
.icon(pop-in);
.icon(pop-out);
.icon(rename);
.icon(restore-del);
.icon(restore);
.icon(select);
.icon(select-selected);
.icon(stash-one);
.icon(stash);
.icon(stashed);
.icon(tab);
.icon(warning);
}
}
// Define CSS for particular icons.
.def-icon(@id) {
.icon-@{id} {
background-image: var(e("--icon-@{id}"));
}
}
// Vanilla icons (separate from actions, which are handled in action.less)
.def-icon(delete);
.def-icon(delete-stashed);
.def-icon(filtered-hidden);
.def-icon(filtered-visible);
.def-icon(folder);
.def-icon(item-menu);
.def-icon(logo);
.def-icon(move-menu-inverse);
.def-icon(new-empty-group);
.def-icon(pop-in);
.def-icon(pop-out);
.def-icon(restore-del);
.def-icon(restore);
.def-icon(select);
.def-icon(select-selected-inverse);
.def-icon(stash);
.def-icon(stash-one);
.def-icon(stashed);
.def-icon(tab);
.def-icon(warning);