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

Re: Define <br> by CSS means?

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sat, 21 Jul 2012 10:53:37 -0700
Message-ID: <CALRQH792apujwer+GNvJW7POen7gjH+35yxJgq9JTyD273Smyw@mail.gmail.com>
To: Simon Sapin <simon.sapin@kozea.fr>
Cc: www-style@w3.org
On Sat, Jul 21, 2012 at 12:31 AM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> Le 21/07/2012 07:30, Andrew Fedoniouk a écrit :
>>
>> Let's say we have this markup:
>>
>> <div>
>>     <span>1</span>
>>     <span>2</span>
>>     <span>3</span>
>>     <span>4</span>
>>     <span>5</span>
>>     <span>6</span>
>> </div>
>>
>> and the desire to see these spans broken into two lines:
>>    123
>>    456
>>
>> with div style defined as:
>>
>> div { max-width: max-content; border:1px solid; }
>>
>> so its width will be set set to max of widths "123" and "456".
>>
>> Of course we can use <br> in markup between 3 and 4 but it is not CSS-ish.
>>
>> Something like this:
>>
>>    div>span:nth-child(3) { line-break:after; }
>>
>> probably?
>
>
>
> Hi Andrew,
>
> You can do as Lea said to have something behave like <br> in CSS. In fact
> that’s how <br> is implemented in some UAs.
>
> Also note that in your markup, there is whitespace before and after each
> <span>. So you will most likely get the max width of "1 2 3" and "4 5 6".
> I’ve seen work arounds like this:
>
> ...</span><!--
>     --><span>...
>
> --

Let's put aside white-spaces and other formatting issues for the
purpose of this
discussion.

For sequence of floats we have 'clear' attribute.

Question is: what would be its equivalent for sequence of inline
"bricks" - blocks and glyphs?

Sidenote: floats cannot be used in the design as they have no vertical
alignment concept.

Could it be something like break-*** values for the 'clear':

  clear: break-after | break-before | after | before | left | right

?

-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Saturday, 21 July 2012 17:54:05 GMT

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