Closed Bug 1841023 Opened 2 years ago Closed 2 years ago

Display registered property info for custom properties

Categories

(DevTools :: Inspector: Rules, task)

task

Tracking

(firefox124 fixed)

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: sebo, Assigned: nchevobbe)

References

(Depends on 1 open bug, Blocks 4 open bugs, Regressed 1 open bug)

Details

Attachments

(2 files)

As mentioned in bug 1841021, the CSS Properties and Values API gives custom properties semantic meaning by attaching additional information to them.
This information should be displayed within the Rules panel.

One way to do so is to extend the current tooltip showing the current value of the property by those pieces of information.
There might also be a link to the @property rule in the Style Editor when registered via CSS or to the registerProperty function call in the Debugger when registered via JS.

Sebastian

Looks like Chrome DevTools are implementing something that looks like this: https://front-end.social/@bramus/110932815004882288

Chrome DevTools

  1. Has a "@property" section, listing all registered CSS properties (via @property or CSS.registerProperty). CSS declared @property property name and values can be updated directly there (but not for the ones created via Css.registerProperty).
  2. Displays a tooltip when hovering a var(--xxx) value, with all registered @property rule properties (syntax, inherits and initial-value) + a link that highlights the matching property in the "@property" section.
Depends on: 1857518

I filed Bug 1857526 which reflects an issue in the current state. We might keep this bug only for adding the @property section in the rules panel

Making this depend on bug 1273706 as the bug 1684605 and bug 1821552 were closed as duplicate.

(In reply to Frédéric Wang (:fredw) from comment #4)

Making this depend on bug 1273706 as the bug 1684605 and bug 1821552 were closed as duplicate.

Actually removing, : css-properties-values-api blocks bug 1841021 and bug 1841021 is used as a meta for devtools-related bugs IIUC.

No longer depends on: css-properties-values-api
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Type: enhancement → task
Attachment #9363853 - Attachment description: WIP: Bug 1841023 - [devtools] Display @property rules. → WIP: Bug 1841023 - [devtools] Display @property rules. r=#devtools-reviewers.
Attachment #9363853 - Attachment description: WIP: Bug 1841023 - [devtools] Display @property rules. r=#devtools-reviewers. → Bug 1841023 - [devtools] Display registered properties in Rules view. r=#devtools-reviewers.
Blocks: 1867589
Blocks: 1867590
Depends on: 1870812
Depends on: 1870844
Attachment #9363853 - Attachment description: Bug 1841023 - [devtools] Display registered properties in Rules view. r=#devtools-reviewers. → WIP: Bug 1841023 - [devtools] Display registered properties in Rules view. r=#devtools-reviewers.
Attachment #9363853 - Attachment description: WIP: Bug 1841023 - [devtools] Display registered properties in Rules view. r=#devtools-reviewers. → Bug 1841023 - [devtools] Display registered properties in Rules view. r=#devtools-reviewers.
Blocks: 1875433
Blocks: 1875434
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bc2038afa9d4 [devtools] Display registered properties in Rules view. r=devtools-reviewers,devtools-backward-compat-reviewers,bomsy.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Regressions: 1878614
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: