Why doesn't FireFox support the fit-content value for height in CSS?
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.
Tất cả các câu trả lời (5)
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.
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.
Được chỉnh sửa bởi lildew2 vào
This would suggest that height supports the prefixed -moz-fit-content value.
Some test code:
Được chỉnh sửa bởi cor-el vào
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.
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