From 6ac80edad7cc4a26226d42da68701bdff0e5539f Mon Sep 17 00:00:00 2001 From: reizumi Date: Thu, 18 Sep 2025 02:21:21 +0800 Subject: [PATCH] style: Improve Zen Folders icon, p=#10410 --- src/zen/folders/ZenFolder.mjs | 74 ++++++++++++++++++--------------- src/zen/folders/zen-folders.css | 22 +++------- 2 files changed, 46 insertions(+), 50 deletions(-) diff --git a/src/zen/folders/ZenFolder.mjs b/src/zen/folders/ZenFolder.mjs index ac556143e..39839f222 100644 --- a/src/zen/folders/ZenFolder.mjs +++ b/src/zen/folders/ZenFolder.mjs @@ -21,50 +21,56 @@ static rawIcon = new DOMParser().parseFromString( ` - + - - - + + + - - - + + + - - - - + + + + + - - - + + + + - - - - + + + + + - - - + + + + - - - - - - + + + + + + + - - - - - - - + + + + + + + + `, 'image/svg+xml' diff --git a/src/zen/folders/zen-folders.css b/src/zen/folders/zen-folders.css index b046b9dc8..0a95b500d 100644 --- a/src/zen/folders/zen-folders.css +++ b/src/zen/folders/zen-folders.css @@ -185,7 +185,7 @@ zen-folder { visibility: visible; --zen-folder-behind-bgcolor: light-dark( - color-mix(in srgb, var(--zen-primary-color) 85%, white), + color-mix(in srgb, var(--zen-primary-color) 60%, gray), color-mix(in srgb, var(--zen-primary-color) 60%, #c1c1c1) ); --zen-folder-front-bgcolor: light-dark( @@ -193,8 +193,8 @@ zen-folder { color-mix(in srgb, var(--zen-primary-color), black 40%) ); --zen-folder-stroke: light-dark( - color-mix(in srgb, var(--zen-primary-color) 60%, black), - color-mix(in srgb, var(--zen-colors-primary) 20%, var(--toolbox-textcolor)) + color-mix(in srgb, var(--zen-primary-color) 50%, black), + color-mix(in srgb, var(--zen-colors-primary) 15%, var(--toolbox-textcolor)) ); -moz-window-dragging: no-drag; @@ -265,7 +265,7 @@ zen-folder { } .tab-group-folder-icon { - width: 30px; + width: 28px; height: 28px; align-content: center; pointer-events: none; @@ -273,29 +273,19 @@ zen-folder { pointer-events: none; :root[zen-sidebar-expanded] & { - left: 4px; + left: 5px; } & svg { filter: contrast(125%); - transition: 0.2s scale; - transform-origin: right bottom; - - :root:not([zen-sidebar-expanded]) & { - transform-origin: center bottom; - } & image { fill-opacity: 0.9; -moz-context-properties: fill, fill-opacity; fill: var(--zen-folder-stroke); - transform: translate(-182%, 2.4px); + transform: translate(4px, 6.5px); } } - - & svg[state='open'] { - scale: 0.92; - } } &::before {