Skip to main content

media_query_to_css

Function media_query_to_css 

Source
pub fn media_query_to_css(mq: &MediaQuery) -> String
Expand description

Serialize a MediaQuery back to the condition text that follows @media, the at-rule counterpart of selector_to_css. Features keep the spelling the parser accepts and are and-joined in source order, so the result parses back to the same query.

A query with no features serializes to all: the condition that always matches, which is what MediaQuery::matches answers for an empty feature list.