getComputedStyle method - Element class - dart:html library (original) (raw)
CssStyleDeclaration getComputedStyle([
- String? pseudoElement ])
The set of all CSS values applied to this element, including inherited and default values.
The computedStyle contains values that are inherited from other sources, such as parent elements or stylesheets. This differs from thestyle property, which contains only the values specified directly on this element.
PseudoElement can be values such as ::after
, ::before
, ::marker
,::line-marker
.
See also:
- Cascade and Inheritancefrom MDN.
- Pseudo-elementsfrom MDN.
Implementation
CssStyleDeclaration getComputedStyle([String? pseudoElement]) {
if (pseudoElement == null) {
pseudoElement = '';
}
// TODO(jacobr): last param should be null, see b/5045788
return window._getComputedStyle(this, pseudoElement);
}