- From: Olivier Forget <teleclimber@gmail.com>
- Date: Tue, 16 Dec 2014 18:26:31 +0000
- To: Koji Ishii <kojiishi@gmail.com>, Johannes Wilm <johannes@fiduswriter.org>
- Cc: Frederico Knabben <f.knabben@cksource.com>, Ben Peters <Ben.Peters@microsoft.com>, "public-editing-tf@w3.org" <public-editing-tf@w3.org>
- Message-ID: <CAA5DY6btZ2MLwo4WDY9ehfNDun_8n25rVBDsWpLLxAoFRE1B2g@mail.gmail.com>
On Mon Dec 15 2014 at 11:10:09 PM Koji Ishii <kojiishi@gmail.com> wrote: > +1 from me too. > > On Tue, Dec 16, 2014 at 7:11 AM, Johannes Wilm <johannes@fiduswriter.org> > wrote: > > Hey, > > if we do as proposed, think about this example: > > > > <div style="display:none;"> > > <div contenteditable=true> > > Hello <span style="display:none">Austria</span>! > > </div> > > </div> > > > > If I understand you right, you want to ignore the outer display:none for > > editing purposes, but respect the inner one? > > > > I can see how that may be practical for certain purposes, but correct me > if > > I'm wrong, it seems like until now there was only one level something > could > > be display:none. Now if we choose to go this route, we will have several > > layers. > > > > We could even go further: > > > > <div style="display:none;"> > > <div contenteditable=true> > > Hello <span style="display:none"><span > > contenteditable=true>Austria</span></span>! > > </div> > > </div> > > > > Now we would have two (offscreen) contenteditable areas, one within the > > other, but the outer one will ignore the inner one when it comes to caret > > movement, while the inner one is self-contained. I can see how that could > > come in handy for some things. > > Needs Olivier's clarification; I think his proposal handles the two > the same way. Since outer one is display:none, carets cannot move into > there unless it's set by scripts, IIUC. > Yes, that's correct. > > > How about CSS specs? It seems at least the definition of display:none > would > > need to be amended slightly: > > http://www.w3.org/TR/CSS2/visuren.html#display-prop > > > > "none: This value causes an element to not appear in the formatting > > structure (i.e., in visual media the element generates no boxes and has > no > > effect on layout). Descendant elements do not generate any boxes either; > the > > element and its content are removed from the formatting structure > entirely. > > This behavior cannot be overridden by setting the 'display' property on > the > > descendants. > > > > Please note that a display of 'none' does not create an invisible box; it > > creates no box at all. CSS includes mechanisms that enable an element to > > generate boxes in the formatting structure that affect formatting but are > > not visible themselves. Please consult the section on visibility for > > details." > > It's only talking about box generations, and editing is done in DOM in > principle, so I don't see any problems with this text. Can you clarify > your concerns a bit more? > > Note that the 'display:none' is going to be deprecated in CSS Display > Module Level 3[1], but if the text in CSS 2 has any concerns, that > concerns may also apply to the 'box-supress: discard'. It's still ED, > we can talk to CSS WG if needed. > > [1] http://dev.w3.org/csswg/css-display/#valdef-display-outside-none > > Good to know. It's not really about "display:none" specifically. Rather it's when a part of the DOM is completely left out of the format/layout/rendering/whatever then the caret ignores it as well. Whichever CSS vocabulary has that effect on the layout should also have that effect on the caret. Note that we'll also need to talk about "visibility: hidden / collapsed" css property. > /koji >
Received on Tuesday, 16 December 2014 18:26:59 UTC