This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25503 - How should <br> styling be defined
Summary: How should <br> styling be defined
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: Display (show other bugs)
Version: unspecified
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Tab Atkins Jr.
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-29 17:11 UTC by Ian 'Hixie' Hickson
Modified: 2014-09-04 22:06 UTC (History)
7 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2014-04-29 17:11:34 UTC
Tab suggests:

br {
  display-box: contents;
  content: "\A";
  white-space: pre;
}

(The current spec doesn't work because it suggests browsers should by default honour 'border' et al, which browsers don't. They _do_ honour 'display:none', they don't honour 'display:inline', some honour 'position:fixed' or 'float:left'.)
Comment 1 Ian 'Hixie' Hickson 2014-04-30 18:26:52 UTC
dbaron raised performance issues around doing anything relying on CSS for <br>, which is an interesting point.
Comment 2 Ian 'Hixie' Hickson 2014-05-05 23:24:20 UTC
dbaron: in thinking of this further... why would 'display-box' have performance implications that 'display' doesn't have?
Comment 3 L. David Baron (Mozilla) 2014-05-05 23:45:59 UTC
display-box: contents essentially forces the insertion of one element's child list into its parent, in place of that element, for purposes of figuring out what rendering tree (box tree) to construct.  This might make handling of dynamic changes to anything in the child list of the parent more expensive, because the box tree is shaped less like the element tree and we have to disable optimizations that can only work when they look similar.
Comment 4 Ian 'Hixie' Hickson 2014-05-06 18:29:19 UTC
Ah, I see. So what we really want is 'display-box: newline' or some such.
Comment 5 Ian 'Hixie' Hickson 2014-07-21 21:14:03 UTC
http://krijnhoetmer.nl/irc-logs/whatwg/20140721#l-529
Comment 6 Ian 'Hixie' Hickson 2014-09-04 22:06:24 UTC
http://krijnhoetmer.nl/irc-logs/whatwg/20140904#l-890
Comment 7 contributor 2014-09-04 22:06:40 UTC
Checked in as WHATWG revision r8745.
Check-in comment: Update how 'br' is specced at the CSS level. This depends on as-yet incomplete CSS changes.
http://html5.org/tools/web-apps-tracker?from=8744&to=8745