Class: Dommy::Internal::CSS::Parser::MediaRule

Inherits:
Struct
  • Object
show all
Defined in:
lib/dommy/internal/css/parser.rb

Overview

Grouping at-rules (CSS conditional rules): their block contributes its rules to the cascade only when the rule is "active" (RuleIndex decides — @media query matches, @supports condition holds, @layer always). The block is flattened in source order; @layer ordering and @supports/@media precedence beyond source order are out of scope.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#conditionObject

Returns the value of attribute condition

Returns:

  • (Object)

    the current value of condition



32
33
34
# File 'lib/dommy/internal/css/parser.rb', line 32

def condition
  @condition
end

#rulesObject

Returns the value of attribute rules

Returns:

  • (Object)

    the current value of rules



32
33
34
# File 'lib/dommy/internal/css/parser.rb', line 32

def rules
  @rules
end

Instance Method Details

#grouping?Boolean

Returns:

  • (Boolean)


33
# File 'lib/dommy/internal/css/parser.rb', line 33

def grouping? = true