New issue
Advanced search Search tips

Issue 666204 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 623345



Sign in to add a comment

window.getComputedStyle(input, '::-webkit-input-placeholer') should return style for placeholder

Project Member Reported by tkent@chromium.org, Nov 17 2016

Issue description

Version: 56 canary
OS: All

What steps will reproduce the problem?
See http://stackoverflow.com/questions/28592895/trying-to-get-style-of-placeholder-attribute-of-element

What is the expected result?

What happens instead?

Please use labels and text to provide additional information.
A CSSComputedStyleDeclaration instance doesn't keep a name for PseudoWebKitCustomElement.
So, CSSComputedStyleDeclaration::styledNode() can't find a shadow element.

 

Comment 1 by r...@opera.com, Nov 17 2016

According to the CSSOM spec, only ::before and ::after is supported:

https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle

I don't know the rationale here, but file a spec issue if we think this should be supported.

Comment 2 by tkent@chromium.org, Nov 17 2016

Status: WontFix (was: Untriaged)
Oh, then I don't think we want to do this.
getComputedStyle in Firefox works with ::placeholder and ::-moz-placeholder.  It's a bug of Firefox.

It seems the spec changed to remove the ::before and ::after edge cases and getComputedStyles should support ::placeholder now.

Spec issue: https://github.com/w3c/csswg-drafts/issues/2149

CSSWG resolution tests: https://github.com/w3c/csswg-drafts/commit/4020029b187e485eed89ff53d32c315aba1f68ae

Codepen: https://codepen.io/anon/pen/ZMozqx

Please let me know if it would be more optimal to create a new issue. Thanks!

Sign in to add a comment