IViewCSSGetComputedStyle Method (Element)

The IViewCSS.getComputedStyle() method returns an object containing the values of all CSS properties of an element, after applying active stylesheets and resolving any basic computation those values may contain.

Individual CSS property values are accessed through APIs provided by the object, or by indexing with CSS property names.

Namespace: Aspose.Html.Dom.Css
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 21.11
Syntax
ICSSStyleDeclaration GetComputedStyle(
	Element element
)

Parameters

element
Type: Aspose.Html.DomElement

The Element for which to get the computed style. This parameter cannot be null.

Return Value

Type: ICSSStyleDeclaration

The returned style is a live CSSStyleDeclaration object, which updates automatically when the element's styles are changed.

Exceptions
ExceptionCondition
TypeError

If the passed object is not an Element or the pseudoElt is not a valid pseudo-element selector.

Remarks

CSSOM defines APIs (including generic parsing and serialization rules) for Media Queries, Selectors, and of course CSS itself.

Reference

See Also