- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 21 Mar 2018 16:54:21 +0000
- To: public-css-archive@w3.org
The Working Group just discussed `letter-spacing computed values don't reflect reality`, and agreed to the following resolutions: * `RESOLVED: We have the spec say computed value of letter-spacing is absolute length. There's a quirk to getComputedStyle where 0 serializes to normal and that doesn't extend to the computed style map` <details><summary>The full IRC log of that discussion</summary> <dael> Topic: letter-spacing computed values don't reflect reality<br> <dael> github: https://github.com/w3c/csswg-drafts/issues/1484<br> <dael> fantasai: property has a normal keyword that's the initial and takes length<br> <dael> fantasai: normal is effectively 0 except in 2.1 we said normal you could adjust inter-letter spacing for justificaiton purposes. In text L3 I decided that was unnecessary restriction and we shouldn't distinguish normal and 0<br> <dael> fantasai: Spec says they're 100% eq. Since impl do normal to normal for computations we can say normal computes to normal and means 0. I don't see a significan't difference. Reason to compute through it you don't have to set a value to animate. normal to normal advantage is it's impl.<br> <dael> myles: Making sure I understand. If I animate from -5 to 5 I'll get visual flash?<br> <dael> fantasai: No, if you animate from initial value to 1em it won't animate correctly because it's a keyword.<br> <dael> myles: So that's why you unified 0 and normal?<br> <dael> fantasai: I did it because we might as well have computed value reflect what's in the engine. So at the end when you get computed you can't tell there's a normal. Interms of computed value the only observable difference is animations and transitions.<br> <AmeliaBR> FYI, In Chrome, letter-spacing: 0 computes to "normal". https://codepen.io/AmeliaBR/pen/73997f70e22754a85e0e6f83c5c1daf1?editors=1111<br> <dael> myles: okay<br> <fantasai> AmeliaBR: that's a *problem*<br> <AmeliaBR> (In Edge & Firefox, it computes to 0px)<br> <dael> astearns: It's work for each engine to change from computing to normal to compute to 0. Seems like we have at least 3 engines computing to normal. I'm not sure there's enough value to justify the work.<br> <dael> fantasai: AmeliaBR points out a test case where Blink computes 0 to normal and that shouldn't happen.<br> <dael> astearns: That's a bug.<br> <dael> dbaron: My be a sign that the animation thing works.<br> <dael> astearns: And if anyone depends on that working in Chrome it might be worth the effort.<br> <dbaron> s/My/May/<br> <dael> astearns: We'd have to see if any other engine has a bug.<br> <dael> fantasai: So make the spec match impland if people come back with use cases we can change back<br> <dael> astearns: Change spec to say normal computes to normal.<br> <dael> astearns: Obj?<br> <dael> Rossen_: We resolved on this 2 weeks ago. I'm fine resolving again.<br> <dael> fantasai: Might have been a different property.<br> <dael> myles: Are we trying to change semantics or computed value?<br> <dael> astearns: Just computed. We're chaning the spec for the computed value to match impl.<br> <dael> Rossen_: And what AmeliaBR points out that chrome...edge computes to normal as well.<br> <dael> florian: Why?<br> <dael> Rossen_: The web needs to work<br> <dael> fantasai: noooooo...that's bad.<br> <dael> astearns: 0 computing to normal seems like you'd lose information.<br> <dael> florian: They do the same thing so not really...<br> <dael> Rossen_: I can fix the bug if there's a similar fix in other engines.<br> <dael> Rossen_: I'm all for resolving here. I just want to point out what the irc states about Edge is not correct.<br> <dael> myles: I tested in webkit you set 0 and computed returns normal.<br> <dael> Rossen_: There's a codepen from AmeliaBR<br> <dael> florian: So only FF does normal to normal and 0 to 0?<br> <dael> Rossen_: Yes.<br> <dael> florian: Why????<br> <dael> astearns: Probably they mathced another engine<br> <AmeliaBR> In my testing, Edge v16 is returning 0px. So they must have changed for v17, if that's what Rossen is seeing.<br> <dael> florian: If we've got 3 engines doing it there might be a reason. A compat reason.<br> <Rossen_> dael, thank you for adding the drama in the IRC notes!!! :)<br> <dael> fantasai: Gecko hassn't changed to do this thing. That's good enough reason to say the spec doesn't want that.<br> <dael> astearns: Edge made the change recently so Rossen_ you might be able to find out why the change was made.<br> <dael> Rossen_: I would guess interop issue. I could go through finding hte bug. We're not going to go back to be 0 and break interop to comply to the spec if the web doesn't do that.<br> <fantasai> Computing zero to 'normal' makes *no sense*<br> <dael> Rossen_: you need to lobby with Chrome and Webkit and then we'll fix.<br> <dael> astearns: The question of what normal computes to I can see the value of computing to 0 for animations. I don't think it's worth it. I don't see the value of 0 computing to normal. That seems like matching for matching<br> <dael> laim: Is normal required to be 0? You can't do smaller spacing?<br> <dael> florian: That would be a violation<br> <dael> fantasai: You could change spec to allow that. If normal computes to itself it can be different then 0. It could do what liam says and take into account optical sizes and adjust inter-letter spacing if font says that for example<br> <dael> fantasai: I don't think we have fonts that do that or impl that do that so normal and 0 are eq. but could be different.<br> <dael> florian: We're got what does normal compute to and lots of people compute to normal. 0 computing to normal is separate thing.<br> <dael> dbaron: The 0 computing to normal might happen at level of getComputedStyle<br> <dael> myles: Exactly. In our impl when we represent letter spacing it's a float. We don't store extra information to know if it was normal. It's one float until we produce the getComputedStyle and if it's 0 we write normal.<br> <dael> Rossen_: I think same for us.<br> <AmeliaBR> So "normal" would be the "used value" for a computed value of 0?<br> <dael> fantasai: That makes sense. If they want to store as a float that's fine. Computed value of 0 should be 0 and have normal compute away. Turning ino a keyword in the middle makes no sense<br> <dael> florian: Should we say in addition to normal compute to 0 resolved value may or must be normal?<br> <dael> florian: If everybody does it...<br> <dael> fantasai: Gecko isn't. If this is an impl issue where they're not storing enough information to know if it's was normal or 0 they should output 0. It just requires no special case in getComputedStyle<br> <dael> florian: There may be a set of scripts expecting it.<br> <dael> fantasai: If that script exists we can reconsider. Gecko doesn't do it.<br> <dael> dbaron: More likely is a script that looks at getComputedStyle to know if it's the initial value. It looks for normal asn says ofh that's the initial value<br> <dael> florian: If Gecko hasn't heard it's not that bad.<br> <dael> dbaron: All browsers agree is if you set nothing getComputedStyle returns normal.<br> <dael> astearns: This has taken a lot of time.<br> <dael> astearns: I suggest we resolve on computed value of normal, change the spec to say normal if the computed value of normal.<br> <dael> florian: computed value of normal is 0 [missed] for animation it's 0.<br> <dbaron> I think the best option may be to leave the spec as it is... if one of the non-Gecko browsers is willing to change.<br> <dael> astearns: Do we want impl detail of how this is stored?<br> <dael> fantasai: You can tell if you're doing that based on how it animates. It's about what computed style is. We're down to the spec if fine to say letter spacing normal computes to 0. Now we need to know if getComputedStyle value becomes the string normal and that's a web compat question.<br> <fantasai> s/value/value of zero/<br> <dael> Rossen_: Take the two issues separately. First one I think is easier. getComputedStyle value of letter spacing spec as normal should be normal. I think that's the original thing we wanted to resolve.<br> <dael> fantasai: The question was the computed value which isn't the same thing.<br> <dael> fantasai: All impl currently if you spec letter-spacing:0 they storoe computed value of 0. They may or may not return getComputedValue of 0. It may convert to normal during that call.<br> <dael> fantasai: Several impl store it as a number. Gecko makes a distinction between spec as nomrl and spec as 0.<br> <myles> dbaron: so you just have the extra bit just for getComputedStyle?<br> <dbaron> myles, I think so<br> <dael> fantasai: All impl if you spec 0 they store 0. Gecko stores normal if you spec normal. During getComputedStyle API call there are several impl that convert 0 to report at normal. Gecko returns the keyword or 0 depending on what spec.<br> <dael> florian: Ideally waht we want is everyone to converge to computing normal to 0 but there may be web compat issue on that. Maybe have people that recently changed figure out why and we can see if the web compat is managable or not.<br> <dael> myles: If we're going to resolve we shouldr esolve on what 3 or 4 browsers do.<br> <dael> florian: It's insane<br> <dael> myles: But 3 or 4 do it.<br> <dael> florian: But 4th doesn't so it's not required.<br> <myles> s/or/of/<br> <dael> Rossen_: Are you going to try and spec text that will set right expectation for authors or write academic papers.<br> <dael> florian: If we have a dependency we write that. We have a browser that doesn't do it.<br> <dael> Rossen_: Let me give an example. If you recall the flexbox % for top and bottom padding it was done only for web compat. We want the web to work and applications to use the web.<br> <dael> fantasai: No one disagrees.<br> <dael> Rossen_: If we spec something not in any browser but FF do you expect anyone will change?<br> <dael> florian: You're making 2 arguments. The web compat I agree. The fact that FF doesn't do it we're not locked on. I would prefer doing the sane thing if we're not locked.<br> <dael> florian: It's not necessarily a web compat problem because not everyone does the same thing. Given that we may not be stuck I'd prefer to try and do the sane thing.<br> <fantasai> Specifying 'letter-spacing: 0', having it behave as zero (observable from animations), and having getComputedStyle returning 'normal' is very weird<br> <dael> astearns: I'd like to go back to dbaron on IRC where he thinks best option is leave spec as is where computed value should be absolute lengths. I believe that would require Gecko to change to leave off the normal value, but he mentioned non-Gecko browsers would need to change.<br> <dael> astearns: I think what florian said is we need to find out if this is a web compat thing.<br> <dael> florian: Someone will h ave to change any way.<br> <dael> ??: Absent compat data engines won't change.<br> <dbaron> s/??/hober/<br> <dael> hober: Absent compelling data that one is preferable three engines win. It doesn't matter if it makes sense.<br> <tantek> can't even find a bug in bugzilla on this for compat reasons<br> <dael> hober: I don't see why we're still arguing.<br> <tantek> does this affect transitions?<br> <dael> astearns: I think we're arguing because it's a hard pill to spec behavior that we think has no value.<br> <dael> florian: We have to add things to the spec to add the special case.<br> <dael> fantasai: I think it's not a benefit to authors that if they spec letter spacing 0 and get back normal.<br> <tantek> tangentially related: https://bugzilla.mozilla.org/show_bug.cgi?id=694834<br> <dael> dbaron: I think the other thing that makes sense it spec the computed value is a number. In getComputedStyle a computed value of 0 serializes to normal and not extend that to computed style map.<br> <dael> fantasai: If we spec this that's how we have to spec this. When you spec 0 computed is 0. It's only the getComputedStyle call that is normal. This is a resolved value quirk we have to put in. If it's not required by web compat I'd rather not do that. If this is just how people just cheated it in I'd rather not.<br> <dael> dbaron: I think hober is right. it's not worth the energy we'd need to deal witht he compat changes to fix this.<br> <dael> astearns: You're will ing the expend the energy to match?<br> <dael> dbaron: Yeah.<br> <dael> astearns: Proposal is we have spec say computed value of letter-spacing is absolute length. There's a quite to getComputedStyle where 0 serializes to normal and that doesn't extend to the computed style map<br> <dael> astearns: Obj?<br> <dbaron> s/quite/quirk/<br> <dael> RESOLVED: We have the spec say computed value of letter-spacing is absolute length. There's a quirk to getComputedStyle where 0 serializes to normal and that doesn't extend to the computed style map<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1484#issuecomment-375015770 using your GitHub account
Received on Wednesday, 21 March 2018 16:54:27 UTC