W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2020

Re: [csswg-drafts] [math] "cramped" script style (#5388)

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Thu, 17 Sep 2020 16:32:18 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-694352636-1600360337-sysbot+gh@w3.org>
The CSS Working Group just discussed `cramped script style`, and agreed to the following:

* `RESOLVED we add an inhertied property with two value and the default of normal`

<details><summary>The full IRC log of that discussion</summary>
&lt;astearns> topic: cramped script style<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/5388<br>
&lt;bkardell_> NeilS: cramped style is a thing specific to math typsetting - it reduces the vertical size in a few situations<br>
&lt;bkardell_> NeilS: it's about the positioning and the superscript in a few situations, it's been part of systems like LaTeX  and typesettings<br>
&lt;bkardell_> NeilS: if you look at the example in the issue, you can see the 2 is 'cramped' down - it's been standard in math typesetting to do this for as long as typesetting has existed, basically<br>
&lt;bkardell_> astearns: You're applying it to the entire expression whether or not it has -- just incase it does?<br>
&lt;bkardell_> NeilS: It's sort of automatically set for math, and the reason to expose it to authors is really just if the general rules don't fit somehow - so they could override it<br>
&lt;bkardell_> fredw: they are just UA stylesheet rules that define things for Math typography, and people could still use this kind of thing similarly if they needed<br>
&lt;bkardell_> iank_: I think this kind of makes sense -- to respond to amelia's issue - ... (missed it), but I think this makes sense to me<br>
&lt;bkardell_> astearns: you mentioned the default stylesheet would have the thing defined...<br>
&lt;bkardell_> iank_:  does anyone have opinions on the naming<br>
&lt;bkardell_> fredw: the name has always been 'cramped' which comes from tech, but it seems most people in css don't know that so the suggestion from fantasai was this<br>
&lt;bkardell_> fredw: we originally called it "math-superscript-shift" but fantasai  suggested this was too long...<br>
&lt;iank_> "to respond to amelia's issue" -> vertical-align doesn't immediately work as it isn't inherited, this would be set in the UA stylesheet e.g.  `msqrt { math-script: cramped; }` which would then apply to the sub-tree.<br>
&lt;bkardell_> astearns: and you could turn it into a shorthand if we expanded it....<br>
&lt;dholbert> my mic isn't working, but I have a question about inheritance<br>
&lt;dholbert> what if we had x/y inside of the sqrt() operation here?<br>
&lt;dholbert> and y had an exponent<br>
&lt;dholbert> does it apply to the "y"?<br>
&lt;dholbert> (seems a bit odd as the sqrt bar isn't close to the y)<br>
&lt;dholbert> yeah<br>
&lt;bkardell_> fredw: the normal css inheritcance will apply so it would also have a compact style<br>
&lt;bkardell_> astearns: does TeX do this as well<br>
&lt;bkardell_> fredw: yes, because that is what it copies from<br>
&lt;dholbert> just strange that sqrt(...) changes the rendering of arbitrary stuff inside the sqrt operation<br>
&lt;dholbert> (in the screenshot, it looks like we're aiming to dodge the bar of the sqrt)<br>
&lt;bkardell_> astearns: we have the cramped style to lay out the line better, so part of that is making the radical get closer to the exponent to make things more compact and kind of line up. Doing the same thing as an exponent in a denominator doesn't seem to have as much of an effect<br>
&lt;fredw> https://mathml-refresh.github.io/mathml-core/#the-math-shift<br>
&lt;dholbert> (I don't object; I just want to be sure we don't accidentally specify something that doesn't match the intent)<br>
&lt;dholbert> cool! ok thanks<br>
&lt;bkardell_> NeilS: You can criticize TeX, there are shortcommings... But there are just a couple of places where it shifts to this cramped situation, layout rules want to shrink the vertical height when they can - so this is how TeX has always done it and it's just how people expect it now<br>
&lt;bkardell_> RESOLVED we add an inhertied property with two value and the default of normal<br>

GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5388#issuecomment-694352636 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 17 September 2020 16:32:20 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:16 UTC