payload
payload copied to clipboard
Fix: Tooltip 'error state' styling (Broken by #5632)
Description
#5632 results in 'error state' tooltips being grey as html[data-theme='light'] .tooltip
has higher specificity than .field-error.tooltip
.
Removing html[data-theme='light'] { .tooltip { ...} }
entirely results in both informational and error status tooltips working appropriately again:
It is difficult to tell what the motive of the original author was in adding this code since it was commited as part of the large:
feat: add database transaction support #2983
One guess might be that the styling for .field-error.tooltip
is a singular rule found in src/admin/components/forms/Error/index.scss, rather than src/admin/components/elements/Tooltip/index.scss
The code added to html[data-theme='light'] { .tooltip { ...} }
either duplicated the styling found there or intended to provide a more muted pink for the light theme error state, but in the process also accidentally overode the normal tooltip aesthetic.
I've considered whether incorporating that more muted pink styling was necessary; but, it's somewhat less obvious than the original styling, plus the muted red styling is a noticeable departure from that used, by, for example, the red toastify message that appears concurrently.
Likewise, the light grey styling for normal tooltips added last week by #5632 is very pale for a tooltip when compared to the previous, bolder styling.
Yes, I have read and understand the CONTRIBUTING.md document in this repository.
Type of change
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- [ ] Existing test suite passes locally with my changes