diff --git a/extension-manifest-v3/src/pages/panel/components/alert.js b/extension-manifest-v3/src/pages/panel/components/alert.js index 043713722..e709711d2 100644 --- a/extension-manifest-v3/src/pages/panel/components/alert.js +++ b/extension-manifest-v3/src/pages/panel/components/alert.js @@ -72,7 +72,7 @@ export default { layout[slide]="absolute inset bottom:auto" > - + ${!!autoclose && @@ -86,8 +86,6 @@ export default { border: 1px solid var(--ui-color-gray-200); box-shadow: 1px 2px 7px rgba(0, 0, 0, 0.15); border-radius: 30px; - --ui-text-color-heading: currentColor; - --ui-text-color-anchor: currentColor; } :host([type="success"]) { diff --git a/extension-manifest-v3/src/pages/panel/components/button.js b/extension-manifest-v3/src/pages/panel/components/button.js index 7e212804c..ec6e4c5dd 100644 --- a/extension-manifest-v3/src/pages/panel/components/button.js +++ b/extension-manifest-v3/src/pages/panel/components/button.js @@ -31,7 +31,7 @@ export default { transition: 0.2s all; } - @media (hover: hover) and (pointer: fine) { + @media (hover: hover) { ui-text:hover { background: var(--ui-color-primary-700); } diff --git a/extension-manifest-v3/src/pages/panel/components/copy.js b/extension-manifest-v3/src/pages/panel/components/copy.js index 3607bceb6..d0749e1e9 100644 --- a/extension-manifest-v3/src/pages/panel/components/copy.js +++ b/extension-manifest-v3/src/pages/panel/components/copy.js @@ -37,7 +37,6 @@ export default { @media (hover: hover) { button:hover ui-text, button:hover ui-icon { - --ui-text-color: var(--ui-color-primary-700); color: var(--ui-color-primary-700); } } diff --git a/extension-manifest-v3/src/pages/panel/components/dialog.js b/extension-manifest-v3/src/pages/panel/components/dialog.js index 1e9451f3b..5fea36de9 100644 --- a/extension-manifest-v3/src/pages/panel/components/dialog.js +++ b/extension-manifest-v3/src/pages/panel/components/dialog.js @@ -78,7 +78,7 @@ export default { #dialog { border: none; border-radius: 12px 12px 0 0; - background: var(--ui-color-white); + background: var(--ui-color-layout); overscroll-behavior: contain; transform: translateY(100%); transition: transform 500ms cubic-bezier(0.4, 0.15, 0, 1); @@ -87,7 +87,7 @@ export default { #backdrop { background: var(--ui-color-backdrop); opacity: 0; - transition: all 500ms ease-out; + transition: all 300ms; } :host([open]) #dialog { @@ -95,7 +95,7 @@ export default { } :host([open]) #backdrop { - opacity: 0.7; + opacity: 0.9; } #header { diff --git a/extension-manifest-v3/src/pages/panel/components/menu-item.js b/extension-manifest-v3/src/pages/panel/components/menu-item.js index 3b17c6f24..4aecaa20d 100644 --- a/extension-manifest-v3/src/pages/panel/components/menu-item.js +++ b/extension-manifest-v3/src/pages/panel/components/menu-item.js @@ -25,7 +25,6 @@ export default { :host { text-decoration: none; color: var(--ui-color-gray-800); - --ui-text-color-heading: currentColor; } ui-icon { @@ -38,8 +37,8 @@ export default { overflow: hidden; } - @media (hover: hover) and (pointer: fine) { - :host(:hover) { + @media (hover: hover) { + :host(:hover) ui-text { color: var(--ui-color-primary-700); } diff --git a/extension-manifest-v3/src/pages/panel/components/notification.js b/extension-manifest-v3/src/pages/panel/components/notification.js index 084d43f13..164065e3f 100644 --- a/extension-manifest-v3/src/pages/panel/components/notification.js +++ b/extension-manifest-v3/src/pages/panel/components/notification.js @@ -31,7 +31,9 @@ export default { `}
- + + + @@ -45,10 +47,6 @@ export default { --ui-panel-notification-color: var(--ui-color-primary-700); } - #action { - color: var(--ui-panel-notification-color); - } - :host([type="warning"]) { --ui-panel-notification-bg: var(--ui-color-danger-100); --ui-panel-notification-color: var(--ui-color-danger-700); @@ -57,40 +55,28 @@ export default { a { background: var(--ui-panel-notification-bg); border-radius: 12px; - color: inherit; text-decoration: none; + color: inherit; + } + + #action { + color: var(--ui-panel-notification-color); } #icon { - background: var(--ui-color-white); + background: var(--ui-color-layout); box-shadow: 0px 2px 6px rgba(32, 44, 68, 0.08); border-radius: 8px; } - #icon ui-icon { + ui-icon { color: var(--ui-panel-notification-color); } - #close > * { - color: var(--ui-color-gray-600); - background: var(--ui-color-white); - border-radius: 12px; - } - - @media (hover: hover) and (pointer: fine) { - a:hover:not(:has(#close:hover)) { - background: var(--ui-panel-notification-bg); - --ui-text-color: var(--ui-panel-notification-color); - } - - a:hover:not(:has(#close:hover)) #action { + @media (hover: hover) { + a:hover ui-text { text-decoration: underline; } - - #close:hover > * { - color: var(--ui-color-white); - background: var(--ui-panel-notification-color); - } } `, }; diff --git a/extension-manifest-v3/src/pages/panel/components/options-item.js b/extension-manifest-v3/src/pages/panel/components/options-item.js index 03beb71dc..583763064 100644 --- a/extension-manifest-v3/src/pages/panel/components/options-item.js +++ b/extension-manifest-v3/src/pages/panel/components/options-item.js @@ -18,7 +18,7 @@ export default { render: ({ icon, enabled, terms }) => html` `.css` :host { - background: var(--ui-color-white); + background: var(--ui-color-layout); box-shadow: var(--ui-shadow-header); } `, diff --git a/packages/ui/src/modules/panel/components/list.js b/packages/ui/src/modules/panel/components/list.js index 64fa20f5b..7910903ff 100644 --- a/packages/ui/src/modules/panel/components/list.js +++ b/packages/ui/src/modules/panel/components/list.js @@ -73,15 +73,12 @@ export default { } #arrow { + transform: rotate(180deg); transition: transform 0.1s; } :host([closed]) #arrow { - transform: rotate(180deg); - } - - #content ::slotted(*) { - --ui-text-color-anchor: var(--ui-color-gray-800); + transform: rotate(0deg); } :host([closed]) #content { diff --git a/packages/ui/src/modules/panel/components/protection-status-toggle.js b/packages/ui/src/modules/panel/components/protection-status-toggle.js index 809c26f71..3b9587ad0 100644 --- a/packages/ui/src/modules/panel/components/protection-status-toggle.js +++ b/packages/ui/src/modules/panel/components/protection-status-toggle.js @@ -13,8 +13,10 @@ import { dispatch, html } from 'hybrids'; function updateValue(value) { return (host) => { - host.value = value; - dispatch(host, 'change', { detail: value }); + if (host.value !== value) { + host.value = value; + dispatch(host, 'change', { detail: value }); + } }; } @@ -34,7 +36,7 @@ export default { onclick="${updateValue(true)}" > - Blocked + Blocked @@ -43,7 +45,7 @@ export default { onclick="${updateValue(false)}" > - Trusted + Trusted @@ -53,7 +55,6 @@ export default { width: auto; height: 28px; color: var(--ui-color-gray-600); - --ui-text-color-heading: currentColor; } ui-panel-action[active] { diff --git a/packages/ui/src/modules/panel/dark.css b/packages/ui/src/modules/panel/dark.css index d32d0a27f..8589a2ce6 100644 --- a/packages/ui/src/modules/panel/dark.css +++ b/packages/ui/src/modules/panel/dark.css @@ -1,18 +1,19 @@ @media (prefers-color-scheme: dark) { html { - --ui-color-gray-100: #0e1218; - --ui-color-gray-200: #2b3444; - --ui-color-gray-300: #57616e; - --ui-color-gray-400: #7f8aa3; - --ui-color-gray-600: #b2b9cf; - --ui-color-gray-800: #eceff5; - --ui-color-white: #181d27; + --ui-color-layout: #1f2125; + + --ui-color-gray-100: #13151a; + --ui-color-gray-200: #2f3136; + --ui-color-gray-300: #636468; + --ui-color-gray-400: #88898c; + --ui-color-gray-600: #b9bbbe; + --ui-color-gray-800: #f2f4f7; --ui-color-primary-100: #0a1e31; - --ui-color-primary-200: #1a4065; - --ui-color-primary-300: #144878; - --ui-color-primary-500: #4fa9e4; - --ui-color-primary-700: #7dc7f8; + --ui-color-primary-200: #00365c; + --ui-color-primary-300: #004f88; + --ui-color-primary-500: #00aef0; + --ui-color-primary-700: #33c7ff; --ui-color-success-100: #056605; --ui-color-success-500: #1b911b; diff --git a/packages/ui/src/modules/panel/styles.css b/packages/ui/src/modules/panel/styles.css index 0a74286bc..a02cd81ab 100644 --- a/packages/ui/src/modules/panel/styles.css +++ b/packages/ui/src/modules/panel/styles.css @@ -15,13 +15,14 @@ } html { + --ui-color-layout: white; + --ui-color-gray-800: #202c44; --ui-color-gray-600: #49556e; --ui-color-gray-400: #9ba3b4; --ui-color-gray-300: #c3cad9; --ui-color-gray-200: #dfe3eb; --ui-color-gray-100: #f0f2f7; - --ui-color-white: white; --ui-color-primary-700: #0077cc; --ui-color-primary-500: #00aef0; @@ -43,7 +44,7 @@ html { --ui-color-danger-500: #f13436; --ui-color-danger-100: #ffecec; - --ui-color-backdrop: var(--ui-color-gray-800); + --ui-color-backdrop: var(--ui-color-gray-600); --ui-color-warning-text: var(--ui-color-gray-800); --ui-color-scroll-shadow: rgba(0, 0, 0, 0.1); @@ -71,10 +72,6 @@ html { --ui-font-button-m: var(--ui-font-label-m); --ui-font-button-s: 600 14px / 24px var(--ui-font-family); - - /* UI components overwrites */ - --ui-text-color-heading: var(--ui-color-gray-800); - --ui-text-color-anchor: var(--ui-color-primary-700); } html, @@ -91,7 +88,7 @@ body { font-size: 13px; -moz-osx-font-smoothing: grayscale; width: 100%; - background: var(--ui-color-white); + background: var(--ui-color-layout); max-height: 100dvh; }