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
<!doctype html><style>
.first::before, .second::after {
content: inherit;
}
</style><p>Test passes if you see two PASS lines below:</p><divclass="first" style="content: 'PA'">SS</div><divclass="second" style="content: 'SS'">PA</div>
The CSS22 spec, according to @rune-opera, said that content always computed to normal for elements. But that's gone from the new specs.
Gecko passes the above test-case, Blink and WebKit don't, presumably applying the CSS2 rule.
However, Chromium and WebKit do alert foo (note: incorrectly serialized) in the following test-case, which I suppose should alert normal per the reasoning above:
So, question is: What's the desired behavior? Should we keep content computing to normal for non-pseudos? What's the computed value of content in the string and images cases?
I personally think Gecko's behavior is sane, and less special-case-y, but would be nice to at least have a spec everyone could implement.
Figuring out what should happen in #1548 (in particular when called in elements from different documents) would be nice. Though after taking another look at the bug I mentioned (https://bugzilla.mozilla.org/show_bug.cgi?id=548397, which prevents us from removing window.getDefaultComputedStyle), that's mostly about figuring out what should happen in a display: none iframe (not necessarily when called cross-doc, though I know that's highly inconsistent).
There's extended discussion in that in whatwg/html#1813 and a bunch of related issues linked from there though.
Consider the following test-case:
The CSS22 spec, according to @rune-opera, said that
content
always computed tonormal
for elements. But that's gone from the new specs.Gecko passes the above test-case, Blink and WebKit don't, presumably applying the CSS2 rule.
However, Chromium and WebKit do alert
foo
(note: incorrectly serialized) in the following test-case, which I suppose should alertnormal
per the reasoning above:So, question is: What's the desired behavior? Should we keep
content
computing tonormal
for non-pseudos? What's the computed value ofcontent
in the string and images cases?I personally think Gecko's behavior is sane, and less special-case-y, but would be nice to at least have a spec everyone could implement.
Relevant browser bugs:
The text was updated successfully, but these errors were encountered: