Skip to content
This repository was archived by the owner on Sep 14, 2021. It is now read-only.
This repository was archived by the owner on Sep 14, 2021. It is now read-only.

No getComputedStyleValue on Polymer.Element? #83

@kevinpschaaf

Description

@kevinpschaaf

From @arthurevans on March 4, 2017 2:54

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

Copied from original issue: Polymer/polymer#4374

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions