New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 704848 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocked on:
issue 706206



Sign in to add a comment

<dialog> should have display:block in UA stylesheet

Project Member Reported by zcorpan@gmail.com, Mar 24 2017

Issue description

Comment 1 by tkent@chromium.org, Mar 24 2017

Components: -Blink>HTML>Details Blink>HTML>Dialog
Labels: Hotlist-GoodFirstBug
Status: Available (was: Untriaged)
I will have a look at this. Direct link to the failing test: http://w3c-test.org/html/rendering/non-replaced-elements/flow-content-0/dialog-display.html
I believe that the test under http://w3c-test.org/html/rendering/non-replaced-elements/flow-content-0/dialog.html should be updated, as there is an assertion for display: none 

> assert_equals: display expected "none" but got "block"

Should I add the expected failures in dialog-expected.txt or file an issue at https://github.com/w3c/web-platform-tests/issues and wait until the test is updated?

Comment 4 by zcorpan@gmail.com, Mar 28 2017

That is per spec:

dialog:not([open]) { display: none; }

https://html.spec.whatwg.org/#flow-content-3

It is currently display: none in Chromium when the open attribute is absent. Changing that to display: block would be a regression.
Okay, I believe that the issue was the css-specificity. When I add display:block to dialog directly, it always overrides the dialog:not([open]) rule. It would be possible using the two rules below, but it doesn't seem particularly pretty. Just running it by you, as I want to make sure this is the way to go.

dialog:not([open]) { display: none; }
dialog:[open] { display: block; }

Comment 6 by r...@opera.com, Mar 28 2017

"dialog { display: block }" should suffice.

That results in :

external/wpt/html/rendering/non-replaced-elements/flow-content-0/dialog.html

This is a testharness.js-based test.
FAIL Closed dialog in width: 540px iframe assert_equals: display expected "none" but got "block"
PASS Open dialog in width: 540px iframe 
PASS Modal dialog in width: 540px iframe 
FAIL Closed dialog in width: 538px iframe assert_equals: display expected "none" but got "block"
PASS Open dialog in width: 538px iframe 
PASS Modal dialog in width: 538px iframe 
Harness: the test ran to completion.

The "Closed dialog" computed attribute for "display":
http://i.imgur.com/zv4HPx0.png


Comment 8 by r...@opera.com, Mar 29 2017

Blockedon: 706206

Comment 9 by r...@opera.com, Mar 29 2017

There's a specificity bug causing this. You can move the dialog:not([open]) rule below the dialog rule, or wait for the fix for the blocker to land.

Comment 12 by tkent@chromium.org, Mar 30 2017

Labels: M-59
Status: Fixed (was: Available)
I made a chromestatus entry for this just in case.
https://www.chromestatus.com/feature/5754335753404416

Sign in to add a comment