Class Sass::Media::Query
In: lib/sass/media.rb
Parent: Object

A single media query.

    [ [ONLY | NOT]? S* media_type S* | expression ] [ AND S* expression ]*

Methods

Attributes

expressions  [RW]  The trailing expressions in the query.

When parsed as Sass code, each expression contains strings and SassScript nodes. When parsed as CSS, each one contains a single string.

@return [Array<Array<String, Sass::Script::Tree::Node>>]

modifier  [RW]  The modifier for the query.

When parsed as Sass code, this contains strings and SassScript nodes. When parsed as CSS, it contains a single string (accessible via \{resolved_modifier}).

@return [Array<String, Sass::Script::Tree::Node>]

type  [RW]  The type of the query (e.g. `"screen"` or `"print"`).

When parsed as Sass code, this contains strings and SassScript nodes. When parsed as CSS, it contains a single string (accessible via \{resolved_type}).

@return [Array<String, Sass::Script::Tree::Node>]

Public Class methods

@param modifier [Array<String, Sass::Script::Tree::Node>] See \{modifier} @param type [Array<String, Sass::Script::Tree::Node>] See \{type} @param expressions [Array<Array<String, Sass::Script::Tree::Node>>] See \{expressions}

Public Instance methods

Returns a deep copy of this query and all its children.

@return [Query]

Merges this query with another. The returned query queries for the intersection between the two inputs.

Both queries should be resolved.

@param other [Query] @return [Query?] The merged query, or nil if there is no intersection.

See \{modifier}. @return [String]

See \{type}. @return [String]

@see \{MediaQuery#to_a}

Returns the CSS for the media query.

@return [String]

Returns the Sass/SCSS code for the media query.

@param options [{Symbol => Object}] An options hash (see {Sass::CSS#initialize}). @return [String]

[Validate]