W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2019

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

From: Brian Smith via GitHub <sysbot+gh@w3.org>
Date: Mon, 29 Apr 2019 19:33:41 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-487713427-1556566420-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:07 UTC