New issue
Advanced search Search tips

Issue 758520 link

Starred by 1 user

Issue metadata

Status: ExternalDependency
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

CSS content: inherit doesn't work.

Project Member Reported by eco...@igalia.com, Aug 24 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)

What steps will reproduce the problem?
(1) Open the attached test-case.

What is the expected result?

There should be two PASS lines.

What happens instead?

::before and ::after aren't generated.

This doesn't seem to be a regression, per https://bugs.webkit.org/show_bug.cgi?id=18587. But I see nothing in [1] or [2] preventing the content property from inheriting.

[1]: https://drafts.csswg.org/css-pseudo/#generated-content
[2]: https://drafts.csswg.org/css-content-3/#content-property
 
test.html
241 bytes View Download

Comment 1 by r...@opera.com, Aug 24 2017

The css22 spec says it always computes to 'normal' for elements, which makes inheritance useless.

For https://drafts.csswg.org/css-content-3/#content-property the spec doesn't say what the computed value is in the case of strings and images.

Comment 2 by eco...@igalia.com, Aug 24 2017

Hmm... Good point. Will file a spec issue to see how this is supposed to work.

Comment 3 by eco...@igalia.com, Aug 24 2017

In any case, the following alerts "foo" on Blink, per comment 1, I'd expect it to alert normal...

<!doctype html>
<p id="test" style="content: 'foo'"></p>
<script>
alert(getComputedStyle(test).content);
</script>

Comment 4 by eco...@igalia.com, Aug 24 2017

I found https://bugs.chromium.org/p/chromium/issues/detail?id=758596 while playing with this. :(
Status: ExternalDependency (was: Untriaged)
marking as ExternalDependency as this seems to be blocked on feedback from the spec issue
Aslo, @ecobos, is this an interop issue? Do you know if FF or Edge or Safari behave differently to Chrome here?
Labels: Hotlist-Interop
Labels: Update-Quarterly

Comment 9 by eco...@igalia.com, Aug 28 2017

Yes, Gecko at least passes the test-case above. Not sure about Edge. WebKit does the same think as Blink.

I opened https://github.com/w3c/csswg-drafts/issues/1757.
Labels: -Update-Quarterly

Sign in to add a comment