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-fonts] Add font-size: math, math-depth and math-style #5536

Closed
wants to merge 2 commits into from

Conversation

fred-wang
Copy link

@fred-wang fred-wang commented Sep 22, 2020

This imports the proposal from MathML Core to manage font scaling in math
formulas using a new 'math-depth' property. This mechanism involves a new
'math-style' property that describes compactness of formulas as well as
a new 'math' keyword to specify relative font-size change using the a
scale factor calculated from the 'math-depth' changes.

#5389
#5387
#5389 (comment)
#5387 (comment)

This imports the proposal from MathML Core to manage font scaling in math
formulas using a new 'math-level' property. This mechanism involves a new
'math-style' property that describes compactness of formulas as well as
a new 'math' keyword to specify relative font-size change using the a
scale factor calculated from the 'math-level' changes.

w3c#5389
w3c#5387
@fred-wang
Copy link
Author

fred-wang commented Sep 22, 2020

This probably needs improvements, feedback welcome ;-)

Current test/implementation status is:

Tests: css/css-fonts/math-script-level-and-math-style/ as well as indirect effect on MathML in mathml/

Chrome:
math-style implemented, https://chromium-review.googlesource.com/c/chromium/src/+/2421110
math-level and font-size implemented, https://chromium-review.googlesource.com/c/chromium/src/+/2423843

Firefox:
internal -moz-math-display exposed https://bugzilla.mozilla.org/show_bug.cgi?id=1665975
internal -moz-math-level being exposed and modified, font-size: math not implemented yet, https://bugzilla.mozilla.org/show_bug.cgi?id=1667090

Safari:
math-style implemented, https://bugs.webkit.org/show_bug.cgi?id=216702
math-level not implemented yet, font-size: math not implemented yet

@fred-wang fred-wang changed the title [css-fonts] Add font-size: math, math-level and math-style [css-fonts] Add font-size: math, math-depth and math-style Sep 22, 2020
@fantasai
Copy link
Collaborator

Hi @fred-wang ! I think we could use a bit of discussion about where exactly all this goes, but I do suspect it fits better into the MathML Core spec rather than the css-fonts-4 spec. The core processing of this all is fitted to the MathML layout model, and not particularly relevant generally to CSS, is why I'm thinking this.

(Note: for the display and font-size keywords, if you're using Bikeshed it's possible to use class="propdef partial" to indicate adding to, rather than redefining, the property; I'm not sure what the equivalent syntax would be in ReSpec.)

@@ -838,7 +838,7 @@ Font size: the 'font-size' property</h3>

<pre class="propdef">
Name: font-size
Value: <<absolute-size>> | <<relative-size>> | <<length-percentage>>
Value: <<absolute-size>> | <<relative-size>> | <<length-percentage>> | math
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is a mistake, it must be reverted

@fred-wang
Copy link
Author

Closing this per #5536 (comment)

  • math-depth and math-style are in MathML Core.
  • font-size: math was added in 09efeb0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants