You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-display] Do empty text nodes generate text runs? #1808
The behavior of Firefox looks like a bug. The script doesn't add any white space characters that should be taken into account by white-space property. Interestingly, the same issue occurs for body > div::before { content: '' } instead of prepending empty string with the script.
That's super weird, and it's definitely a bug. Different DOMs that output the same source code should not result in different CSS output, ever.
@SelenIT ::before { content: '' } is a little different, it causes the ::before pseudo-element to exist, and empty inline boxes count as content that causes a line box to exist.
Activity
SelenIT commentedon Sep 12, 2017
The behavior of Firefox looks like a bug. The script doesn't add any white space characters that should be taken into account by
white-spaceproperty. Interestingly, the same issue occurs forbody > div::before { content: '' }instead of prepending empty string with the script.fantasai commentedon Sep 14, 2017
That's super weird, and it's definitely a bug. Different DOMs that output the same source code should not result in different CSS output, ever.
@SelenIT ::before { content: '' } is a little different, it causes the ::before pseudo-element to exist, and empty inline boxes count as content that causes a line box to exist.
SelenIT commentedon Sep 14, 2017
They do, but shouldn't they be treated as "not existing for any other [than positioning out-of-flow descendants] purpose" phantom line boxes?
Loirooriol commentedon Sep 14, 2017
@fantasai If I understand correctly, you mean that
::beforeor::afterwithcontent: ''generates an empty text run.Is that correct?
fantasai commentedon Mar 21, 2018
@Loirooriol A
::beforeor::afterwithcontent: ''generates a box containing nothing.fantasai commentedon Mar 21, 2018
@SelenIT That depends on if they are assigned any other styles. :)