- From: Koji Ishii <kojiishi@gmail.com>
- Date: Tue, 16 Dec 2014 16:10:09 +0900
- To: Johannes Wilm <johannes@fiduswriter.org>
- Cc: Frederico Knabben <f.knabben@cksource.com>, Olivier Forget <teleclimber@gmail.com>, Ben Peters <Ben.Peters@microsoft.com>, "public-editing-tf@w3.org" <public-editing-tf@w3.org>
+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. > 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 /koji
Received on Tuesday, 16 December 2014 07:10:37 UTC