Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Grid values are -moz- prefixed in Firefox 56-58, maybe others #6128

Open
meyerweb opened this issue Oct 8, 2017 · 8 comments
Open

Grid values are -moz- prefixed in Firefox 56-58, maybe others #6128

meyerweb opened this issue Oct 8, 2017 · 8 comments

Comments

@meyerweb
Copy link

meyerweb commented Oct 8, 2017

Prefixfree turns min-content, max-content, and probably fit-content into their -moz- versions, which FF56-58 (possibly earlier) do not recognize as valid.

@LeaVerou
Copy link
Owner

LeaVerou commented Oct 8, 2017

Hi Eric,

At first I was surprised, because (as you know) -prefix-free doesn't keep a list of what to prefix, it does feature testing on the current browser, so how could this happen?

However, in my testing it appears that Firefox still needs the -moz- prefix, so what -prefix-free is doing is is correct.

MDN also agrees: https://developer.mozilla.org/en-US/docs/Web/CSS/width
And caniuse: http://caniuse.com/#feat=intrinsic-width

If you disagree, please provide more information (perhaps a testcase?).

@meyerweb
Copy link
Author

meyerweb commented Oct 8, 2017

I have this screenshot from the inspector; the warning icons’ tooltips read “Invalid property value”.
screen shot 2017-10-08 at 11 31 47

Once I remove Prefixfree from the page, the grid unprefixed values are recognized by FF as valid and the grid works as expected. If needed, I could probably work up a simple pair of tests tomorrow.

@LeaVerou
Copy link
Owner

LeaVerou commented Oct 9, 2017

Yes, a pair of tests would be very useful, thank you!

@meyerweb
Copy link
Author

meyerweb commented Oct 9, 2017

Here’s a pair of simple grids without Prefixfree loaded: http://meyerweb.com/eric/css/tests/bugs/prefixfree-off.html
Here’s the same grids and styles with Prefixfree loaded: http://meyerweb.com/eric/css/tests/bugs/prefixfree-on.html

The CSS will appear to be different between the two unless you view source. There are, as noted in the “off” test page, no actual prefixes in the document source, even though they’re displayed in Firefox. (Which I find fascinating.)

@LeaVerou
Copy link
Owner

LeaVerou commented Oct 9, 2017

This is insane. Turns out Firefox not only doesn't require, but doesn't even accept prefixes on min-content etc for the grid properties, but requires them for width!!!

image

That's a first!

@meyerweb
Copy link
Author

meyerweb commented Oct 9, 2017

Wowzers.

@mike-okon
Copy link

mike-okon commented Mar 19, 2018

Is it just me , but Im experiencing the opposite error. Adding no prefixes to the code Firefox is adding them in itself and then reading them as errored lines and thus not displaying correctly. (Chrome shows grid layout as intended)
min-content_code
-moz-min-content_code

Am using Developer Edition 60.0b4 (64 bit)

This is driving me insane as I keep having to scroll and check and remove every -moz by hand each time I need to check layout

@LeaVerou
Copy link
Owner

-prefix-free tests if a prefix is needed for min-content and the like by testing them on width. Is there any chance that Firefox needs a prefix there but not in Grid? That would be my top guess.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants