Hi everyone,

We plan to soon land a change behind a pref [0] where we’ll stop
“blockifiying” elements with `display: -moz-box`. Before this change,
elements with `display: -moz-box` are forced to `display: block` when the
element:

  1. Is a child of a CSS grid or CSS flex container
  2. Has position absolute or fixed
  3. Is floated

This change will land behind a preference initially
(layout.css.xul-box-display-values.survive-blockification.enabled). There
are still some visual issues in the browser chrome with elements that rely
on the blockification behavior, and we plan to fix those by explicitly
setting `display: block`. Once we resolve these issues, we expect to remove
the pref and change the default behavior.

If you’re writing CSS that relies on the element being forced to `display:
block`, you’ll now need to explicitly set the display value in your CSS.
One thing to be careful with is the CSS specificity of the new display rule
that you’re adding, which might override an existing display rule.

The reason we’re making this change is to allow us to convert remaining XUL
grids to CSS grid layout [1], where the blockification of the grid items
breaks their appearance. We believe it will also make migration of other
XUL layouts to CSS easier. In particular, we think we can replace XUL deck
layout [2] and XUL stack layout [3] with a single area CSS grid layout. And
we think this will allow us to more incrementally replace XUL flexbox with
CSS flexbox (since migrating an element to the latter won’t break its
children).

Please reach out if you have questions or concerns about this change.

Cheers,
Tim

[0]: https://bugzilla.mozilla.org/show_bug.cgi?id=1580012
[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1520625
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1559192
[3]: https://bugzilla.mozilla.org/show_bug.cgi?id=1576946
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to