Skip to content

Commit

Permalink
Specify br and wbr rendering as magic
Browse files Browse the repository at this point in the history
Closes #2291.
  • Loading branch information
domenic committed Jan 25, 2017
1 parent ffae698 commit f566047
Showing 1 changed file with 42 additions and 6 deletions.
48 changes: 42 additions & 6 deletions source
Expand Up @@ -109512,9 +109512,8 @@ del, s, strike { text-decoration: line-through; }
q::before { content: open-quote; }
q::after { content: close-quote; }

<span data-x="" id="br-wbr-content">br { display-outside: newline; } /* <a href="#bidi-rendering">this also has bidi implications</a> */
<span data-x="" id="br-wbr-content">
nobr { white-space: nowrap; }
wbr { display-outside: break-opportunity; } /* <a href="#bidi-rendering">this also has bidi implications</a> */
nobr wbr { white-space: normal; }</span></pre>

<p>The following rules are also expected to apply, as
Expand Down Expand Up @@ -109677,6 +109676,11 @@ br[clear=all i], br[clear=both i] { clear: both; }</pre>

</ol>

<hr>

<p>The rendering of the <code>br</code> and <code>wbr</code> elements is also described in the <a
href="#widgets">Widgets</a> section.</p>


<h4 id="bidi-rendering">Bidirectional text</h4>

Expand All @@ -109699,9 +109703,7 @@ input[dir=auto i]:matches([type=search i], [type=tel i], [type=url i],
[type=email i]), textarea[dir=auto i], pre[dir=auto i] {
unicode-bidi: plaintext;
}
/* see prose for input elements whose type attribute is in the Text state */

/* the <a href="#br-wbr-content">rules setting the 'content' property</a> on <code>br</code> and <code>wbr</code> elements also has bidi implications */</pre>
/* see prose for input elements whose type attribute is in the Text state */</pre>

<p>When an <code>input</code> element's <code data-x="attr-dir">dir</code> attribute is in the
<span data-x="attr-dir-auto">auto</span> state and its <code data-x="attr-input-type">type</code>
Expand Down Expand Up @@ -110714,9 +110716,43 @@ object[align=bottom i] {

<div w-nodev>

<h4>The <code>br</code> and <code>wbr</code> elements</h4>

<p>The <code>br</code> element is expected to render as a line break, ignoring the effect of the
<span>'white-space'</span> property.</p>

<p>The <code>wbr</code> element is expected to render as a line break opportunity.</p>

<p>No CSS properties are expected to affect the rendering of these elements.</p>

<div class="note">
<p>The following CSS snippet reproduces the above expectations:</p>

<pre class="css">@namespace url(http://www.w3.org/1999/xhtml);

br {
all: unset !important;
display: contents !important;
content: "\A" !important;
white-space: pre !important;
}
wbr {
all: unset !important;
display: contents !important;
content: "\200B" !important;
}</pre>

<p>However, this is not part of the user agent stylesheet rules, as inspecting the used style
of <code>br</code> and <code>wbr</code> elements does not give any of the above values.</p>

<p>(Note also that this depends on the as-of-yet unimplemented ability to specify the
<span>'content'</span> property on elements, instead of just on the <code
data-x="">::before</code> and <code data-x="">::after</code> pseudo-elements.)</p>
</div>

<h4>The <code>button</code> element</h4>

<p>The <code>button</code> element expected to render as an <span>'inline-block'</span> box
<p>The <code>button</code> element is expected to render as an <span>'inline-block'</span> box
depicting a button whose contents are the contents of the element.</p>

<p>When the <code>button</code> element's <code data-x="attr-button-type">type</code> attribute is
Expand Down

0 comments on commit f566047

Please sign in to comment.