---
title: "computedStyle(for:pseudoElement:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webview-swift.class/computedstyle(for:pseudoelement:)"
---

# computedStyle(for:pseudoElement:)

Returns the computed style of an element and its pseudo element.

## Declaration

```swift
func computedStyle(for element: DOMElement!, pseudoElement: String!) -> DOMCSSStyleDeclaration!
```

## Parameters

- `element`: The element whose computed style is returned.
- `pseudoElement`: The pseudo element for element.

## Return Value

Return Value An immutable object describing the computed style of element and pseudoElement according to the Cascading Style Sheets Specification at http://www.w3.org/TR/CSS21. Returns nil if the receiver doesn’t display element.

## See Also

### Getting and Setting CSS Properties

- [mediaStyle](webkit/webview-swift.class/mediastyle.md)
- [typingStyle](webkit/webview-swift.class/typingstyle.md)
- [styleDeclaration(withText:)](webkit/webview-swift.class/styledeclaration(withtext:).md)
- [applyStyle(_:)](webkit/webview-swift.class/applystyle(_:).md)
