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

Default style for option #1688

Open
zcorpan opened this issue Aug 18, 2016 · 0 comments
Open

Default style for option #1688

zcorpan opened this issue Aug 18, 2016 · 0 comments

Comments

@zcorpan
Copy link
Member

zcorpan commented Aug 18, 2016

From rocallahan/innerText-spec#5 (comment)

It appears that option (outside a select) is display:block by default in Gecko and Chromium. In IE it is inline. In WebKit it is not rendered (seemingly like display:none but no such declaration per devtools).

Gecko has lots of styles apart from display:block
https://dxr.mozilla.org/mozilla-central/source/layout/style/res/forms.css#341

Chromium
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/html.css?l=773

WebKit
https://github.com/WebKit/webkit/blob/e75143bef79009cec709c2208cfde886435d75a5/Source/WebCore/css/html.css#L920

IE/Edge
Like display:inline?

The spec
https://html.spec.whatwg.org/multipage/rendering.html#the-select-element-2
https://html.spec.whatwg.org/multipage/rendering.html#form-controls

I think we should at least have display:block in the spec (at least if option generates line breaks in innerText, so that is at least consistent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant