html - Firefox flex bug applied to buttons? -
i'm trying apply flex
button on firefox i'm having problem on chrome doesn't happens.
this css:
.button { display: inline-flex; align-items: center; }
as can see in fiddle, "caret" word moved new line, happens if element <button>
tag, <div>
works expected.
http://codepen.io/anon/pen/xblmgx
is firefox bug or there css i'm missing?
nevermind, looks "mr firefox" doesn't idea...
<button>
not implementable (by browsers) in pure css, bit of black box, perspective of css. means don't react in same way e.g.<div>
would.this isn't specific flexbox -- e.g. don't render scrollbars if put "overflow:scroll" on button, , don't render table if put "display:table" on it.
stepping further, isn't specific
<button>
. consider<fieldset>
,<table>
have special rendering behavior:
data:text/html,<fieldset style="display:flex"><div>abc</div><div>def</div>
data:text/html,<table style="display:flex"><div>abc</div><div>def</div>
in these cases, chrome agrees , disregards "flex" display mode. (as revealed fact "abc" , "def" end being stacked vertically). fact happen you're expecting on due implementation detail.
in gecko's button implementation, hardcode
<button>
(and<fieldset>
, ,<table>
) having specific frame class (and hence, specific way of laying out child elements), regardless of "display" property.if want reliably have children reliably arranged in particular layout mode in cross-browser fashion, best bet use wrapper-div inside button, need inside of
<table>
or<fieldset>
.
Comments
Post a Comment