mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
feat: Scale down the folder icon when expanding, b=no-bug, c=folders
This commit is contained in:
@@ -815,7 +815,6 @@
|
||||
updateFolderIcon(group, state = 'auto', play = true) {
|
||||
const svg = group.querySelector('svg');
|
||||
if (!svg) return [];
|
||||
|
||||
let animations = this.#folderAnimCache.get(group);
|
||||
if (!animations) {
|
||||
animations = svg.querySelectorAll('animate, animateTransform, animateMotion');
|
||||
@@ -823,6 +822,7 @@
|
||||
}
|
||||
|
||||
const isCollapsed = group.collapsed;
|
||||
svg.setAttribute('state', state === 'auto' ? (isCollapsed ? 'close' : 'open') : state);
|
||||
const hasActive = group.hasAttribute('has-active');
|
||||
|
||||
const OPACITY = {
|
||||
|
@@ -260,6 +260,8 @@ zen-folder {
|
||||
|
||||
& svg {
|
||||
filter: contrast(150%);
|
||||
transition: 0.2s scale;
|
||||
transform-origin: right bottom;
|
||||
|
||||
& image {
|
||||
fill-opacity: 0.9;
|
||||
@@ -268,6 +270,10 @@ zen-folder {
|
||||
transform: translate(-180%, 8%);
|
||||
}
|
||||
}
|
||||
|
||||
& svg[state='open'] {
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
|
Reference in New Issue
Block a user