-
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
New properties for CSS math-variant, script-level and math-style #31
Comments
Just for the record, some feedback from the CSS WG was:
(cc' @rego @rwbuis) |
After yesterday's meeting I think we are close to be able to move this to the CSS WG. Proposal is to modify https://github.com/mathml-refresh/mathml-css-proposals/blob/master/math-script-level-and-math-style-explainer.md#css-math-script-level-property as follows:
#76 is not resolved. |
As @NSoiffer we should probably not spend too much time on the CSS details. I've modified the CSS proposals after the previous discussion/feedback and I've moved the proposals to csswg-drafts: w3c/csswg-drafts#3745 Let's see what the CSS WG people say. |
We implemented script-level as math-script-level as described here: It turns out that exact timing of when to handle is hard when done in C++, by the time we can handle math-script-level the computed font size is pretty much determined already and hard to change anymore. Because of this for now we opted for a user agent stylesheet solution. |
To get fractions right we add such a rule (verbose because universal selector is not allowed in UA): |
To get roots right we add such a rule (verbose because universal selector is not allowed in UA): |
To get script-level right for script elements, we specify all possible combinations with children (using :nth-child(n+2) to select them) and apply to them: |
math-style probably works but needs more testing, since focus was on math-script-level. |
For the mfrac rules, what does
Easy to do in code, but maybe not with CSS because you can't condition the selector on a CSS value, right? |
Right, the auto behavior has to be done in code, actual commit is here to give you an idea: |
Resolution:
Specification:
Implementation:
Polyfill:
Tests:
|
Removing "need tests" since they are at: |
It seems "internal" properties are supported in WebKit: https://lists.webkit.org/pipermail/webkit-dev/2019-September/030770.html and that's the case in Gecko and Blink too. So we probably don't need to push too much for this at the CSSWG and just implement things internally for the sake of native MathML support. If later users ask for it, it would be easy to expose them for implementers and we would have concrete use cases we can show to the CSSWG. Incidentally, one of the use case I was thinking about is if people write a fancy custom MathML layout (e.g. attaching scripts to each side / corner of a base) involving math-style and script-level then they would need to have these properties exposed. But for now math "polyfills" don't rely on modern techniques like custom elements or CSS layout API so this is highly hypothetical. |
As proposed during the hackfest, we can close it and open individual issues as necessary. |
The current proposal is
https://mathml-refresh.github.io/mathml-css-proposals/ but there is currently a lot to discuss!
It's related also to the simplification of mstyle #1 so that it can just become pure CSS inheritance.
Please make sure to read the comments, as that might require some simplification of MathML too:
https://mathml-refresh.github.io/mathml-css-proposals/math-variant-comments.html
https://mathml-refresh.github.io/mathml-css-proposals/math-script-level-and-math-style-comments.html
cc @mrego
The text was updated successfully, but these errors were encountered: