fix: improve contrast on nav item and primary button hover states (#12993)
* fix: improve contrast on nav item and primary button hover states Non-active sidebar navigation items and primary-variation buttons (filled and outline appearances) rendered black text/icons on top of a dark brown hover background in the vault theme, producing insufficient contrast. Both now use the text-inverse color for their hover state instead of the primary-contrast token, which resolves correctly across all themes. OCISDEV-1451 * docs: add changelog for nav/primary button hover contrast fix * docs: link changelog entry to PR #12993
This commit is contained in:
1 parent
cb7fc967a9
commit
09717f094f
3 files changed
+25
-2
No files matched your search
@@ -0,0 +1,12 @@
|
||||
Bugfix: fixed low color contrast on nav and primary button hover states
|
||||
|
||||
Non-active sidebar navigation items, as well as buttons using the
|
||||
"primary" styling, showed their text and icons in black on top of a
|
||||
dark hover background in some themes, making them hard to read while
|
||||
hovering.
|
||||
|
||||
The hover state for these elements now switches to a light color
|
||||
instead of always using black, restoring readable contrast between
|
||||
the text and the background while hovering.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/12993
|
||||
@@ -394,6 +394,17 @@ const handlers = computed(() => {
|
||||
fill: var(--oc-color-swatch-primary-contrast) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&-filled:hover:not([disabled]),
|
||||
&-filled:focus:not([disabled]),
|
||||
&-outline:hover:not([disabled]),
|
||||
&-outline:focus:not([disabled]) {
|
||||
color: var(--oc-color-text-inverse) !important;
|
||||
|
||||
span > svg {
|
||||
fill: var(--oc-color-text-inverse) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-success {
|
||||
|
||||
@@ -119,10 +119,10 @@ export default defineComponent({
|
||||
|
||||
&:hover:not(.active) {
|
||||
background-color: var(--oc-color-swatch-primary-hover) !important;
|
||||
color: var(--oc-color-swatch-primary-contrast) !important;
|
||||
color: var(--oc-color-text-inverse) !important;
|
||||
|
||||
.oc-icon > svg {
|
||||
fill: var(--oc-color-swatch-primary-contrast);
|
||||
fill: var(--oc-color-text-inverse);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user