Table of Contents

Class CSSMedia

Namespace
Selenium.WebDriver.BiDi.Cdp.CSS
Assembly
Selenium.WebDriver.BiDi.Cdp.dll

CSS media rule descriptor.

public sealed record CSSMedia : IEquatable<CSSMedia>
Inheritance
CSSMedia
Implements
Inherited Members

Constructors

CSSMedia(string, string)

CSS media rule descriptor.

public CSSMedia(string Text, string Source)

Parameters

Text string

Media query text.

Source string

Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.

Properties

MediaList

Array of media queries.

public ImmutableArray<MediaQuery>? MediaList { get; init; }

Property Value

ImmutableArray<MediaQuery>?

Range

The associated rule (@media or @import) header range in the enclosing stylesheet (if available).

public SourceRange? Range { get; init; }

Property Value

SourceRange

Source

Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.

public string Source { get; init; }

Property Value

string

SourceURL

URL of the document containing the media query description.

public string? SourceURL { get; init; }

Property Value

string

StyleSheetId

Identifier of the stylesheet containing this object (if exists).

public StyleSheetId? StyleSheetId { get; init; }

Property Value

StyleSheetId

Text

Media query text.

public string Text { get; init; }

Property Value

string