Class: Dommy::Internal::CSS::MediaQuery::Environment

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#device_pixel_ratioObject

Returns the value of attribute device_pixel_ratio

Returns:

  • (Object)

    the current value of device_pixel_ratio



25
26
27
# File 'lib/dommy/internal/css/media_query.rb', line 25

def device_pixel_ratio
  @device_pixel_ratio
end

#hoverObject

Returns the value of attribute hover

Returns:

  • (Object)

    the current value of hover



25
26
27
# File 'lib/dommy/internal/css/media_query.rb', line 25

def hover
  @hover
end

#pointerObject

Returns the value of attribute pointer

Returns:

  • (Object)

    the current value of pointer



25
26
27
# File 'lib/dommy/internal/css/media_query.rb', line 25

def pointer
  @pointer
end

#prefers_color_schemeObject

Returns the value of attribute prefers_color_scheme

Returns:

  • (Object)

    the current value of prefers_color_scheme



25
26
27
# File 'lib/dommy/internal/css/media_query.rb', line 25

def prefers_color_scheme
  @prefers_color_scheme
end

#prefers_reduced_motionObject

Returns the value of attribute prefers_reduced_motion

Returns:

  • (Object)

    the current value of prefers_reduced_motion



25
26
27
# File 'lib/dommy/internal/css/media_query.rb', line 25

def prefers_reduced_motion
  @prefers_reduced_motion
end

#viewport_heightObject

Returns the value of attribute viewport_height

Returns:

  • (Object)

    the current value of viewport_height



25
26
27
# File 'lib/dommy/internal/css/media_query.rb', line 25

def viewport_height
  @viewport_height
end

#viewport_widthObject

Returns the value of attribute viewport_width

Returns:

  • (Object)

    the current value of viewport_width



25
26
27
# File 'lib/dommy/internal/css/media_query.rb', line 25

def viewport_width
  @viewport_width
end

Class Method Details

.defaultObject



30
31
32
33
34
# File 'lib/dommy/internal/css/media_query.rb', line 30

def self.default
  new(viewport_width: 1280, viewport_height: 720, device_pixel_ratio: 1.0,
      prefers_color_scheme: "light", prefers_reduced_motion: "no-preference",
      hover: "hover", pointer: "fine")
end