W3C home > Mailing lists > Public > public-html-comments@w3.org > August 2011

[html5] Collapsing/expanding text and the DETAILS element

From: Bert Bos <bert@w3.org>
Date: Mon, 8 Aug 2011 21:00:34 +0200
To: public-html-comments@w3.org
Message-Id: <201108082100.34840.bert@w3.org>
A personal comment on http://www.w3.org/TR/2011/WD-

The DETAILS element (finally!) introduces the traditional hypertext 
feature of expanding text (“stretch text”) into HTML. However, there are 
two problems.

Current CSS cannot express the desired behavior of the DETAILS element. 
Although there have been proposals in the past, none have yet been 
published by the CSS WG and the HTML WG hasn't asked the CSS WG for this 
feature either. Putting DETAILS in a last-call document when the 
corresponding CSS isn't even a WD yet seems a bit premature. 

Moreover, all the (informal) proposals in CSS so far have dealt with 
collapsing elements where the parts to show and the parts to hide were 
elements or attributes (e.g., LI elements or TITLE attributes). Maybe it 
is possible to invent pseudo-elements for the collapsible content of the 
DETAILS element, but it is probably better to add a real element, e.g.: 
choice of mark-up needs further investigation and should be coordinated 
with the CSS WG.

(HTML has always had a similar problem with the DT/DD pair. CSS had to 
invent 'compact' and 'run-in' to deal with the absence of a DI element 
to group related DT and DD elements together, but it still cannot solve 
the case where two or more DTs belong to a single DD. Nobody can be 
blamed for that mark-up, however, because it was invented before CSS. 
But now that CSS exists, HTML has to be designed to match it.)

  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Monday, 8 August 2011 19:01:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:27 UTC