Viewport

data class Viewport(val widthPx: Double, val heightPx: Double, val orientation: Orientation, val isPrint: Boolean = false)

The dimensions and media characteristics that breakpoints (media queries) are evaluated against.

Passed to resolve alongside the source spec; only the breakpoints whose conditions match this viewport contribute to the cascade. The result is captured on ResolvedSpec.viewport.

Constructors

Link copied to clipboard
constructor(widthPx: Double, heightPx: Double, orientation: Orientation, isPrint: Boolean = false)

Properties

Link copied to clipboard

The viewport height in CSS pixels; compared against min-height/max-height conditions.

Link copied to clipboard
val isPrint: Boolean = false

Whether resolution targets print media; matched against the print media type. Defaults to false (screen).

Link copied to clipboard

The viewport Orientation; compared against orientation conditions.

Link copied to clipboard

The viewport width in CSS pixels; compared against min-width/max-width conditions.