Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
interface Protocol.CSS.CSSMedia
import { type Protocol } from "https://deno.land/x/pptr@1.2.0/vendor/devtools-protocol/protocol.d.ts";
const { CSSMedia } = Protocol.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.