Closed Bug 1626234 Opened 5 years ago Closed 3 months ago

Display the computed value of custom properties on hover, where they are defined

Categories

(DevTools :: Inspector: Rules, enhancement, P3)

enhancement

Tracking

(firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: pbro, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Keywords: parity-chrome)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36

Steps to reproduce:

  • Go to data:text/html,<style>body {--foo: 40%;--bar: hsl(50, 70%, var(--foo));} div {color: var(--bar);}</style><div>Hello World
  • Open the inspector
  • Select the <body> element

Actual results:

  • In the Rules panel, the --bar custom property is defined, but there is no way right there to know what it computes to.
  • You have to find an element where this property applies, and then open the Computed view to see it.

Expected results:

See https://twitter.com/jpzwarte/status/1244670644089958400

It would be nice if, as you hover over the --bar property name, you could have a tooltip that shows you what the computed value is, without having to look for places where it is used.

This is also a Chrome gap, as DevTools in Chrome has this

Keywords: parity-chrome
See Also: → 1594402

Note: I tested quickly the patches from Bug 1594402, with the test case here, and no color swatch is showing up. This is because output-parser.js' _parseVariable is not recursive and doesn't support nested variables.

This is a great idea. It's more of a feature request about pointing to resolved values of Custom Properties.

Status: UNCONFIRMED → NEW
Type: defect → enhancement
Ever confirmed: true
Priority: -- → P3
Severity: normal → S3

Note that we now show custom properties in the computed panel, but people are still interested in having the computed value directly in the tooltip

Blocks: 1223058
Duplicate of this bug: 1836396
Assignee: nobody → nchevobbe
Attachment #9417448 - Attachment description: WIP: Bug 1626234 - [devtools] Display the computed value of custom property in var() tooltip. → Bug 1626234 - [devtools] Display the computed value of custom property in var() tooltip. r=#devtools-reviewers.
Status: NEW → ASSIGNED
Blocks: 1630950
Blocks: 1911524
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/12f9b7ee50d2 [devtools] Display the computed value of custom property in var() tooltip. r=devtools-reviewers,bomsy.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/35657b4631ea [devtools] Display the computed value of custom property in var() tooltip. r=devtools-reviewers,bomsy.
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Duplicate of this bug: 1446579
Blocks: 1912285
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: