Skip to content

No getComputedStyleValue on Polymer.Element? #4374

@arthurevans

Description

@arthurevans

I suspect it's used significantly less frequently that updateStyles(), but it seemed kind of funky to me that we had a facade for updateStyles on Polymer.Element, but not for getComputedStyleValue.

Currently documented solution for this is:

if (ShadyCSS) {
  style = ShadyCSS.getComputedStyleValue('--something');
} else {
  style = getComputedStyle(this, '--something');
}

Which hopefully I got right. If not, it's here:

https://github.com/Polymer/docs/blame/master/app/2.0/docs/devguide/custom-css-properties.md#L361

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions