New issue
Advanced search Search tips

Issue 809238 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

br with content doesnt break line

Reported by piotr.au...@gmail.com, Feb 5 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Steps to reproduce the problem:
1. Write `content` property for br selector with any string value.

Text inside br:
1. Write `content` property for br selector witn any string value.
2. Define `content` property for br::after selector with any string value and it will display the text of after.

code:
```html
<style>
br {
  content: ' ';
}
br::after {
  content: ' ';
}
</style>
<span>text<br>text</span>
```

What is the expected behavior?
Breakline and did not render text inside after.

What went wrong?
Br did'nt break line.
https://codepen.io/Piotr-Aueternum/pen/mRaMoO

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 62.0.3202.94  Channel: stable
OS Version: Ubuntu 17.10 DDE
Flash Version: 

https://codepen.io/Piotr-Aueternum/pen/mRaMoO
 

Comment 1 by e...@chromium.org, Feb 5 2018

Cc: tabatkins@chromium.org
Labels: Needs-Feedback
NextAction: 2018-02-28
What's the desired behavior here Tab? One could argue that replacing the content of a br replaces it's magic. Seems like we're the only ones with that interpretation though.
Labels: Needs-Milestone
Status: Untriaged (was: Unconfirmed)
This is totally undefined!  However, the WG's current intention is that <br> rendering is "magic" and not controlled by the 'content' property or anything else (so you don't need to reference styles when trying to do line layout for this).

After all, you can't *reproduce* <br>'s behavior via 'content' on it, or actually put any content at all in it; setting `content: "AAAAA";` doesn't cause "AAAAA" to show up instead of a linefeed.  <br> just ignores 'content' in general; it shouldn't have a magical effect here where it pays attention to it in exactly one aspect.
The NextAction date has arrived: 2018-02-28

Comment 5 by e...@chromium.org, Mar 1 2018

Cc: -tabatkins@chromium.org kojii@chromium.org
NextAction: ----
Status: Available (was: Untriaged)
Thanks for the clarification Tab.

Koji, would you mind fixing this for LayoutNG?

Components: -Blink>CSS Blink>Layout

Sign in to add a comment