Skip to main content
Go to Latest
interface default.CSS.CSSMedia
import { type default } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/api-docs-entry.js";
const { CSSMedia } = default.CSS;

CSS media rule descriptor.

Properties

text: string

Media query text.

source: (
| "mediaRule"
| "importRule"
| "linkedSheet"
| "inlineSheet"
)

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. (CSSMediaSource enum)

optional
sourceURL: string

URL of the document containing the media query description.

optional
range: SourceRange

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

optional
styleSheetId: StyleSheetId

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

optional
mediaList: MediaQuery[]

Array of media queries.