Open Bug 1800085 Opened 2 years ago Updated 3 months ago

[META] Experiment with a "computation explainer" tooltip in the rule view

Categories

(DevTools :: Inspector: Rules, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: nchevobbe, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: meta)

It might be useful for users to know the computation that happens when using relative units in property values. Here's a few example

  • % size would indicate the parent size that is used
  • em size would indicate the font-size of the parent element
  • rem size would indicate the font-size of the root
  • vmin/vmax would show the viewport inline and block size and indicate which one was picked
  • container queries relative units would indicate the query container and its size (see Bug 1799657)

This could go into the "Layout" panel, but might be more discoverable directly in the rule view, next to the unit.

We could show the computation for a given size, even if it's not the final computed size used in the element (e.g. in margin: calc(50vw - 10%) , we could have explainer for both the 50vw and 10%)

It could also play well if we ever do something similar to show computation result of calc

I came across this post about % and what it refers to in different contexts: https://wattenberger.com/blog/css-percents
Having those information directly in the rule view would be really nice for users

Summary: [META] Experiment with a "size computation explainer" tooltip in the rule view → [META] Experiment with a "computation explainer" tooltip in the rule view
You need to log in before you can comment on or make changes to this bug.