-
Notifications
You must be signed in to change notification settings - Fork 14
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
Negative spacing #132
Comments
Negative horizontal values can be tricky around linebreaks as they may not be intended if not paired with their neighbors. Other than that, what problems do you see with negative values? My memory from my MathPlayer implementation days is that negative values do occur for some of those values and are reasonable. It would be good to enumerate in this issue the problems that happen if a value is negative rather than just force them to be zero. Forcing them to zero is probably not right for at least some of these values. For example, "-" has a negative depth ("b") and it is likely wrong to make the element taller by forcing the depth to be 0. |
I agree negative spacing is needed. The basic implementation of |
I hope that there is a solution that we can simply adopt. Maybe SVG has already a method for negative spaces. |
Might be related to w3c/mathml#14 |
With the current writing of the spec, the lspace/rspace are no longer part of the content box of the embellished op but are added in mrow so negative spacing is easier to describe. Maybe we should have the same lspace/rspace box properties for mspace or mpadded and generalize to any box. |
@fred-wang could you clarify what specification change you had in mind when adding the label? |
@davidcarlisle Sorry, I don't remember exactly. But anyway I checked last week how to export the following == reftest from Gecko: https://searchfox.org/mozilla-central/rev/2a867dd1ab015c3ef24b774a57709fb3b3dc4961/layout/reftests/mathml/operator-1.xhtml I checked that:
Current spec allows negative spacing via lspace/rspace. However, as I mentioned in #132 (comment) css boxes can't have negative width so we would still need to do some clamping because something like My recommendation would be to choose the safest option as a first step: either clamp during layout or reject negative values and make sure implementations are consistent. Additionally, I'm only mentioning negative lspace/rspace on the mo element here but we need similar considerations for mspace and mpadded (I believe currently spec and implementation just clamp or prevent negative spacing in order to be safe). Finally note that |
operator-1.xhtml verifies negative values mo@lspace/rspace but support and interpretation in MathML Core is unclear at this point [1] so keep it as internal for now. This also introduces a new `negative-lengths` subdirectory for handling similar tests. [1] w3c/mathml-core#132 Differential Revision: https://phabricator.services.mozilla.com/D200430
operator-1.xhtml verifies negative values mo@lspace/rspace but support and interpretation in MathML Core is unclear at this point [1] so keep it as internal for now. This also introduces a new `negative-lengths` subdirectory for handling similar tests. [1] w3c/mathml-core#132 Differential Revision: https://phabricator.services.mozilla.com/D200430
operator-1.xhtml verifies negative values molspace/rspace but support and interpretation in MathML Core is unclear at this point [1] so keep it as internal for now. This also introduces a new `negative-lengths` subdirectory for handling similar tests. [1] w3c/mathml-core#132 Differential Revision: https://phabricator.services.mozilla.com/D200430 UltraBlame original commit: 919bd2893087e81f586cfc58c6d67a9629739551
operator-1.xhtml verifies negative values molspace/rspace but support and interpretation in MathML Core is unclear at this point [1] so keep it as internal for now. This also introduces a new `negative-lengths` subdirectory for handling similar tests. [1] w3c/mathml-core#132 Differential Revision: https://phabricator.services.mozilla.com/D200430 UltraBlame original commit: 919bd2893087e81f586cfc58c6d67a9629739551
operator-1.xhtml verifies negative values molspace/rspace but support and interpretation in MathML Core is unclear at this point [1] so keep it as internal for now. This also introduces a new `negative-lengths` subdirectory for handling similar tests. [1] w3c/mathml-core#132 Differential Revision: https://phabricator.services.mozilla.com/D200430 UltraBlame original commit: 919bd2893087e81f586cfc58c6d67a9629739551
original report: https://gitlab.com/mathml/MathMLinHTML5/issues/31
The text was updated successfully, but these errors were encountered: