Module

CSS

Re-exports from CSS.Animation

#FillMode

#normalAnimationDirection

#forwards

#backwards

Re-exports from CSS.Background

#Loc

class (Val a) <= Loc a  where

Members

Instances

#straight

#sideTop

sideTop :: Side

We have to prefix these values to avoid conflict with existing property

#sideRight

#sideMiddle

#sideLeft

#sideCenter

#sideBottom

#positioned

positioned :: forall a. Size a -> Size a -> BackgroundPosition

#by

by :: forall a b. Size a -> Size b -> BackgroundSize

#backgroundSize

#backgroundRepeat

#backgroundPosition

#backgroundOrigin

#backgroundImage

#backgroundColor

#backgroundClip

#angular

angular :: forall a. Angle a -> Direction

Re-exports from CSS.Border

#Stroke

newtype Stroke

Constructors

Instances

#wavy

#solid

#ridge

#outset

#inset

#groove

#double

#dotted

#dashed

#borderTop

#borderSpacing

borderSpacing :: forall a. Size a -> CSS

#borderRight

#borderRadius

borderRadius :: forall a. Size a -> Size a -> Size a -> Size a -> CSS

#borderLeft

#borderColor

#borderBottom

#border

Re-exports from CSS.Box

#paddingBox

paddingBox :: BoxType

DEPRECATED

#insetBoxShadow

insetBoxShadow :: forall a. Stroke -> Size a -> Size a -> Size a -> Color -> CSS

#contentBox

#boxSizing

#boxShadow

boxShadow :: forall a. Size a -> Size a -> Size a -> Color -> CSS

#borderBox

Re-exports from CSS.Color

#ColorSpace

data ColorSpace

Definition of a color space.

  • RGB: red, green, blue
  • HSL: hue, saturation, lightness
  • LCh: Lightness, chroma, hue
  • Lab: Lightness, a, b

Constructors

#Color

data Color

The representation of a color.

Note:

  • The Eq instance compares two Colors by comparing their (integer) RGB values. This is different from comparing the HSL values (for example, HSL has many different representations of black (arbitrary hue and saturation values).
  • Colors outside the sRGB gamut which cannot be displayed on a typical computer screen can not be represented by Color.

Instances

#yellowgreen

#yellow

#xyz

xyz :: Number -> Number -> Number -> Color

Create a Color from XYZ coordinates in the CIE 1931 color space. Note that a Color always represents a color in the sRGB gamut (colors that can be represented on a typical computer screen) while the XYZ color space is bigger. This function will tend to create fully saturated colors at the edge of the sRGB gamut if the coordinates lie outside the sRGB range.

See:

#whitesmoke

#white

white :: Color

Pure white.

#wheat

#violet

#turquoise

#tomato

#toXYZ

toXYZ :: Color -> { x :: Number, y :: Number, z :: Number }

Get XYZ coordinates according to the CIE 1931 color space.

See:

#toRGBA'

toRGBA' :: Color -> { a :: Number, b :: Number, g :: Number, r :: Number }

Convert a Color to its red, green, blue and alpha values. All values are numbers in the range from 0.0 to 1.0.

#toRGBA

toRGBA :: Color -> { a :: Number, b :: Int, g :: Int, r :: Int }

Convert a Color to its red, green, blue and alpha values. The RGB values are integers in the range from 0 to 255. The alpha channel is a number between 0.0 and 1.0.

#toLab

toLab :: Color -> { a :: Number, b :: Number, l :: Number }

Get L, a and b coordinates according to the Lab color space.

See: https://en.wikipedia.org/wiki/Lab_color_space

#toLCh

toLCh :: Color -> { c :: Number, h :: Number, l :: Number }

Get L, C and h coordinates according to the CIE LCh color space.

See: https://en.wikipedia.org/wiki/Lab_color_space

#toHexString

toHexString :: Color -> String

Return a hexadecimal representation of the color in the form #rrggbb, where rr, gg and bb refer to hexadecimal digits corresponding to the RGB channel values between 00 and ff. The alpha channel is not represented.

#toHSLA

toHSLA :: Color -> { a :: Number, h :: Number, l :: Number, s :: Number }

Convert a Color to its Hue, Saturation, Lightness and Alpha values. See hsla for the ranges of each channel.

#toGray

toGray :: Color -> Color

Convert a color to a gray tone with the same perceived luminance (see luminance).

#thistle

#textColor

textColor :: Color -> Color

Return a readable foreground text color (either black or white) for a given background color.

#teal

#tan

#steelblue

#springgreen

#snow

#slategrey

#slategray

#slateblue

#skyblue

#silver

#sienna

#seashell

#seagreen

#saturate

saturate :: Number -> Color -> Color

Increase the saturation of a color by adding a certain amount (number between -1.0 and 1.0) to the saturation channel. If the number is negative, the color is desaturated.

#sandybrown

#salmon

#saddlebrown

#royalblue

#rotateHue

rotateHue :: Number -> Color -> Color

Rotate the hue of a Color by a certain angle (in degrees).

#rosybrown

#rgba'

rgba' :: Number -> Number -> Number -> Number -> Color

Create a Color from RGB and alpha values between 0.0 and 1.0.

#rgba

rgba :: Int -> Int -> Int -> Number -> Color

Create a Color from integer RGB values between 0 and 255 and a floating point alpha value between 0.0 and 1.0.

#rgb'

rgb' :: Number -> Number -> Number -> Color

Create a Color from RGB values between 0.0 and 1.0.

#rgb

rgb :: Int -> Int -> Int -> Color

Create a Color from integer RGB values between 0 and 255.

#red

#purple

#powderblue

#plum

#pink

#peru

#peachpuff

#papayawhip

#palevioletred

#paleturquoise

#palegreen

#palegoldenrod

#orchid

#orangered

#orange

#olivedrab

#olive

#oldlace

#navy

#navajowhite

#moccasin

#mix

mix :: ColorSpace -> Interpolator

Mix two colors by linearly interpolating between them in the specified color space. For the HSL colorspace, the shortest path is chosen along the circle of hue values.

#mistyrose

#mintcream

#midnightblue

#mediumvioletred

#mediumturquoise

#mediumspringgreen

#mediumslateblue

#mediumseagreen

#mediumpurple

#mediumorchid

#mediumblue

#mediumaquamarine

#maroon

#magenta

#luminance

luminance :: Color -> Number

The relative brightness of a color (normalized to 0.0 for darkest black and 1.0 for lightest white), according to the WCAG definition.

See: https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef

#linen

#limegreen

#lime

#lightyellow

#lightsteelblue

#lightslategrey

#lightslategray

#lightskyblue

#lightseagreen

#lightsalmon

#lightpink

#lightgrey

#lightgreen

#lightgray

#lightgoldenrodyellow

#lighten

lighten :: Number -> Color -> Color

Lighten a color by adding a certain amount (number between -1.0 and 1.0) to the lightness channel. If the number is negative, the color is darkened.

#lightcyan

#lightcoral

#lightblue

#lemonchiffon

#lch

lch :: Number -> Number -> Number -> Color

Create a Color from lightness, chroma and hue coordinates in the CIE LCh color space. This is a cylindrical transform of the Lab color space. Note: See documentation for xyz. The same restrictions apply here.

See: https://en.wikipedia.org/wiki/Lab_color_space

#lawngreen

#lavenderblush

#lavender

#lab

lab :: Number -> Number -> Number -> Color

Create a Color from L, a and b coordinates coordinates in the Lab color space. Note: See documentation for xyz. The same restrictions apply here.

See: https://en.wikipedia.org/wiki/Lab_color_space

#khaki

#ivory

#isReadable

isReadable :: Color -> Color -> Boolean

Determine whether text of one color is readable on a background of a different color (see contrast). This function is symmetric in both arguments.

isReadable c1 c2 = contrast c1 c2 > 4.5

#isLight

isLight :: Color -> Boolean

Determine whether a color is perceived as a light color.

isLight c = brightness c > 0.5

#indigo

#indianred

#hsla

hsla :: Number -> Number -> Number -> Number -> Color

Create a Color from Hue, Saturation, Lightness and Alpha values. The Hue is given in degrees, as a Number between 0.0 and 360.0. Saturation, Lightness and Alpha are numbers between 0.0 and 1.0.

#hsl

hsl :: Number -> Number -> Number -> Color

Create a Color from Hue, Saturation and Lightness values. The Hue is given in degrees, as a Number between 0.0 and 360.0. Both Saturation and Lightness are numbers between 0.0 and 1.0.

#hotpink

#honeydew

#grey

#greenyellow

#green

#graytone

graytone :: Number -> Color

Create a gray tone from a lightness values (0.0 is black, 1.0 is white).

#gray

#goldenrod

#gold

#ghostwhite

#gainsboro

#fuchsia

#fromInt

fromInt :: Int -> Color

Converts an integer to a color (RGB representation). 0 is black and 0xffffff is white. Values outside this range will be clamped.

This function is useful if you want to hard-code Hex values. For example:

red = fromInt 0xff0000

#fromHexString

fromHexString :: String -> Maybe Color

Parse a hexadecimal RGB code of the form #rgb or #rrggbb. The # character is required. Each hexadecimal digit is of the form [0-9a-fA-F] (case insensitive). Returns Nothing if the string is in a wrong format.

#forestgreen

#floralwhite

#firebrick

#dodgerblue

#distance

distance :: Color -> Color -> Number

Compute the perceived 'distance' between two colors according to the CIE76 delta-E standard. A distance below ~2.3 is not noticable.

See: https://en.wikipedia.org/wiki/Color_difference

#dimgrey

#dimgray

#desaturate

desaturate :: Number -> Color -> Color

Decrease the saturation of a color by subtracting a certain amount (number between -1.0 and 1.0) from the saturation channel. If the number is negative, the color is saturated.

#deepskyblue

#deeppink

#darkviolet

#darkturquoise

#darkslategrey

#darkslategray

#darkslateblue

#darkseagreen

#darksalmon

#darkred

#darkorchid

#darkorange

#darkolivegreen

#darkmagenta

#darkkhaki

#darkgrey

#darkgreen

#darkgray

#darkgoldenrod

#darken

darken :: Number -> Color -> Color

Darken a color by subtracting a certain amount (number between -1.0 and 1.0) from the lightness channel. If the number is negative, the color is lightened.

#darkcyan

#darkblue

#cyan

#cssStringRGBA

cssStringRGBA :: Color -> String

A CSS representation of the color in the form rgb(..) or rgba(...).

#cssStringHSLA

cssStringHSLA :: Color -> String

A CSS representation of the color in the form hsl(..) or hsla(...).

#crimson

#cornsilk

#cornflowerblue

#coral

#contrast

contrast :: Color -> Color -> Number

The contrast ratio of two colors. A minimum contrast ratio of 4.5 is recommended to ensure that text is readable on a colored background. The contrast ratio is symmetric on both arguments: contrast c1 c2 == contrast c2 c1.

See http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef

#complementary

complementary :: Color -> Color

Get the complementary color (hue rotated by 180°).

#chocolate

#chartreuse

#cadetblue

#burlywood

#brown

#brightness

brightness :: Color -> Number

The percieved brightness of the color (A number between 0.0 and 1.0).

See: https://www.w3.org/TR/AERT#color-contrast

#blueviolet

#blue

#blanchedalmond

#black

black :: Color

Pure black.

#bisque

#beige

#azure

#aquamarine

#aqua

#antiquewhite

#aliceblue

Re-exports from CSS.Cursor

#Cursor

#cursor

Re-exports from CSS.Display

#Position

#Display

newtype Display

Constructors

Instances

#zIndex

zIndex :: Int -> CSS

#tableRowGroup

#tableRow

#tableHeaderGroup

#tableFooterGroup

#tableColumnGroup

#tableColumn

#tableCell

#tableCaption

#table

#static

#runIn

#relative

#position

#opacity

#listItem

#inlineTable

#inlineGrid

#inlineFlex

#inlineBlock

#inline

#grid

#floatRight

#floatLeft

#float

#flex

#fixed

#displayNone

#displayInherit

#display

#clearRight

#clearLeft

#clearInlineStart

#clearInlineEnd

#clearBoth

#clear

#block

#absolute

Re-exports from CSS.Elements

#var

#thead

#tfoot

#textarea

#tbody

#sup

#summary

#sub

#strong

#span

#small

#section

#samp

#progress

#pre

#output

#optgroup

#object

#nav

#meter

#mark

#map

#main

#legend

#label

#kbd

#ins

#input

#img

#iframe

#html

#header

#form

#footer

#figure

#figcaption

#fieldset

#embed

#div

#dfn

#details

#del

#datalist

#colgroup

#col

#code

#cite

#caption

#canvas

#button

#body

#blockquote

#bdo

#bdi

#audio

#aside

#article

#area

#address

#abbr

Re-exports from CSS.Flexbox

#wrapReverse

#wrap

#order

order :: Int -> CSS

#nowrap

#flexWrap

#flexShrink

#flexGrow

#flexDirection

#flexBasis

flexBasis :: forall a. Size a -> CSS

#columnReverse

#alignSelf

Re-exports from CSS.Font

#lighter

#fontWeight

#fontSize

fontSize :: forall a. Size a -> CSS

#color

Re-exports from CSS.FontFace

#fontFaceFamily

Re-exports from CSS.FontStyle

#fontStyle

Re-exports from CSS.Geometry

#width

width :: forall a. Size a -> CSS

#top

top :: forall a. Size a -> CSS

#right

right :: forall a. Size a -> CSS

#paddingTop

paddingTop :: forall a. Size a -> CSS

#paddingRight

paddingRight :: forall a. Size a -> CSS

#paddingLeft

paddingLeft :: forall a. Size a -> CSS

#paddingBottom

paddingBottom :: forall a. Size a -> CSS

#padding

padding :: forall a. Size a -> Size a -> Size a -> Size a -> CSS

#minWidth

minWidth :: forall a. Size a -> CSS

#minHeight

minHeight :: forall a. Size a -> CSS

#maxWidth

maxWidth :: forall a. Size a -> CSS

#maxHeight

maxHeight :: forall a. Size a -> CSS

#marginTop

marginTop :: forall a. Size a -> CSS

#marginRight

marginRight :: forall a. Size a -> CSS

#marginLeft

marginLeft :: forall a. Size a -> CSS

#marginBottom

marginBottom :: forall a. Size a -> CSS

#margin

margin :: forall a. Size a -> Size a -> Size a -> Size a -> CSS

#lineHeight

lineHeight :: forall a. Size a -> CSS

#left

left :: forall a. Size a -> CSS

#height

height :: forall a. Size a -> CSS

#bottom

bottom :: forall a. Size a -> CSS

Re-exports from CSS.Gradient

#Ramp

#vRepeatingGradient

#repeatingRadialGradient

#repeatingLinearGradient

#radialGradient

radialGradient :: forall l. Loc l => l -> Radial -> Ramp -> BackgroundImage

#hRepeatingGradient

#farthestSide

#farthestCorner

#elliptical

elliptical :: forall a. Size a -> Size a -> Radial

#ellipse

#closestSide

#closestCorner

#circular

#circle

Re-exports from CSS.Property

#Literal

newtype Literal

Constructors

Instances

#Key

newtype Key a

Constructors

Instances

#Val

class Val a  where

Members

Instances

#quote

#plain

#noCommas

noCommas :: forall a. Val a => Array a -> Value

#cast

cast :: forall a. Key a -> Key Unit

#(!)

Operator alias for Data.Tuple.Tuple (right-associative / precedence 9)

Re-exports from CSS.Pseudo

Re-exports from CSS.Render

#Sheet

#Rendered

#sepWith

#selector

#rule'

rule' :: forall a. Array App -> Array (Tuple (Key a) Value) -> Rendered

#renderedSheet

#renderedInline

#render

render :: forall a. StyleM a -> Rendered

#putStyleSheet

#putInline

#predicate

#nel

nel :: forall a. Array a -> Maybe (NonEmpty Array a)

#mediaType

#mediaQuery

#imp

#getSheet

#getInline

#frame

#feature

#collect

Re-exports from CSS.Selector

#Path

data Path f

Constructors

Instances

#star

star :: Selector

The star selector applies to all elements. Maps to * in CSS.

#pseudo

pseudo :: String -> Refinement

Filter elements by pseudo selector or pseudo class. The preferred syntax is to use :pseudo-selector or use one of the predefined ones from CSS.Pseudo.

#func

func :: String -> Array String -> Refinement

Filter elements by pseudo selector functions. The preferred way is to use one of the predefined functions from CSS.Pseudo.

#element

element :: String -> Selector

Select elements by name.

#byId

byId :: String -> Refinement

Filter elements by id.

#byClass

byClass :: String -> Refinement

Filter elements by class.

#attr

attr :: String -> Refinement

Filter elements based on the presence of a certain attribute.

#(~=)

Operator alias for CSS.Selector.attrSpace (non-associative / precedence 6)

#(|>)

Operator alias for CSS.Selector.child (non-associative / precedence 6)

#(|=)

Operator alias for CSS.Selector.attrHyph (non-associative / precedence 6)

#(|+)

Operator alias for CSS.Selector.adjacent (non-associative / precedence 6)

#(|*)

Operator alias for CSS.Selector.deep (non-associative / precedence 6)

#(^=)

Operator alias for CSS.Selector.attrBegins (non-associative / precedence 6)

#(@=)

Operator alias for CSS.Selector.attrVal (non-associative / precedence 6)

#(*=)

Operator alias for CSS.Selector.attrContains (non-associative / precedence 6)

#(&)

Operator alias for CSS.Selector.with (non-associative / precedence 6)

#($=)

Operator alias for CSS.Selector.attrEnds (non-associative / precedence 6)

Re-exports from CSS.Size

#Size

newtype Size a

Constructors

Instances

#Rel

data Rel

#Rad

data Rad

#Deg

data Deg

#Angle

newtype Angle a

Constructors

Instances

#Abs

data Abs

#vw

vw :: Number -> Size Rel

Size in vw's (1vw = 1% of viewport width).

#vmin

vmin :: Number -> Size Rel

Size in vmin's (the smaller of vw or vh).

#vmax

vmax :: Number -> Size Rel

Size in vmax's (the larger of vw or vh).

#vh

vh :: Number -> Size Rel

Size in vh's (1vh = 1% of viewport height).

#sym

sym :: forall a b. (a -> a -> a -> a -> b) -> a -> b

#rem

rem :: Number -> Size Rel

Size in rem's.

#rad

rad :: Number -> Angle Rad

Angle in radians.

#px

px :: Number -> Size Abs

Size in pixels.

#pt

pt :: Number -> Size Abs

Size in points (1pt = 1/72 of 1in).

#pct

pct :: Number -> Size Rel

SimpleSize in percents.

#nil

nil :: forall a. Size a

Zero size.

#ex

ex :: Number -> Size Abs

Size in ex'es (x-height of the first avaliable font).

#em

em :: Number -> Size Abs

Size in em's.

#deg

deg :: Number -> Angle Deg

Angle in degrees.

Re-exports from CSS.String

#IsString

class IsString s  where

Members

Instances

Re-exports from CSS.Stylesheet

#NotOrOnly

data NotOrOnly

Constructors

Instances

#MediaType

newtype MediaType

Constructors

Instances

#Feature

data Feature

Constructors

Instances

#CSS

type CSS = StyleM Unit

#select

#runS

runS :: forall a. StyleM a -> Array Rule

#rule

rule :: Rule -> CSS

#prefixed

prefixed :: forall a. Val a => Prefixed -> a -> CSS

#keyframesFromTo

#key

key :: forall a. Val a => Key a -> a -> CSS

#importUrl

#fontFace

#(?)

Operator alias for CSS.Stylesheet.select (right-associative / precedence 5)

Re-exports from CSS.Text

#textDecoration

#noneTextDecoration

#letterSpacing

letterSpacing :: forall a. Size a -> CSS

Re-exports from CSS.Text.Overflow

#textOverflow

Re-exports from CSS.Text.Transform

#textTransform

Re-exports from CSS.Text.Whitespace

#whitespacePreWrap

#whitespacePreLine

#whitespaceNormal

#whitespaceNoWrap

#textWhitespace

Re-exports from CSS.Time

#Time

newtype Time

Constructors

Instances

#sec

#ms

ms :: Number -> Time

Re-exports from CSS.Transform

#translate

translate :: forall a b. Size a -> Size b -> Transformation

#transformOrigin

#transform

#rotate

rotate :: forall a. Angle a -> Transformation

#offsetTop

#offsetRight

#offsetLeft

#offsetCenter

#offsetBottom

#offset

offset :: forall a. Size a -> TransformOriginOffset a

Re-exports from CSS.Transition

#transitionTimingFunctions

#transitionTimingFunction

#transitionProperty

#transitionProperties

#transitionDurations

#transitionDuration

#transitionDelays

#transitionDelay

#transition

Modules