Bug 1920711 - [devtools] Fix markup mutation flash in High Contrast Mode. r=devtools-reviewers,ochameau.

Variables used for the background and text colors now have specific values in HCM.
We take this as an opportunity to add the force-color-on-flash class on closing tags,
as it was missing, which is pretty noticable in HCM.

Differential Revision: https://phabricator.services.mozilla.com/D226908
This commit is contained in:
Nicolas Chevobbe 2024-10-29 14:37:57 +00:00
parent 63fbead6f4
commit de945f1f93
2 changed files with 6 additions and 1 deletions

View File

@ -235,7 +235,7 @@ ElementEditor.prototype = {
this.elt.appendChild(close);
this.closeTag = this.doc.createElement("span");
this.closeTag.classList.add("tag");
this.closeTag.classList.add("tag", "force-color-on-flash");
this.closeTag.textContent = this.node.displayName;
close.appendChild(this.closeTag);

View File

@ -320,5 +320,10 @@
/* Menu/Autocomplete items */
--theme-popup-hover-background: SelectedItem;
--theme-popup-hover-color: SelectedItemText;
/* Flashing colors used to highlight updates */
--theme-contrast-background: Mark;
--theme-contrast-background-alpha: var(--theme-contrast-background);
--theme-contrast-color: MarkText;
}
}