Closed Bug 1520257 Opened 6 years ago Closed 6 years ago

Create --theme variables for icon colors and replace improper uses of other vars

Categories

(DevTools :: Framework, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1521340

People

(Reporter: fvsch, Unassigned)

Details

For button icons, we have roughly 3 possible colors all over DevTools:

  • Normal color (Light theme: should be Photon Grey 90 at 80% opacity)
  • Disabled state (same as normal color, at 50% opacity; not sure if that means Photon Grey at 50% or at 40% opacity, but 40% seems more likely); often implemented as opacity: 0.5 on the button itself
  • "Enabled" or "Pressed" state (ideally aria-pressed="true", but often it's a checked or active class): we are using some shades of blue for that.

If we limit our scope to the base color and the "active" color, we could have 2 variables defined in devtools/client/themes/variables.css, e.g.:

--theme-icon-color: ...;
--theme-icon-checked-color: ...;

Currently, we are either hardcoding values in different stylesheets, using the text color (fill: currentColor which is a decent but not ideal solution), or abusing more or less related variables:

  • --theme-toolbar-icon-color (could perhaps be renamed to --theme-icon-color)
  • --theme-toolbar-checked-color (could perhaps be renamed to --theme-icon-checked-color, but we need to check if it's used for other things)
  • --theme-highlight-blue
  • --object-color (in console/reps)
  • --theme-textbox-box-shadow (in Debugger Editor and SourceIcon components)
  • --toolbarbutton-focus-color

In particular, it would be nice to fix the uses of --theme-textbox-box-shadow in Debugger because if we change or refactor that code in bug 1502098 and related bugs we may end up regressing Debugger styles.

Summary: Create --theme variables for icon colors and replace abusive uses of other vars → Create --theme variables for icon colors and replace improper uses of other vars

:ntim:

--toolbarbutton-focus-{color/background} -> could just be replaced by the value it's being set to
Related: bug 1519791

Have I reported the same issue twice, 5 days apart?
Well yes I have.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.