Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Why doesn't FireFox support the fit-content value for height in CSS?

  • 5 replies
  • 1 has this problem
  • 27 views
  • Last reply by cor-el

more options

I have tried to use the fit-content value and it won't work in FireFox for height but works in Chrome. I've even used -moz-fit-content. I understand that it is said to be experimental.

I have tried to use the fit-content value and it won't work in FireFox for height but works in Chrome. I've even used -moz-fit-content. I understand that it is said to be experimental.

All Replies (5)

more options

Did you check layout.css.grid.enabled on the about:config page to see if it is true?

See:

If you use a Firefox version from the repositories then that version may behave differently.

more options

It is set to true but I am not trying to use that function. What I am looking to do is this: .element {

     height: fit-content;

} This method works on Chrome very nicely but FireFox does not seem to support it. I've also tried -moz-fit-content. This value for height is mentioned at https://developer.mozilla.org/en-US/docs/Web/CSS/height The article shows no support for it on height but it seems there is support for width.

Modified by lildew2

more options

Modified by cor-el

more options

Interesting. This solution - .element {

    height: -moz-fit-content;

} - is not working for me. Am I doing something wrong? I have tried it on two machines and neither work in FireFox but work in Chrome.

more options

It looks that this still needs to be implemented for height.

  • bug 567039 - support min-content, max-content, fit-content, and fill for height/min-height/max-height too

Please do not comment in bug reports
https://bugzilla.mozilla.org/page.cgi?id=etiquette.html