Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The UA stylesheet has a 540px "small devices" media query breakpoint (remove?) #624

Closed
foolip opened this issue Feb 4, 2016 · 7 comments
Labels
removal/deprecation Removing or deprecating a feature topic: rendering

Comments

@foolip
Copy link
Member

foolip commented Feb 4, 2016

https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3 has this block:

/* for small devices, modal dialogs go full-screen */
@media screen and (max-width: 540px) {
  dialog:modal {
    top: 0;
    width: auto;
    margin: 1em;
  }
}

It seems odd for the spec to have a breakpoint for when this "full-screen" (not in the https://fullscreen.spec.whatwg.org sense) style should apply.

Blink's html.css does not include this rule.

@foolip foolip added the removal/deprecation Removing or deprecating a feature label Feb 4, 2016
foolip added a commit that referenced this issue Feb 4, 2016
@zcorpan
Copy link
Member

zcorpan commented Feb 5, 2016

@Hixie do you remember why this was added?

@domenic
Copy link
Member

domenic commented Feb 5, 2016

This seems intuitive to me... small devices don't have space to be messing around with small dialogs, and just want it to take over the whole screen.

@foolip
Copy link
Member Author

foolip commented Feb 5, 2016

Yes, but can this really be the only default style that's unsuitable for small screens? A breakpoint like this in the UA style sheet looks like an opportunity for surprise, to me at least.

@Hixie
Copy link
Member

Hixie commented Feb 5, 2016

The other defaults were locked in by legacy. It's the only default I've added since realising how import mobile support is, IIRC.

@foolip
Copy link
Member Author

foolip commented Feb 5, 2016

@tkent-google, when you moved the default style for <dialog> to html.css, do you recall if you deliberately skipped the @media screen and (max-width: 540px) bit under discussion here?

Perhaps I'm the only one who finds this odd? Say an author wants the breakpoint to be either 530px or 550px, it seems a bit tedious to cancel out the default style in this case, more so than for "plain" default style.

@tkent-google
Copy link
Contributor

@foolip I just moved the style, and probably I didn't check the UA style definition in the specification.

@zcorpan
Copy link
Member

zcorpan commented Mar 23, 2017

I think we should remove this, or alternatively make the default style good for small screens and use that style for everything. Having a breakpoint in the UA stylesheet is unexpected. In web-platform-tests/wpt#4605 / #2208 we forgot about this rule both for updating it in the spec and then writing tests in a small iframe assuming the style for "big" screens would apply.

zcorpan added a commit that referenced this issue Mar 23, 2017
Having a breakpoint in the user agent style sheet is unprecedented,
unexpected, and more work to maintain and test. It has also not
been implemented in Chromium.

Fixes #624.
domenic pushed a commit that referenced this issue Mar 24, 2017
Having a breakpoint in the user agent style sheet is unprecedented,
unexpected, and more work to maintain and test. It has also not
been implemented in Chromium.

Fixes #624.
alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
Having a breakpoint in the user agent style sheet is unprecedented,
unexpected, and more work to maintain and test. It has also not
been implemented in Chromium.

Fixes whatwg#624.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
removal/deprecation Removing or deprecating a feature topic: rendering
Development

No branches or pull requests

6 participants