Normalize.css: Fieldset min-width property

Created on 24 Jun 2017  Â·  6Comments  Â·  Source: necolas/normalize.css

Fieldset has an intrinsic min-width value set to min-content. Basically if it is not limited to the width of the its parents, it horizontally expand to fit anything inside it.

Adding this will prevent this behavior:

fieldset {
  min-width: 0;
}

I think it would be useful and will prevent that odd behavior. Any thoughts?

Most helpful comment

@rellect According to that article, the Firefox fix is:

body:not(:-moz-handler-blocked) fieldset {
  display: table-cell;
}

I'm adding both fixes to my project Vitals right now.

All 6 comments

Do different browsers handle that differently? If not, then that's what we would call an opinionated rule.
The goal of this project is just to standardize between browsers – not so much to correct consistent bad defaults across all browsers.

I will confirm, so far it is the same across edge, Chrome and Firefox

This won't work in firefox.

Damn is this a recent change? Just noticed this, googled, and landed here. Is there a global fix for all modern browsers yet?

@rellect According to that article, the Firefox fix is:

body:not(:-moz-handler-blocked) fieldset {
  display: table-cell;
}

I'm adding both fixes to my project Vitals right now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

visicode picture visicode  Â·  5Comments

visicode picture visicode  Â·  7Comments

ntwb picture ntwb  Â·  3Comments

SteveALee picture SteveALee  Â·  7Comments

slim-hmidi picture slim-hmidi  Â·  3Comments