W3C home > Mailing lists > Public > www-style@w3.org > July 2012

Re: Define <br> by CSS means?

From: Håkon Wium Lie <howcome@opera.com>
Date: Mon, 23 Jul 2012 00:24:44 +0200
Message-ID: <20492.32172.878885.646207@gargle.gargle.HOWL>
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: www-style@w3.org
Also sprach Andrew Fedoniouk:

 > >  > >   br {
 > >  > >     content: '\A';
 > >  > >     white-space: pre;
 > >  > >     background: none
 > >  > >   }

 > > Ignoring implementation for a moment, why shouldn't the above
 > > defitions of br work with inline-blocks?
 > 
 > The el::after { content: 'something'; } declaration creates synthetic
 > node that is child of the el.

Right. (Or, in the case of Prince, on the element itself.)

 > That line-feed will break content inside the el and so will have no
 > effect on line-box where el is replaced.

If the element is inline (and not block-inline), it should break the
line. E.g, this will the line:

  <html><style>span:after { content: '\a'; white-space: pre }</style>
  <body>foo <span></span> bar</body></html>

So, when you say it will have no effect, you refer to elements that
have been declared block-inline, right?

 > The br could be defined as:
 > 
 > br {
 >   width:0;
 >   height:1em;
 >   clear: break-after;
 > }
 > 
 > if we would have "break-after" value for the clear. That would match
 > reality significantly better.

Adding new values is an expensive solution which will take years to
start working. To me it seem that the \a approch works in all but the
inline-block case, no?

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Sunday, 22 July 2012 22:25:18 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:57 GMT