- From: Gérard Talbot <www-style@gtalbot.org>
- Date: Thu, 02 Jul 2015 16:06:15 -0400
- To: Koji Ishii <kojiishi@gmail.com>
- Cc: Koji Ishii <kojiishi@gluesoft.co.jp>, Elika Etemad <fantasai.lists@inkedblade.net>, W3C www-style mailing list <www-style@w3.org>, 塩澤 元 (Shiozawa, Hajime) <hajime.shiozawa@gmail.com>
Le 2015-06-25 09:08, Koji Ishii a écrit : > I somehow missed this until Tab mentioned this, sorry about that. > > On Fri, Jun 12, 2015 at 9:37 AM, Gérard Talbot <www-style@gtalbot.org> > wrote: > >> Hello, >> >> When an inline-block has non-empty block descendants, then >> > > Minor details but just want to make sure we're on the same table. So > the > topic is when an inline-block has multiple line boxes, not when all > descendants are blocks and it doesn't have any inline descendants, > correct? > I originally thought the topic was when all descendants are blocks, but > as > I understand more, all what you wrote also applies when I put simple > text > in an inline-block and set width to wrap. Your clarification is > appreciated. > > " >> The baseline of an 'inline-block' is the baseline of its last line box >> in >> the normal flow (...) >> " >> CSS 2.1, 10.8.1 Leading and half-leading >> http://www.w3.org/TR/CSS21/visudet.html#leading >> >> This was decided *way before* the concept of dominant baseline and >> before >> central baseline-alignment were created and specified. >> >> Similarly, >> >> " >> The baseline of an 'inline-table' is the baseline of the first row of >> the >> table. >> " >> CSS 2.1, 10.8.1 Leading and half-leading >> http://www.w3.org/TR/CSS21/visudet.html#leading >> >> But when vertical writing mode spec was created, then we have >> different >> baselines: >> >> " >> In vertical writing mode, the central baseline is used as the dominant >> baseline when text-orientation is mixed or upright. Otherwise the >> alphabetic baseline is used. >> " >> 4.2 Text Baselines >> http://www.w3.org/TR/css-writing-modes-3/#text-baselines >> >> >> Now, I created a demo and then tested it with an inline-block that has >> 2 >> non-empty block children: >> >> >> http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/vert-align-latin-baseline-inline-block-dhtml.html >> >> First of all, webkit-based browsers not only do not support an >> unprefixed >> version (when it should!) but they do *not* support the 'mixed' value >> but >> rather support the old 'vertical-right' value [1]; so that test has >> been >> adjusted so that it would work for webkit-based browsers. >> >> Steps: >> >> 1- Load >> >> >> http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/vert-align-latin-baseline-inline-block-dhtml.html >> >> into several browsers: say, Firefox 41 nightly build and Chrome 45 >> >> 2- Make sure that 'mixed' and 'baseline' radio buttons are checked >> >> Firefox rendering: the inline-block margin box is centered within the >> line >> box >> >> Chrome rendering: the inline-block is baseline-aligned within the line >> box >> in accordance with the baseline of its own last line box. >> >> One could say that Chrome complies accurately with the current >> writing-mode spec: no objection here. But, is such rendering best (or >> ideal) for central baseline-alignment? Is such rendering what the spec >> editors wanted for central baseline-alignment? >> > > We have two editors ;-) but at least for me, yes. In other words, I did > not > think any other options exist, though it's primarily from CSS > perspective, > not from use-case perspective. > > ------- >> >> Steps: >> >> 1- Load >> >> http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/vert-align-latin-baseline-inline-block-dhtml.html >> into several browsers: say, Firefox 41 nightly build and Chrome 45 >> >> 2- Make sure that 'sideways-right' and 'baseline' radio buttons are >> checked >> >> Firefox rendering and Chrome renderings: the inline-block is >> baseline-aligned on the line box in accordance with the baseline of >> last >> line box. >> >> When 'text-orientation' is 'sideways-right', the spec says the >> alphabetic >> baseline should be used. >> > > Confirmed the difference. Thanks to your interactive demo, it looks > like > Firefox handles the central baseline just the same as "middle" if > vertical > flow and text-orientation is mixed. > > >> ------- >> >> Proposal: >> >> In vertical writing mode, when the central baseline is used as the >> dominant baseline, then the baseline of an inline-block is halfway >> between >> its under and over margin edges. >> >> In vertical writing mode, when the central baseline is used as the >> dominant baseline, then the baseline of an inline-table is halfway >> between >> its under and over margin edges. >> >> Webkit-based browsers would have to be fixed; Firefox would not have >> any >> modification to do. >> >> ------- >> >> When the aplhabetical baseline is used as the dominant baseline, there >> would be no change: >> >> In vertical writing mode, when the aplhabetical baseline is used as >> the >> dominant baseline, then the baseline of an inline-block is the >> baseline of >> the last line box. >> >> In vertical writing mode, when the aplhabetical baseline is used as >> the >> dominant baseline, then the baseline of an inline-table is the >> baseline of >> the first row of the table. > > > Use case-wise, I think both use cases exist. I can't answer from top of > my > heads which is more common. > > From CSS and implementer perspective, I prefer the current WebKit/Blink > behavior for three reasons: > > 1. The primary objective of the "central" vertical align is to align > the > center of lines. The value "middle" was defined as the center of > x-height, > which does not work for CJK use cases. So from my point of view, > "central" > aligns characters to characters (from user perspective, sometimes <img> > are > characters.) > > 2. Assuming my understanding of "both use cases exist", "middle" > already > serves one, so making "central" the same as "middle" looses another use > case. > > 3. I prefer less differences when in horizontal and in vertical, unless > it's really needed. Taking the "central" of last line box in horizontal > flow while doing the "middle" of inline-block in vertical flow looks > unnecessary difference to me. > > But this part was largely stolen from Steve's line box spec, fantasai > wrote > most of text in this section, reviewed by WG members. I'd like to have > other opinions. > > fantasai, Steve, could you chime in? > > /koji Koji, I read your posts and also Elika's replies elsewhere in this thread. So, I rally to your opinion; in my mind, the decisive reason is the use cases. I'll file a bug report at Mozilla today. Gérard
Received on Thursday, 2 July 2015 20:06:47 UTC