Skip to content
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

CSS margin/border/padding compatibility #14

Closed
fred-wang opened this issue Feb 19, 2019 · 5 comments
Closed

CSS margin/border/padding compatibility #14

fred-wang opened this issue Feb 19, 2019 · 5 comments
Labels
css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification

Comments

@fred-wang
Copy link

fred-wang commented Feb 19, 2019

We need to clarify how CSS margin/border/padding is treated in MathML boxes.

AFAIK, Gecko supports margin/border/padding while WebKit just ignore these values.

Original report: https://gitlab.com/mathml/MathMLinHTML5/issues/9

@davidcarlisle davidcarlisle transferred this issue from w3c/mathml-core Feb 20, 2019
@davidcarlisle davidcarlisle added the MathML Core Issues affecting the MathML Core specification label Feb 20, 2019
@fred-wang fred-wang added css / html5 Issues related to CSS or HTML5 interoperability need tests Issues related to writing WPT tests labels Feb 22, 2019
@rwlbuis
Copy link

rwlbuis commented Mar 8, 2019

From my investigation (Firefox on Linux), only margin is taken into account for MathML.

@fred-wang fred-wang added the need resolution Issues needing resolution at MathML Refresh CG meeting label May 16, 2019
@fred-wang
Copy link
Author

cc @bfgeek

@fred-wang
Copy link
Author

I think we are now ready to handle this, so I'll put this on the agenda of the nxt MathML CG meeting.

Currently, the metrics of the margin/border/padding are defined the same as the content box:
https://mathml-refresh.github.io/mathml-core/#layout-algorithms

I personally think it makes sense to support margin/border/padding my proposal would be to just inflate the content box with the corresponding margin/border/padding in order to deduce the metrics for the margin/border/padding boxes. And define the child offsets within the border box to match the CSS layout API.

For MathML-specific metrics:

  • ink-over/ink-under baselines would be set to the border box's line-over and lin-under edge if there is such a border.
  • top accent attachment would be increased by the line-left values of margin/border/padding.
  • similarly for italic correction, it would be increased by the line-left margin/border/padding. Maybe when there is a line-right border, italic correction should just be zero?

fred-wang added a commit to w3c/mathml-core that referenced this issue Jul 10, 2019
@fred-wang fred-wang added need implementation update and removed need resolution Issues needing resolution at MathML Refresh CG meeting labels Jul 10, 2019
@fred-wang
Copy link
Author

Consensus from July 8 meeting:

  • We should take into account the margin/border/padding values as that's something users will likely expect and can be handy.
  • They will affect the content box in the way defined by CSS but not the spacing/bars defined by MathML for the content (e.g. "radical extra ascender" or "space after script" ) as that's easier to implement and describe.

I updated the MathML Core specification to explain how the metrics of the margin/border/padding boxes are deduced from the one of the content box.

fred-wang added a commit to web-platform-tests/wpt that referenced this issue Jul 24, 2019
These are very basic tests to check support for
w3c/mathml#14

Put in a dedicated folder since it's likely that we need a more lot tests.
fred-wang added a commit to web-platform-tests/wpt that referenced this issue Jul 24, 2019
These are very basic tests to check support for
w3c/mathml#14

Put in a dedicated folder since it's likely that we need a more lot tests.
@fred-wang
Copy link
Author

We have tests for these:
https://w3c-test.org/mathml/relations/css-styling/padding-border-margin/

They probably need to be refined and extended later but I think we can close this issue.

@fred-wang fred-wang removed the need tests Issues related to writing WPT tests label Jul 30, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Aug 5, 2019
… border-width, a=testonly

Automatic update from web-platform-tests
MathML: Add tests for padding / margin / border-width (#18046)

These are very basic tests to check support for
w3c/mathml#14

Put in a dedicated folder since it's likely that we need a more lot tests.
--

wpt-commits: b9480320a5775a8cbb28725246070273c20cdf83
wpt-pr: 18046
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Aug 5, 2019
… border-width, a=testonly

Automatic update from web-platform-tests
MathML: Add tests for padding / margin / border-width (#18046)

These are very basic tests to check support for
w3c/mathml#14

Put in a dedicated folder since it's likely that we need a more lot tests.
--

wpt-commits: b9480320a5775a8cbb28725246070273c20cdf83
wpt-pr: 18046
natechapin pushed a commit to natechapin/wpt that referenced this issue Aug 23, 2019
…ests#18046)

These are very basic tests to check support for
w3c/mathml#14

Put in a dedicated folder since it's likely that we need a more lot tests.
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
… border-width, a=testonly

Automatic update from web-platform-tests
MathML: Add tests for padding / margin / border-width (#18046)

These are very basic tests to check support for
w3c/mathml#14

Put in a dedicated folder since it's likely that we need a more lot tests.
--

wpt-commits: b9480320a5775a8cbb28725246070273c20cdf83
wpt-pr: 18046

UltraBlame original commit: a00d932c57dc1b8797bae222238046e9f96b9ee8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 4, 2019
… border-width, a=testonly

Automatic update from web-platform-tests
MathML: Add tests for padding / margin / border-width (#18046)

These are very basic tests to check support for
w3c/mathml#14

Put in a dedicated folder since it's likely that we need a more lot tests.
--

wpt-commits: b9480320a5775a8cbb28725246070273c20cdf83
wpt-pr: 18046

UltraBlame original commit: a00d932c57dc1b8797bae222238046e9f96b9ee8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
… border-width, a=testonly

Automatic update from web-platform-tests
MathML: Add tests for padding / margin / border-width (#18046)

These are very basic tests to check support for
w3c/mathml#14

Put in a dedicated folder since it's likely that we need a more lot tests.
--

wpt-commits: b9480320a5775a8cbb28725246070273c20cdf83
wpt-pr: 18046

UltraBlame original commit: a00d932c57dc1b8797bae222238046e9f96b9ee8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css / html5 Issues related to CSS or HTML5 interoperability MathML Core Issues affecting the MathML Core specification
Projects
None yet
Development

No branches or pull requests

3 participants