-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define how margin-collapsing should behave #42
Comments
My preference here would be to drop any margin collapsing rules in implementations, and instead force completely new formatting contexts on each element. This needs a lot of tests (with various combinations of elements, positive/negative margins, various levels of nesting) to ensure compatibility. |
The core spec does not mention any margin collapsing rules currently (although maybe they are implicit in mtable and mtext layout). I'm not sure that would be useful for math. |
Another test case to compare against CSS, so people can understand: We have:
Should MathML behave like:
As I said, margin collapsing probably does not make any sense for math layout. However, if we don't really care about it and if that facilitates the implementations to follow block's behavior maybe we actually want that. Adding this to the mathml core meeting agenda. |
The I don't see the case for Note: if |
Regarding new displays, there is a separate discussion #56 ; currently the actual display value is browser-specific. If the user specifies other values, the idea in #56 would be to fallback to CSS rather than MathML layout. For the Anyway, for this issue the only thing to discuss is whether margin-collapsing make any sense for math-specific layout or not. |
I'd err on the side of leaving margin collapsing out. As it has a lot of weird side affects for the new algorithms/display-types, and is very difficult to get right. E.g. do margins for these new types collapse through if they are empty? If you define for these new types that they establish new formatting contexts or their particular type, and their children also establish new formatting context or their particular type, you only need to define how margins interact within that display type. |
Consensus during mathml core meeting: Ignore margin-collapsing for all new layout as they are no clear use case and that simplifies implementation. |
…, a=testonly Automatic update from web-platform-tests MathML: Add tests for margin-collapsing. (#18170) See w3c/mathml#42 -- wpt-commits: bf7e393610c462cd671feb88952330db442f8499 wpt-pr: 18170
…, a=testonly Automatic update from web-platform-tests MathML: Add tests for margin-collapsing. (#18170) See w3c/mathml#42 -- wpt-commits: bf7e393610c462cd671feb88952330db442f8499 wpt-pr: 18170
There is one test for margin-collapsing: https://w3c-test.org/mathml/relations/css-styling/padding-border-margin/margin-002.html ; maybe we can add more. |
…, a=testonly Automatic update from web-platform-tests MathML: Add tests for margin-collapsing. (#18170) See w3c/mathml#42 -- wpt-commits: bf7e393610c462cd671feb88952330db442f8499 wpt-pr: 18170 UltraBlame original commit: 1686e99069d46703832f9e3d57effcc1ce2871f4
…, a=testonly Automatic update from web-platform-tests MathML: Add tests for margin-collapsing. (#18170) See w3c/mathml#42 -- wpt-commits: bf7e393610c462cd671feb88952330db442f8499 wpt-pr: 18170 UltraBlame original commit: 1686e99069d46703832f9e3d57effcc1ce2871f4
…, a=testonly Automatic update from web-platform-tests MathML: Add tests for margin-collapsing. (#18170) See w3c/mathml#42 -- wpt-commits: bf7e393610c462cd671feb88952330db442f8499 wpt-pr: 18170 UltraBlame original commit: 1686e99069d46703832f9e3d57effcc1ce2871f4
Since you only are testing that nothing should happen, so one test is fine. |
Today the current implementations work differently when it comes to margin collapsing.
A simple case is:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=6687
In the above example Firefox appears the formatting context behaves like a block formatting context in that it abides by block-like margin collapsing rules.
I'm not sure what Safari is doing. E.g. another example:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=6688
The text was updated successfully, but these errors were encountered: