Open Bug 1602648 Opened 5 years ago Updated 9 months ago

Visualize the vertical lines of media queries in the viewport when on the inspector

Categories

(DevTools :: Inspector, enhancement, P2)

enhancement

Tracking

(Not tracked)

People

(Reporter: karlcow, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We can currently visualize

  • Flexbox
  • Grid

This is wonderful and very useful. It would be cool to be able in the inspector to visualize the vertical lines of the media queries (just on request).

  1. The inspector would know there are media-queries in the CSS.
  2. The inspector could draw vertical lines (once an option/button is selected), the same way we show grids.

Issues:

  • Clutter with a lot of different styles of visualizations

Rationale:

It might be useful for designers to be able to see

  • when/where the full page is behaving when reaching one of these lines by resizing
  • visualize the position of the line moving when the media query is edited in the CSS
  • helps to understand that the rules active in the inspector pertain to a certain media query

It could be useful for webcompat to be able to discover

  • a breaking layout when a box is bigger than the intended mediaquery and pushes everything around.

(Not a priority)

Hey Martin, we have a media-query visualization bug in our roadmap already, don't we? If so, do you think this is the same as this one?
In any case, I wanted to make sure you had this on your radar.

Flags: needinfo?(mbalfanz)

The problem that this bug is trying to solve is the same, but the approach is a bit different. Other bugs like bug 1031585 were more looking into a Chrome-like solution where media queries are displayed in a way to quickly resize the viewport.

I think both are interesting and should be explored more. And yes, feedback about this is recurring so we have it on the roadmap (bug 1491881).

Flags: needinfo?(mbalfanz)
See Also: → 1031585, 1491881

For reference, I attached a screenshot of Chrome's existing approach to visualizing media queries:

  • gray bars = preset dimensions (phone / tablet / laptop, etc)
  • color bars = media queries picked-up from the applied stylesheets

A video about how to enable media query visualization in Chrome:
https://www.youtube.com/watch?v=dPU5xGty0tE

Priority: -- → P2
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: