One Logo Pool Ball
WebKit · IOS API REFERENCE

WebPage.CSSMediaType

struct · iOS 26.0+ · SDK 27.1

struct CSSMediaType

A CSS media type as defined by the [CSS specification](https://www.w3.org/TR/mediaqueries-4/#media-types), or an arbitrary media type value. Media types are one of several media queries that influence the `@media` CSS at-rule; this rule is used by webpages to apply parts of a style sheet depending on the media properties specified. You can customize the media type of a ``WebPage`` by using the ``WebPage/mediaType`` property.

Members (5)

get · iOS 26.0+

all

TypeScript
get all(): Promise<WebPage_CSSMediaType>
Swift declaration
static let all: WebPage.CSSMediaType

Corresponds to the "all" media type.

get · iOS 26.0+

print

TypeScript
get print(): Promise<WebPage_CSSMediaType>
Swift declaration
static let print: WebPage.CSSMediaType

Corresponds to the "print" media type.

get · iOS 26.0+

screen

TypeScript
get screen(): Promise<WebPage_CSSMediaType>
Swift declaration
static let screen: WebPage.CSSMediaType

Corresponds to the "screen" media type.

init · iOS 26.0+

init

TypeScript
init(rawValue: string): Promise<WebPage_CSSMediaType>
Swift declaration
init(rawValue: String)

Create a media type with an arbitrary value. Use the static type properties for the defined canonical CSS media type options. - Parameter rawValue: The raw value of the media type.

get · iOS 26.0+

rawValue

TypeScript
getRawValue($self: WebPage_CSSMediaType): Promise<string>
Swift declaration
let rawValue: String

The raw value of the media type.

Skipped declarations

No declarations were skipped in this snapshot.

All WebKit types →