Struct style::servo::media_queries::Device [] [src]

pub struct Device { /* fields omitted */ }

A device is a structure that represents the current media a given document is displayed in.

This is the struct against which media queries are evaluated.

Methods

impl Device
[src]

[src]

Trivially construct a new Device.

[src]

Return the default computed values for this device.

[src]

Get the font size of the root element (for rem)

[src]

Set the font size of the root element (for rem)

[src]

Sets the body text color for the "inherit color from body" quirk.

https://quirks.spec.whatwg.org/#the-tables-inherit-color-from-body-quirk

[src]

Returns whether we ever looked up the root font size of the Device.

[src]

Returns the viewport size of the current device in app units, needed, among other things, to resolve viewport units.

[src]

Like the above, but records that we've used viewport units.

[src]

Whether viewport units were used since the last device change.

[src]

Returns the device pixel ratio.

[src]

Take into account a viewport rule taken from the stylesheets.

[src]

Return the media type of the current device.

[src]

Returns whether document colors are enabled.

[src]

Returns the default background color.

Trait Implementations

impl MallocSizeOf for Device
[src]

[src]

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more