WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
Bug 167111
<summary> does not respect display: flex
https://bugs.webkit.org/show_bug.cgi?id=167111
Summary
<summary> does not respect display: flex
Richard Wang
Reported
2017-01-16 22:31:05 PST
Created
attachment 299020
[details]
Screenshot of the issue Applying display: flex; to a <summary> element doesn't render the children as flex items. Instead they appear to render as if the <summary> element was display: block, the current default at time of writing. HTML for reproduction: <!DOCTYPE html> <html> <head> <title><summary> flex demo</title> <style> details { background: #eee; } summary { background: #dee; } h3 { background: #ede; } .foo { background: #eed; } </style> </head> <body> <h2>No flex styles</h2> <details> <summary> <h3>Hello</h3> <div class="foo">There</div> </summary> <div>Woah!</div> </details> <h2><summary> as display: block;</h2> <details> <summary style="display: block;"> <h3>Hello</h3> <div class="foo">There</div> </summary> <div>Woah!</div> </details> <h2><summary> as display: flex;</h2> <details> <summary style="display: flex;"> <h3 style="flex: 1 1 auto;">Hello</h3> <div class="foo" style="flex: 0 0 auto;">There</div> </summary> <div>Woah!</div> </details> <h2><div> inside <summary> as display: flex;</h2> <details> <summary> <div style="display: flex;"> <h3 style="flex: 1 1 auto;">Hello</h3> <div class="foo" style="flex: 0 0 auto;">There</div> </div> </summary> <div>Woah!</div> </details> </body> </html>
Attachments
Screenshot of the issue
(130.49 KB, image/png)
2017-01-16 22:31 PST
,
Richard Wang
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Michał Gołębiowski-Owczarek
Comment 1
2017-10-31 03:06:01 PDT
I confirm the issue. Note that Chrome respects `display: flex` on <summary>.
Lea Verou
Comment 2
2018-06-12 12:01:17 PDT
Another testcase:
http://dabblet.com/gist/e4042d6b12973f1e4583bf32c4bc7e14
It doesn't look like display: flex is ignored, it certainly has an effect, just not the intended one...
Philip Jägenstedt
Comment 3
2021-07-22 09:12:23 PDT
I believe these two Safari-only failures in WPT are due to this bug:
https://wpt.fyi/results/html/rendering/the-details-element/summary-display-flex.html?run_id=5669940343341056&run_id=5095377872093184&run_id=5759629192593408&run_id=5699667892371456
https://wpt.fyi/results/html/rendering/the-details-element/summary-display-inline-flex.html?run_id=5669940343341056&run_id=5095377872093184&run_id=5759629192593408&run_id=5699667892371456
There are also tests for grid in the same directory.
Ahmad Saleem
Comment 4
2023-05-20 03:44:33 PDT
I tried similar to Blink:
https://chromium.googlesource.com/chromium/src.git/+/b711bbea21e196179a525c1588004ca4f60d025d
______ RenderPtr<RenderElement> HTMLSummaryElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&) { // <summary> elements with display:list-item should not be rendered as list items because they'd end up with two markers before the text (one from summary element and the other as a list item). DisplayType display = style.display(); if (display == DisplayType::Flex || display == DisplayType::Grid || display == DisplayType::InlineFlex || display == DisplayType::InlineGrid) return RenderElement::createFor(*this, WTFMove(style)); return RenderElement::createFor(*this, WTFMove(style), { RenderElement::ConstructBlockLevelRendererFor::ListItem, RenderElement::ConstructBlockLevelRendererFor::Inline, RenderElement::ConstructBlockLevelRendererFor::TableOrTablePart }); } _____ Although above didn't work. It compiles but no progression. @Aditya, @Ryosuke - any tip or help?
Ahmad Saleem
Comment 5
2023-06-04 06:30:54 PDT
Safari Technology Preview 170 seems to pass these tests now:
https://wpt.fyi/results/html/rendering/the-details-element/summary-display-flex.html?label=master&label=experimental&aligned&q=the-details-element
&
https://wpt.fyi/results/html/rendering/the-details-element/summary-display-inline-flex.html?label=master&label=experimental&aligned&q=the-details-element
Do we need to track anything further?
Ahmad Saleem
Comment 6
2023-06-15 13:55:55 PDT
Still passing WPT with STP172. So marking as 'RESOLVED CONFIGURATION CHANGED', please reopen if it is still not fixed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug