Re: [csswg-drafts] [css-text-3] Don't mince words about aliasing/shorthands with word-wrap

The Working Group just discussed `aliasing mechanism`, and agreed to the following resolutions:

* `RESOLVED: we should define what an alias is in CSS Cascade`
* `RESOLVED: We will make the required edits for the definition resolved previously`
* `RESOLVED: We create a new legacy shorthand concept in Cascade L4 for those things that we have legacy shorthands that should never be serialized`
* `RESOLVED: everything that's currently defined as an alias needs to use new legacy definition or is a legacy shorthand`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: aliasing mechanism<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/866<br>
&lt;dael_> fantasai: Couple places in text with an alias like overflow-wrapa nd word-wrap and the way their aliased is not how they're impl.<br>
&lt;dael_> fantasai: Previously resolved that when we do alais we treat as shorthand as other prop. Moz has different mech. If we're changing I need a resolution on what to change to.<br>
&lt;dael_> florian: I think it's not just Moz. In general aliasing in a browser doesn't work as a shorthand.<br>
&lt;dael_> emilio: How to observe?<br>
&lt;dael_> florian: By browser engineers complaining. What is the different behavior?<br>
&lt;dael_> emilio: [missed]<br>
&lt;fantasai> dbaron's comment on observable difference - https://github.com/w3c/csswg-drafts/issues/866#issuecomment-271028230<br>
&lt;dael_> dbaron: One difference might be when serializing declaration you try and serialize to a shorthand first and you don't want to do that here.<br>
&lt;dael_> dbaron: You want that for real shorthands<br>
&lt;dael_> emilio: But not aliases.<br>
&lt;dael_> dbaron: Example if you have a declaration that says border-meduim on each direction we'll use border:medium. Same rule is that if someone decalred overflow-wrap:inherit we'd serialize to word-wrap.<br>
&lt;dael_> abCSSOM wording has preferred order where shorthands are above longhands, but prefixed are below all of them.<br>
&lt;fantasai> https://www.w3.org/TR/css-break-3/#page-break-properties<br>
&lt;astearns> s/abCSSOM/TabAtkins: CSSOM/<br>
&lt;dael_> fantasai: Tricker is page break aliases. Those ones the page-break which is old will express all the values of the longhand which is where we're moving<br>
&lt;dael_> dbaron: There are also things that aren't supposed to work for shorthands. We might have changed some of those things to work.<br>
&lt;dael_> emilio: Spec says generally that getPRopertyValue works for shorthand but in getComputedStyle only properties are actual long hands but if there's properties for shorthands also expose them there. getPropertyValue font is supposed to work.<br>
&lt;dael_> emilio: Both work in webkit and block, but getComputedStyle.font isn't supposed to work per spec.<br>
&lt;dael_> emilio: Edge and FF don't impl any shorthand in getComputedStyle<br>
&lt;dael_> dbaron: WE do some.<br>
&lt;dael_> emilio: blink and webkit support both.<br>
&lt;dael_> dbaron: Other question is what is the actual mech we use.<br>
&lt;dael_> dbaron: In old style system at the point we converted a string to an internal css property ID we also did the alias mapping so every time you had an input that's a string that was asking something about a property we would convert it.<br>
&lt;dael_> emilio: Now I think we preserve a bit longer to control aliases. BUt not much longer. Once they're in the declaration block.<br>
&lt;fantasai> s/aliases/aliases vis prefs/<br>
&lt;dael_> fremy: WE only have "realId"s that are HTML. If we have -webkit-something and if the same as a prefix it's the same thing.<br>
&lt;fantasai> s/property ID/property ID where we also did lowercasing and such/<br>
&lt;dael_> astearns: I'm a bit confused. dbaron you started saying it's not like a shorthand because when you serialize the property turns into alias.<br>
&lt;dael_> dbaron: The thing that's not the alias is turned long hand.<br>
&lt;dael_> emilio: Supposed to serialize the short hand. If you have foo per spec it should be -webkit-foo.<br>
&lt;dael_> dbaron: If it's word-wrap and overflow-wrap it's supposed to switch.<br>
&lt;dael_> TabAtkins: It's alphasbetical.<br>
&lt;dael_> emilio: one is long hand.<br>
&lt;dael_> TabAtkins: Yes, if they're both shorthands.<br>
&lt;dael_> florian: If word-wrap is defined to be a shorthand you'll serialize tot he thing that's supposed to be the shorthand<br>
&lt;dael_> frWhen you spec the alias it's the same thing.<br>
&lt;dael_> astearns: Instead of defining alias as a shorthand we define alias as a separate thing and define what browsers are doing<br>
&lt;dael_> myIes: If you say .font does what you spoke about work? Would the alias and the original exist there?<br>
&lt;dael_> emilio: Yeah.<br>
&lt;dael_> myles: It's not just turning strings into an ID. You also do this other thing.<br>
&lt;dael_> florian: What about properties that take values?<br>
&lt;dael_> emilio: Same Whenever you parse a property ID if you receive like the alias you once you process it it's the same as if you got the longhand<br>
&lt;dael_> florian: If you serialize the transition property<br>
&lt;dael_> dbaron: Transition property property.<br>
&lt;TabAtkins> s/transition property/transition-property/<br>
&lt;dael_> florian: If you serialize the transition property property which takes property names you do not preserve the name.<br>
&lt;dael_> dbaron: In old gecko we did not preserve it.<br>
&lt;dael_> florian: And a shorthand you do preserve?<br>
&lt;dael_> dbaron: Yes.<br>
&lt;dael_> florian: That's one reason I pushed for shorthand originally.<br>
&lt;dael_> dbaron: We could still spec the other way for alias<br>
&lt;dael_> florian: Initial reason for shorthands was double. One we looked for in page-break has a different set of values.<br>
&lt;dbaron> you have to say "transition-property property" because otherwise "transition-property" might be heard as "transition property"<br>
&lt;dael_> emilio: Parsing rules. That's what we used to have for box-transform. We impl it as a shorthand and special cased serialization.<br>
&lt;dael_> florian: In general I think we can do the simple thing.<br>
&lt;dael_> fremy: For the transition property property we keep the ID as it is. If you can't match to a property in the end it doesn't work for us.<br>
&lt;dael_> emilio: We preserve the ID...I agree it's not relevent.<br>
&lt;dael_> fremy: We're not preserving it as a shorthand.<br>
&lt;dael_> myles: So mechanism for alias is not shorthands.<br>
&lt;dael_> florian: I'd like to resolve in general and separately for page-break and friends.<br>
&lt;dael_> emilio: Can't change parsing rules?<br>
&lt;dael_> florian: No.<br>
&lt;dael_> astearns: Seems to me like we could define what aliases are in Cascade in general and when we have an alias that needs mapping we define that in it's own spec.<br>
&lt;dael_> fremy: Example some webkit-flex properties are different.<br>
&lt;dael_> florian: WE define separately then? If values are the same we don't do anything.<br>
&lt;dael_> emilio: In FF we don't have any special case. I don't have context for page-break but how is it supposed to work with page-break:foo and then break:foo<br>
&lt;dael_> florian: Let me pull spec up.<br>
&lt;dael_> florian: page-break: before|always maps to break-before:page<br>
&lt;fantasai> s/page-break: before|/page-break-before:/<br>
&lt;dael_> fremy: They're not aliases.<br>
&lt;dael_> florian: If we define aliasing mech it won't work here.<br>
&lt;dael_> emilio: Page break properties, how should they work with aliases<br>
&lt;dael_> florian: They're supposed to be shorthands.<br>
&lt;dael_> emilio: Why are we covering?<br>
&lt;dael_> myles: There are shorthands and aliases and they're different<br>
&lt;dael_> dbaron: Page-break still needs to be a shorthand.<br>
&lt;dael_> astearns: But that's nto relevent<br>
&lt;dael_> florian: They're defined as these are aliases and you do them as shorthands. We hav to change that<br>
&lt;fantasai> Another aliasing case is https://www.w3.org/TR/css-writing-modes-3/#glyph-orientation<br>
&lt;dael_> astearns: We have to change where we say alias in all our specs<br>
&lt;dael_> myles: Where values aren't the same.<br>
&lt;dael_> florian: We had resolved on their the same.<br>
&lt;dael_> myles: was a bad resolution.<br>
&lt;dael_> emilio: What's expected to happen when you seilaize page-break:always It's defined to map to break:before-page What's expected serializeation of page-break:always in .style.pagebreak<br>
&lt;dael_> emilio: Is it break:before-page? break-before:always?<br>
&lt;dael_> fremy: It's not an alias. It's a webkit thing so it's an alias.<br>
&lt;fantasai> s/It's a webkit thing/Alias is a webkit thing/<br>
&lt;dael_> florian: Let's delete alias from that paragraph and leave the rest as is. Let's define alias somewhere.<br>
&lt;dael_> emilio: If we define this is a shorthand then break-before:left will be page break. It's weird because page-break is legacy<br>
&lt;dael_> myles: define in other direction?<br>
&lt;dael_> fantasai: Can't because break-before has values that page-break:before can't.<br>
&lt;dael_> emilio: Page mpas to page<br>
&lt;dael_> florian: Thing on the left are everything you have things on the right are more values.<br>
&lt;dael_> emilio: We can special case that.<br>
&lt;dael_> fremy: Can have concept of legacy property that's serialized at the bottom.<br>
&lt;dael_> emilio: Then you have shorthands where you have to create special cases.<br>
&lt;dael_> fantasai: You'd have alist of properties where you're looking for a shorthand and you never look at those.<br>
&lt;dael_> fantasai: Right now when you try to serialize you have a list of declarations and if it corrisponds to a shorthand you serlialize as the shorthand. And we're saying when you check eliminate the legacy<br>
&lt;dael_> astearns: Serveral to resolve. First is we should define what an alias is in CSS Cascade<br>
&lt;dael_> astearns: Obj?<br>
&lt;dael_> RESOLVED: we should define what an alias is in CSS Cascade<br>
&lt;dael_> astearns: In pure alias cases where we don't want shorthand behavior we need to change to the definition written in the previous resolution.<br>
&lt;dael_> florian: Yes.<br>
&lt;dael_> astearns: We will use this definition where it's appropriate.<br>
&lt;dael_> RESOLVED: We will make the required edits for the definition resolved previously<br>
&lt;dael_> astearns: Prop: We create a new legacy shorthand concept in Cascade L4 for those things that we have legacy shorthands that should never be serialized<br>
&lt;dael_> astearns: Or is this a type of short hand.<br>
&lt;dael_> emilio: There's a tricky thing because only place for this kind of shorthand is when the new thing superceeds the old. Is there a case where they don't map?<br>
&lt;dael_> fantasai: glyph-orieintation which takes a keyword and a degree and those map to keywords in text-orientation.<br>
&lt;dael_> emilio: Okay. That's fine as long as you can map.<br>
&lt;dael_> astearns: That can be it's own section or subsection<br>
&lt;dael_> astearns: Obj?<br>
&lt;dael_> RESOLVED: We create a new legacy shorthand concept in Cascade L4 for those things that we have legacy shorthands that should never be serialized<br>
&lt;dael_> emilio: Then someone needs to edit.<br>
&lt;dael_> fantasai: TabAtkins and I can<br>
&lt;dael_> florian: Do we need to resolve on a list?<br>
&lt;dael_> emilio: If they have same syntax you're fine otherwise use legacy.<br>
&lt;dael_> astearns: Let's do what we resolved and look at the fallout from that. Better to have them take time and find places it doesn't work.<br>
&lt;dael_> florian: Principle stated is if they take same values it's alias otherwise it's legacy.<br>
&lt;dael_> emilio: They're different things.<br>
&lt;dael_> astearns: florian is asking that we resolve to put thing in one bucket or the other and if we find problems we bring that to the group.<br>
&lt;dael_> astearns: Prop: everything that's currently defined as an alias needs to use new legacy definition or is a legacy shorthand<br>
&lt;dael_> RESOLVED: everything that's currently defined as an alias needs to use new legacy definition or is a legacy shorthand<br>
&lt;dael_> fantasai: If you're using aliasing mech what does that mean...you'll always serialize as the new thing and we don't have objects in OM rep that?<br>
&lt;dael_> emilio: We do.<br>
&lt;dael_> fantasai: WE should spec that<br>
&lt;dael_> myles: if you set the old object you should be able to read that from the new object<br>
&lt;dael_> fantasai: So this also applies to style.<br>
&lt;dael_> emilio: Yes.<br>
&lt;dael_> fantasai: Anywhere name is exposed. Okay.<br>
&lt;dael_> fantasai: I think that's it.<br>
&lt;dael_> fantasai: If you type in word-wrap:break-word and reserialize that you get overflow-wrap:break-word  That's okay?<br>
&lt;dael_> many: yes<br>
</details>


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

Received on Thursday, 12 April 2018 13:28:39 UTC