W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2017

Re: [csswg-drafts] [html] Change default <sup> and <sub> styling?

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Wed, 25 Oct 2017 16:36:26 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-339391611-1508949384-sysbot+gh@w3.org>
The Working Group just discussed `Change default <sup> and <sub> styling?`.

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic:  Change default &lt;sup> and &lt;sub> styling?<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/pull/1888<br>
&lt;dael> Rossen_: Anyone want to take this? florian and dbaron were involved, I know. Or myles<br>
&lt;dael> myles: I can summerize.<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/1888<br>
&lt;dael> myles: In HTML there's &lt;sup> and &lt;sub> that are defined in UA stylesheet to do vertical align and reduce font size. Now that open type fonts are available it may be that there are specific information in the font for this.<br>
&lt;Chris> q+<br>
&lt;dael> myles: Issue proposes we change UA style sheet to turn on the font features.<br>
&lt;Rossen_> q?<br>
&lt;tantek> perhaps experiment with MathML super/subscripts first?<br>
&lt;dael> fantasai: Problem with this is that  it doesn't handle anything that is nested so if you have any elements inside it like something to an exponent and the exponent has an exponent in it the feature won't work. So this breaks cases that would have worked.<br>
&lt;tantek> fantasai's answer makes sense and would likely make a good FAQ in the spec<br>
&lt;dael> fantasai: We had when designing font varient feature it was decided not to do that which is why font spec doesn't recommend this as a replacement. Given that's the case we should advise HTML to not make t his change.<br>
&lt;myles> q+<br>
&lt;dael> florian: I followed up trying to make a hybrid using font features for first level and then fallback for nesting. I'm not sure it handles all cases. If people want to keep i nvestigating if we can write such rules maybe we can look into that. I'm not confident it's sufficient<br>
&lt;Rossen_> ack Chris<br>
&lt;dael> Chris: I think it's a good approach. The PR is sent for tests for CSS 3 fonts actually mentions that. I think it's better to make the single level of nesting use the open type feature which will give you a better result in the common and if you're complex maybe you should use mathML<br>
&lt;tantek> q+ to mention compat just because in case dbaron doesn't :)<br>
&lt;dael> dbaron: I don't think...I think what chris suggests for top level won't work if the font metrics are inaccurate which is common. There's no guar it'll work or that a subscript will align anywhere correct so you could distinguish the super script of a superscript.<br>
&lt;dael> florian: I think it works mostly.<br>
&lt;dael> dbaron: It depends on how well the font metrics match the characters.<br>
&lt;dael> fantasai: It also doesn't handle images in the subscript so I think there's a lot of things that will break.<br>
&lt;tantek> q+ to also mention imma let you finish your UA style sheet proposal but test cases that demonstrate this would be the best thing ever!<br>
&lt;dael> myles: First, I'd like to agree with fantasai and dbaron. Apart from that we would like some ability for the UA to use the glyphs if it can figure out the right way. we don't think this proposal is sufficient, but it is possiblefor a UA to use these gyplhs. This prop i sn't the right way but we'd like some sort of affordance in the future.<br>
&lt;dael> fantasai: But that would require new CSS features. We've discussed that in the past and peopledidn't want to do it. We can re-open those discussions. We should close this req/ and say you can't do that, but if you want to make a bug against Fonts 4 or 5 to make this possible you can do that.<br>
&lt;dael> myles: I agree. This isn't the right place but the goal is noble.<br>
&lt;dael> fantasai: We appriciate the effort to incorporate better typography, but this isn't the right place and it's not able to handle it currently.<br>
&lt;dael> Rossen_: Any other comments or suggestions?<br>
&lt;dael> Rossen_: If not we can close with fantasai's suggested rec.<br>
&lt;tantek> lol when Rossen asks that without checking the queue<br>
&lt;Rossen_> q?<br>
&lt;Chris> q?<br>
&lt;Rossen_> ack myles<br>
&lt;Rossen_> ack tantek<br>
&lt;Zakim> tantek, you wanted to mention compat just because in case dbaron doesn't :) and to also mention imma let you finish your UA style sheet proposal but test cases that demonstrate<br>
&lt;Zakim> ... this would be the best thing ever!<br>
&lt;dael> tantek: A couple of comments. I would suspect that changing this for sub and sup it will break compat in unpredicatbale ways since those tags have been used so long.<br>
&lt;fantasai> tantek's got a good point<br>
&lt;dael> tantek: Second question is, I didn't see a URL to a test case that demos what this would  look like old vs new style. I think at a  minmum we need that to consider this proposal.<br>
&lt;dael> Rossen_: Anyone have a test case or code that can demo this side by side?<br>
&lt;fantasai> if an author, say, fusses with vertical-align on the superscripts on the page, a font-variant-position--based UA style sheet is going to break that page<br>
&lt;dael> Rossen_: I don't hear any. We can go back to the issue and wait for the people discussing it to see if anything will come through.<br>
&lt;dael> fantasai: I think tantek has a good point about how this has been used a long time. People have tweeked their style sheet to make these tags look better and may be relying on vertical align. We will break pages if we try and change the default stylesheet.<br>
&lt;dael> fantasai: That will apply to any case where we try and make things better unless  it's really automagic.<br>
&lt;dael> Rossen_: Anything else on this topic?<br>
&lt;Rossen_> q?<br>
&lt;fantasai> s/vertical align/vertical-align or font-size cascading through/<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1888#issuecomment-339391611 using your GitHub account
Received on Wednesday, 25 October 2017 16:36:31 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:19 UTC