Re: [csswg-drafts] [css-text-3] percentage on text-indent

The Working Group just discussed `percentage on text-indent`, and agreed to the following resolutions:

* `RESOLVED: Make text indent percentage relative to the content box of the element`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: percentage on text-indent<br>
&lt;fantasai> github: https://drafts.csswg.org/css-text-3/issues-lc-2013#issue-113<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/2394<br>
&lt;dael> fantasai: Issue is % on text-indent. In CSS 2 if defined as relative to containing block and FF inter as the containing block on element it's set. Chrome it's the containg block of the text being invented. If you interp as on the parent the behavior differs on if you generate anon blocks or not.<br>
&lt;dael> fantasai: Proposal is to make the text indent relative to the context box width of the element itself<br>
&lt;dael> fantasai: Means you don't expose anon block structure.<br>
&lt;dael> florian: I think % text indents are relatively rare.<br>
&lt;dael> fremy: People use -100% to hide text. Only case I've seen.<br>
&lt;dael> astearns: Edge would have to fix?<br>
&lt;dael> fantasai: FF<br>
&lt;fantasai> original post from dbaron at https://lists.w3.org/Archives/Public/www-style/2015Feb/0250.html<br>
&lt;dael> koji: Do we know how often this is used?<br>
&lt;dael> florian: I don't have data. WE know it exists and it's different in different browsers. Prob not too much compat contraint. We're suggesting FF aligns with Chrome which typically doesn't break web.<br>
&lt;fantasai> Jonathan Kew requesting the spec (and Gecko) to change in https://lists.w3.org/Archives/Public/www-style/2015Feb/0273.html<br>
&lt;rego> http://jsbin.com/yodarulizi/1/edit?html,css,output<br>
&lt;dael> koji: Only not compat when anon block exists?<br>
&lt;rego> edge and firefox have the same behavior, which differs from chromium and webkit<br>
&lt;dael> koji: I impl and there was a test case with repeat that all browsers pass.<br>
&lt;dael> florian: If you're not careful in a test case and all boxes are same size it's all the same.<br>
&lt;dael> fantasai: If test case was from iank_ it was probably simple.<br>
&lt;fantasai> s/iank_/hixie/<br>
&lt;dael> koji: It has differences.<br>
&lt;fantasai> s/simple/evil<br>
&lt;dael> koji: I'm willing to simplify just wondering how much data we can discover<br>
&lt;fantasai> (as in, doing a very good job of triggering tricky cases)<br>
&lt;dael> astearns: Any more to discuss?<br>
&lt;dael> fantasai: Jonathan Q was asking for spec to change.<br>
&lt;astearns> s/Q/Kew<br>
&lt;dael> fantasai: Prop: make it relative to content box of the element<br>
&lt;dael> fantasai: Simple behavior, no weird edge cases.<br>
&lt;dael> astearns: Objections to make percentage relative to content box of element for text indent?<br>
&lt;dael> dbaron: Both Edge &amp; Chrome do that?<br>
&lt;dael> fantasai: Don't remember.<br>
&lt;dael> florian: I believe edge does<br>
&lt;dael> fremy: Test case?<br>
&lt;dael> dbaron: I found a web compat bug on percentage text compat on overflow:hidden because when there's 2 boxes we do the same thing as edge and we got a web compat bug. Or had. Probably fixed.<br>
&lt;fantasai> http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=5888<br>
&lt;dael> fantasai: Test case ^<br>
&lt;dbaron> https://bugzilla.mozilla.org/show_bug.cgi?id=1306590<br>
&lt;dbaron> and also https://bugzilla.mozilla.org/show_bug.cgi?id=908706<br>
&lt;dael> astearns: rego posted a JSfiddle that for me shows difference from FF and Chrome.<br>
&lt;dael> rego: My example was from the example.<br>
&lt;dael> fremy: On the fiddle we have same as FF<br>
&lt;dael> rego: It's Chrome and Webkit for the other behavior.<br>
&lt;rego> s/from the example/from the issue/<br>
&lt;dael> fremy: Should the two lines be the same per the spec?<br>
&lt;rego> s/JSfiddle/jsbin/<br>
&lt;koji> https://github.com/w3c/web-platform-tests/blob/master/css/css-text/text-indent/text-indent-percentage-001.xht<br>
&lt;dael> koji: This is in web platform tests and passes in all browsers.<br>
&lt;dael> fantasai: So we want it the be the same for both lines. That makes more sense.<br>
&lt;dael> fantasai: Having text indent reference width of parent doesn't make sense.<br>
&lt;dael> koji: [missed]<br>
&lt;dael> fantasai: Depends on what % is about. It's spec against containing block and it's not clear if it's the element itself or the text being created.<br>
&lt;dael> dbaron: I'm fine changing. I don't understand the deal with the compat bugs.<br>
&lt;fantasai> http://jsbin.com/yodarulizi/1/edit?html,css,output<br>
&lt;dael> rego: This has a paragraph, the other one doesn't.<br>
&lt;dael> fremy: Why should hte text indent be same if the width inside the box is smaller?<br>
&lt;dael> dbaron: There's a p inside so both the lines are in the inner box.<br>
&lt;dael> dbaron: I'm fine changing. If that's what chrome does it'll be fewer total compat issues.<br>
&lt;rego> http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=5888 is interopable<br>
&lt;rego> but http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=5889 is not<br>
&lt;dael> astearns: Chrome behavior makes more sense to me.<br>
&lt;dael> fantasai: Yes.<br>
&lt;dael> astearns: Prop: Make text indent percentage relative to the content box of the element<br>
&lt;dael> fantasai: It's possible what was trying to be clarified by css2 is that if it's a float it's still the same amount.<br>
&lt;dael> koji: Are you proposing...?<br>
&lt;dael> fantasai: Make everyone match Chrome.<br>
&lt;dael> koji: What we do is different...I believe we have code with containing block and there might be difference in details. This is probably different then what we do.<br>
&lt;dael> fantasai: We're proposing to say FF is wrong. When there's no floats we should do what Chrome does.<br>
&lt;dael> florian: If you can find what's different between what we spec and what you do let us know.<br>
&lt;dael> dbaron: Part of the old problem is people looked at different spec text and thought different things.<br>
&lt;dael> RESOLVED: Make text indent percentage relative to the content box of the element<br>
</details>


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

Received on Wednesday, 11 April 2018 12:09:28 UTC