Clay.Media

clay-0.15.0: CSS preprocessor as embedded Haskell.

Safe Haskell | None
Language | Haskell2010

Clay.Media

Contents

- Media types.
  - Deprecated.
- Geometrical features.
- Aspect ratio features.
- Color related features.
- Resolution related features.
- Resolution value type.
- Preference related features.
  - Preference related values.

Synopsis

- all :: MediaType
- screen :: MediaType
- print :: MediaType
- aural :: MediaType
- braille :: MediaType
- handheld :: MediaType
- projection :: MediaType
- tty :: MediaType
- tv :: MediaType
- embossed :: MediaType
- width :: Size LengthUnit -> Feature
- minWidth :: Size LengthUnit -> Feature
- maxWidth :: Size LengthUnit -> Feature
- height :: Size LengthUnit -> Feature
- minHeight :: Size LengthUnit -> Feature
- maxHeight :: Size LengthUnit -> Feature
- deviceWidth :: Size LengthUnit -> Feature
- minDeviceWidth :: Size LengthUnit -> Feature
- maxDeviceWidth :: Size LengthUnit -> Feature
- deviceHeight :: Size LengthUnit -> Feature
- minDeviceHeight :: Size LengthUnit -> Feature
- maxDeviceHeight :: Size LengthUnit -> Feature
- aspectRatio :: (Integer, Integer) -> Feature
- minAspectRatio :: (Integer, Integer) -> Feature
- maxAspectRatio :: (Integer, Integer) -> Feature
- deviceAspectRatio :: (Integer, Integer) -> Feature
- minDeviceAspectRatio :: (Integer, Integer) -> Feature
- maxDeviceAspectRatio :: (Integer, Integer) -> Feature
- color :: Feature
- monochrome :: Feature
- scan :: Feature
- grid :: Feature
- minColor :: Integer -> Feature
- maxColor :: Integer -> Feature
- colorIndex :: Integer -> Feature
- minColorIndex :: Integer -> Feature
- maxColorIndex :: Integer -> Feature
- minMonochrome :: Integer -> Feature
- maxMonochrome :: Integer -> Feature
- resolution :: Val a => a -> Feature
- minResolution :: Val a => a -> Feature
- maxResolution :: Val a => a -> Feature
- data Resolution
- dpi :: Integer -> Resolution
- dppx :: Integer -> Resolution
- prefersColorScheme :: ColorScheme -> Feature
- data ColorScheme
- light :: ColorScheme
- dark :: ColorScheme

# Media types.

all :: MediaType #

Suitable for all devices.

screen :: MediaType #

Intended primarily for screen-based devices.

print :: MediaType #

Intended primarily for printed material or in a print layout.

## Deprecated.

These media types were deprecated by Media Queries 4.

aural :: MediaType #

braille :: MediaType #

handheld :: MediaType #

projection :: MediaType #

tty :: MediaType #

tv :: MediaType #

embossed :: MediaType #

# Geometrical features.

width :: Size LengthUnit -> Feature #

minWidth :: Size LengthUnit -> Feature #

maxWidth :: Size LengthUnit -> Feature #

height :: Size LengthUnit -> Feature #

minHeight :: Size LengthUnit -> Feature #

maxHeight :: Size LengthUnit -> Feature #

deviceWidth :: Size LengthUnit -> Feature #

minDeviceWidth :: Size LengthUnit -> Feature #

maxDeviceWidth :: Size LengthUnit -> Feature #

deviceHeight :: Size LengthUnit -> Feature #

minDeviceHeight :: Size LengthUnit -> Feature #

maxDeviceHeight :: Size LengthUnit -> Feature #

# Aspect ratio features.

aspectRatio :: (Integer, Integer) -> Feature #

minAspectRatio :: (Integer, Integer) -> Feature #

maxAspectRatio :: (Integer, Integer) -> Feature #

deviceAspectRatio :: (Integer, Integer) -> Feature #

minDeviceAspectRatio :: (Integer, Integer) -> Feature #

maxDeviceAspectRatio :: (Integer, Integer) -> Feature #

# Color related features.

color :: Feature #

monochrome :: Feature #

scan :: Feature #

grid :: Feature #

minColor :: Integer -> Feature #

maxColor :: Integer -> Feature #

colorIndex :: Integer -> Feature #

minColorIndex :: Integer -> Feature #

maxColorIndex :: Integer -> Feature #

minMonochrome :: Integer -> Feature #

maxMonochrome :: Integer -> Feature #

# Resolution related features.

resolution :: Val a => a -> Feature #

minResolution :: Val a => a -> Feature #

maxResolution :: Val a => a -> Feature #

# Resolution value type.

data Resolution #

#### Instances

Instances details

Other Resolution # |
Instance details Defined in Clay.Media Methods other :: Value -> Resolution #
Val Resolution # |
Instance details Defined in Clay.Media Methods value :: Resolution -> Value #

dpi :: Integer -> Resolution #

dppx :: Integer -> Resolution #

# Preference related features.

prefersColorScheme :: ColorScheme -> Feature #

Feature detecting whether user prefers light or dark color scheme.

## Preference related values.

data ColorScheme #

A color scheme preferred by a user.

#### Instances

Instances details

Other ColorScheme # |
Instance details Defined in Clay.Media Methods other :: Value -> ColorScheme #
Val ColorScheme # |
Instance details Defined in Clay.Media Methods value :: ColorScheme -> Value #

light :: ColorScheme #

User indicates that they prefer a light theme with their interface, or that they have not indicated a preference.

dark :: ColorScheme #

User indicates that they prefer a dark theme with their interface.