Re: [csswg-drafts] [css-fonts] Add new CSS properties math-script-level and math-style (#3746)

I think it would be useful to see an example of where `math-style` is necessary. It seems to me that styling things differently based on the math style can be done already in CSS, by using attribute selectors to determine what the math style should be, and using only CSS to decide which sizing/layout rules should be used.

Also, how would a CSS stylesheet access the Math OpenType features like `scriptPercentScaleDown`? I want to be able to write something like this (obviously oversimplified):

```css
sup {
    /* Redefined to shift up by superscriptShiftUp when available. */
    vertical-align: super;

    /* A new syntax defined to be equal to scriptPercentScaleDown,
       interpreted as a percentage. */
    font-size: math-script;
}

sup sup, sub sup {
    /* Redefined to shift up by superscriptShiftUp when available. */
    vertical-align: super;

    /* A new syntax defined to be equal to scriptScriptPercentScaleDown,
       interpreted as a percentage. */
    font-size: math-script-script;
}
```

Reading the explainer, I get the impression that the proposal is written assuming a different model for CSS styling of math that doesn't allow for these kinds of things. It would be good to see the overall architecture of the design explained somewhere to understand all these proposals.

-- 
GitHub Notification of comment by briansmith
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3746#issuecomment-487713427 using your GitHub account

Received on Monday, 29 April 2019 19:33:42 UTC