Re: [csswg-drafts] [css-forms] Allow making <button> a real inline

> Good point, and good idea. If that property is used to turn off the independent formatting context, it would also turn off the element acting like a replaced element?

Well, I didn't think much about the differences between a normal inline-block and a replaced one, I'm not an expert in this. I don't think the property should allow to convert arbitrary elements to replaced, just create an independent formatting context, but maybe handle this case specially for buttons. Then yes, setting it to the initial value in buttons could make them normal inlines.

> And the inner box would inherit that property?

I don't really see how the inner box helps explaining the behavior of buttons. It can be useful for some unrelated purposes, but then I prefer my `::contents` proposal (#2406).

> Are there many web pages that use both `appearance: none` and `display: inline` for buttons while relying on their "replaced-element-like" behavior?

I don't know but I have seen "CSS reset" stylesheets which use something like
```css
* { display: inline }
section, main, div /*...*/ { display: block }
```

It's possible that they forgot `button { display: inline-block }` and relied on this behavior anyways.


-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3226#issuecomment-433082695 using your GitHub account

Received on Thursday, 25 October 2018 14:52:58 UTC