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 15048 - Correct br element rule in user agent stylesheet
Summary: Correct br element rule in user agent stylesheet
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-02 22:06 UTC by Sylvain Galineau
Modified: 2011-12-05 10:44 UTC (History)
7 users (show)

See Also:


Attachments

Description Sylvain Galineau 2011-12-02 22:06:53 UTC
In section 10.3.4 [1], we current have:

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

It should be:

br::before { content: '\A'; white-space: pre-line; }



http://dev.w3.org/html5/spec/Overview.html#phrasing-content-1
Comment 1 Ian 'Hixie' Hickson 2011-12-03 03:56:49 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: The current rule is as intended. The whole element's contents get replaced by the newline, now the ::before pseudo. (This relies on CSS3 Generated Content which applies 'content' to all elements, not just pseudos.)
Comment 2 Anne 2011-12-03 09:00:03 UTC
In particular, if you would use ::before elements inserted into <br> through the DOM would end up being rendered, which is not what you want.
Comment 3 Simon Pieters 2011-12-05 10:40:52 UTC
Any difference between using 'pre' and 'pre-line'?
Comment 4 Anne 2011-12-05 10:44:08 UTC
Not if the sole content is a newline.
Comment 5 Anne 2011-12-05 10:44:51 UTC
The difference is observable of course through getComputedStyle().