Unprefix -moz-{min|max}-content CSS keyword #1992

Closed
opened 10 months ago by Moonchild · 2 comments
Owner

Sites are relying on the CSS keyword max-content that we have in a vendor-prefixed state.
We should investigate if there are differences between our implementation and the spec, but at the very least for a quick fix we should provide an alias (alias the prefixed version to a renamed unprefixed implementation)

Sites are relying on the CSS keyword `max-content` that we have in a vendor-prefixed state. We should investigate if there are differences between our implementation and the spec, but at the very least for a quick fix we should provide an alias (alias the prefixed version to a renamed unprefixed implementation)
Moonchild added the
Layout - CSS
Web Compatibility
labels 10 months ago

I did some investigation into this using the MDN max-content page for testing, comparing between the latest Basilisk and the latest Chromium.

I discovered that we don't have max-content prefixed for all CSS properties, it is only prefixed for certain CSS properties.

In the first example on the page max-content is applied to the weight property. It appears we do have max-content prefixed for the weight and height CSS properties.

On the second example on the page max-content is applied to the grid-template-columns property. This test correctly renders as we do not have max-content prefixed for the grid-template-columns property.

In Bugzilla bug 1322780 they unprefixed both max-content and min-content at the same time.

I did some investigation into this using the [MDN max-content page](https://developer.mozilla.org/en-US/docs/Web/CSS/max-content) for testing, comparing between the latest Basilisk and the latest Chromium. I discovered that we don't have `max-content` prefixed for all CSS properties, it is only prefixed for certain CSS properties. In the first example on the page `max-content` is applied to the `weight` property. It appears we do have `max-content` prefixed for the `weight` and `height` CSS properties. On the second example on the page `max-content` is applied to the `grid-template-columns` property. This test correctly renders as we do not have `max-content` prefixed for the `grid-template-columns` property. In Bugzilla bug [1322780](https://bugzilla.mozilla.org/show_bug.cgi?id=1322780) they unprefixed both `max-content` and `min-content` at the same time.
Moonchild self-assigned this 9 months ago
Moonchild changed title from Unprefix -moz-max-content to Unprefix -moz-{min|max}-content CSS keyword 9 months ago
Poster
Owner

Since this has been used un-prefixed for a while we can keep this simple and just change the use cases where the prefixed version is still used and not bother with aliasing it, since it's extremely unlikely sites would have only prefixed versions of the CSS keyword in use (as that would not be compatible with current mainstream browser versions).

I should be able to push this out on short notice to include in 31.3.0.

Of note, while extremely unlikely it'll be in use, it would be prudent to check application front-end code to see if -moz-min-content or -moz-max-content is actually in use for e.g. theming.

Since this has been used un-prefixed for a while we can keep this simple and just change the use cases where the prefixed version is still used and not bother with aliasing it, since it's _extremely_ unlikely sites would have only prefixed versions of the CSS keyword in use (as that would not be compatible with current mainstream browser versions). I should be able to push this out on short notice to include in 31.3.0. Of note, while extremely unlikely it'll be in use, it would be prudent to check application front-end code to see if -moz-min-content or -moz-max-content is actually in use for e.g. theming.
Moonchild added this to the 31.3.0 milestone 9 months ago
Moonchild closed this issue 9 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MoonchildProductions/UXP#1992
Loading…
There is no content yet.