dzuk-mutant/elm-css/2.1.0

NOTE: the latest version is 3.0.1

Css

If you need something that elm-css does not support right now, the Css.property and Css.Global.selector functions let you define custom properties and selectors, respectively.

Reusable Styles

type alias Style =
Style

A CSS property (such as color), or multiple properties grouped into one.

invisible : Style
invisible =
    display none

This corresponds to the CSS display: none.

boldAndUnderlineOnHover : Style
boldAndUnderlineOnHover =
    hover [ textDecoration underline, fontWeight bold ]

This (roughly) corresponds to the CSS :hover { text-decoration: underline; font-weight: bold; }.

You can use Style values to reuse styles (like mixins in other CSS systems). batch comes in handy for this!

batch : List Style -> Style

Create a style from multiple other styles.

underlineOnHover =
    batch
        [ textDecoration none


        , hover
            [ textDecoration underline ]
        ]


css
    [ color (rgb 128 64 32)
    , underlineOnHover
    ]

...has the same result as:

css
    [ color (rgb 128 64 32)
    , textDecoration none
    , hover
        [ textDecoration underline ]
    ]

Custom Properties

property : String -> String -> Style

Define a custom property.

css [ property "-webkit-font-smoothing" "none" ]

...outputs

-webkit-font-smoothing: none;

!important

important : Style -> Style

Transforms the given property by adding !important to the end of its declaration.


Pseudo-Classes

pseudoClass : String -> List Style -> Style

Define a custom pseudo-class.

This can be useful for deprecated pseudo-classes such as -moz-any-link, which has been deprecated and removed in modern browsers.

button
    [ css [ pseudoClass "-moz-any-link" [ color (hex "f00") ] ] ]
    [ text "Whee!" ]

...outputs

<button class="f9fcb2">Whee!</button>


<style>
    .f9fcb2:-moz-any-link {
        color: #f00;
    }
</style>
active : List Style -> Style

An :active pseudo-class.

button [ active [ color (rgb 12 160 190) ] ]
checked : List Style -> Style

A :checked pseudo-class.

This pseudo-class is for any checkbox, option or radio input that is checked or toggled on.

checked
    [ backgroundColor (rgb 0 0 255)
    ]
default : List Style -> Style

A :default pseudo-class.

default [ color (hex "#ff0000") ]
defined : List Style -> Style

A :defined pseudo-class.

defined [ fontStyle italic ]
disabled : List Style -> Style

A :disabled pseudo-class.

button [ disabled [ color (rgb 194 194 194) ] ]
empty : List Style -> Style

An :empty pseudo-class.

empty
    [ backgroundColor (rgb 20 20 20)
    ]
enabled : List Style -> Style

An :enabled pseudo-class.

enabled
    [ borderColor (rgba 150 150 0 0.5)
    ]
first : List Style -> Style

A :first pseudo-class.

first
    [ marginTop (pct 30)
    ]
firstChild : List Style -> Style

A :first-of-type pseudo-class.

firstChild
    [ fontWeight bold
    ]
firstOfType : List Style -> Style

A :first-of-type pseudo-class.

firstOfType
    [ color (rgb 255 0 0)
    ]
focus : List Style -> Style

A :focus pseudo-class.

focus
    [ border3 (px 2) solid (rgb 0 0 0)
    ]
fullscreen : List Style -> Style

A :fullscreen pseudo-class.

fullscreen
    [ backgroundColor (rgb 0 0 0)
    ]
hover : List Style -> Style

A :hover pseudo-class.

hover
    [ fontWeight bold
    , color (rgb 255 50 0)
    ]
inRange : List Style -> Style

An :in-range pseudo-class.

inRange
    [ backgroundColor (rgb 0 255 0)
    ]
indeterminate : List Style -> Style

An :indeterminate pseudo-class.

indeterminate
    [ backgroundColor (rgb 100 100 100)
    ]
invalid : List Style -> Style

An :invalid pseudo-class.

invalid
    [ color (rgb 255 0 0)
    , fontWeight bold
    ]
lastChild : List Style -> Style

A :last-child pseudo-class.

lastChild
    [ backgroundColor (rgb 0 0 255)
    ]
lastOfType : List Style -> Style

A :last-of-type pseudo-class.

lastOfType
    [ color (rgb 100 100 100)
    ]
leftHandPage : List Style -> Style

A :left pseudo-class.

leftHandPage
    [ color (rgb 100 100 100)
    ]

Note: This is called leftHandPage instead of left or left_ is because both of those are taken by property and value keyword functions.

onlyChild : List Style -> Style

An :only-child pseudo-class.

onlyChild
    [ backgroundColor (rgb 255 255 255)
    ]
onlyOfType : List Style -> Style

An :only-of-type pseudo-class.

onlyOfType
    [ color (rgb 255 0 0)
    , fontStyle italic
    ]
outOfRange : List Style -> Style

An :out-of-range pseudo-class.

outOfRange
    [ color (rgb 255 0 0)
    ]
readOnly : List Style -> Style

A :read-only pseudo-class.

readOnly
    [ color (rgb 50 50 50)
    ]
readWrite : List Style -> Style

A :read-write pseudo-class.

readWrite
    [ backgroundColor (rgb 0 50 150)
    ]
required : List Style -> Style

A :required pseudo-class.

required
    [ border (px 2) solid (rgb 100 100 100)
    ]
rightHandPage : List Style -> Style

A :right pseudo-class.

rightHandPage
    [ color (rgb 100 100 100)
    ]

Note: This is called rightHandPage instead of right or right_ is because both of those are taken by property and value keyword functions.

root : List Style -> Style

A :root pseudo-class.

root
    [ backgroundColor (rgb 0 200 200)
    ]
scope : List Style -> Style

A :scope pseudo-class.

scope
    [ backgroundColor (rgb 0 200 200)
    ]
target : List Style -> Style

A :target pseudo-class.

target
    [ fontWeight bold
    , border3 (px 2) dotted (rgb 255 0 0)
    ]
valid : List Style -> Style

A :valid pseudo-class.

valid
    [ border3 (px 1) solid (rgb 0 255 0)
    ]
visited : List Style -> Style

A :visited pseudo-class.

visited
    [ color (rgb 150 0 255)
    ]

Pseudo-Classes with arguments

dir :
{ ltr : Supported
, rtl : Supported
}
-> List Style
-> Style

A :dir() pseudo-class.

dir rtl
    [ backgroundColor (hex "#ff0000")
    ]
lang : String -> List Style -> Style

A :lang() pseudo-class.

lang "en-GB"
    [ backgroundColor (hex "#ff0000")
    ]
not : List String -> List Style -> Style

A :not() pseudo-class.

The first argument is a list of selectors to not select.

not ["p.notthis", ".notthat"]
    [ backgroundColor (hex "#ff0000")
    ]
nthChild : String -> List Style -> Style

An :nth-child() pseudo-class.

nthChild "3"
    [ backgroundColor (hex "#ff0000")
    ]
nthLastChild : String -> List Style -> Style

An :nth-last-child() pseudo-class.

This is the same as nthChild, but counting from the end rather than the start.

nthLastChild "3n+4"
    [ backgroundColor (hex "#ff0000")
    ]
nthOfType : String -> List Style -> Style

An :nth-of-type() pseudo-class.

nthOfType "odd"
    [ backgroundColor (hex "#ff0000")
    ]
nthLastOfType : String -> List Style -> Style

An :nth-last-of-type() pseudo-class.

nthLastOfType "0n+1"
    [ backgroundColor (hex "#ff0000")
    ]

Pseudo-Elements

pseudoElement : String -> List Style -> Style

Define a custom pseudo-element.

textarea
    [ css [ pseudoElement "-webkit-scrollbar" [ display none ] ] ]
    []

...outputs

<textarea class="d84ff7"></textarea>


<style>
    .d84ff7::-webkit-scrollbar {
        display: none;
    }
</style>
after : List Style -> Style

An ::after pseudo-element.

div [ after [ content "hi!" ] ]

--TODO : Introduce a way to do content - lots of options there, not just text. Also it's overloaded with flexBasis content.

backdrop : List Style -> Style

A ::backdrop pseudo-element.

backdrop
    [ background (rgba 255 0 0 0.25)
    ]
before : List Style -> Style

A ::before pseudo-element.

div [ before [ content "hi!" ] ]

--TODO : Introduce a way to do content - lots of options there, not just text. Also it's overloaded with flexBasis content.

cue : List Style -> Style

A ::cue pseudo-element.

cue
    [ color (rgba 255 255 0 1)
    , fontWeight (int 600)
    ]
firstLetter : List Style -> Style

A ::first-letter pseudo-element.

firstLetter
    [ fontSize (rem 2)
    ]
firstLine : List Style -> Style

A ::first-line pseudo-element.

firstLine
    [ fontWeight (int 600)
    ]
marker : List Style -> Style

A ::marker pseudo-element.

marker
    [ color (rgba 255 255 0 1)
    , fontWeight (int 600)
    ]
placeholder : List Style -> Style

A ::placeholder pseudo-element.

Be careful when using placeholders as they can negatively impact accessibility.

placeholder
    [ opacity (num 1) <| important
    , color (rgb 90 90 90)
    , fontWeight (int 400)
    ]

]

selection : List Style -> Style

A ::selection pseudo-element.

selection
    [ backgroundColor (rgb 200 140 15)
    ]

Pseudo-Elements with arguments

slotted : String -> List Style -> Style

A ::slotted() pseudo-element.

slotted "*"
    [ backgroundColor (rgb 200 140 15)
    ]

Value types

Numerical units

Lengths

type alias Length =
LengthSupported {}

A type alias used to accept a length.

type alias LengthSupported supported =
{ supported
| ch : Supported
, em : Supported
, ex : Supported
, rem : Supported
, vh : Supported
, vw : Supported
, vmin : Supported
, vmax : Supported
, px : Supported
, cm : Supported
, mm : Supported
, inch : Supported
, pc : Supported
, pt : Supported
, q : Supported
, zero : Supported
, calc : Supported
}

A type alias used to accept a length among other values.

zero : Value { provides | zero : Supported }

Compiles to a 0 value with no units.

css [ padding zero ]

...compiles to:

padding: 0;

This conveniently lets you avoid doing things like padding (px 0)

px : Float -> Value { provides | px : Supported }

px length units.

borderWidth (px 5)
em : Float -> Value { provides | em : Supported }

em length units.

borderWidth (em 5)
ex : Float -> Value { provides | ex : Supported }

ex length units.

borderWidth (ex 5)
ch : Float -> Value { provides | ch : Supported }

ch length units.

borderWidth (ch 5)
rem : Float -> Value { provides | rem : Supported }

rem length units.

borderWidth (rem 5)
vh : Float -> Value { provides | vh : Supported }

vh length units.

borderWidth (vh 5)
vw : Float -> Value { provides | vw : Supported }

vw length units.

borderWidth (vw 5)
vmin : Float -> Value { provides | vmin : Supported }

vmin length units.

borderWidth (vmin 5)
vmax : Float -> Value { provides | vmax : Supported }

vmax length units.

borderWidth (vmax 5)
mm : Float -> Value { provides | mm : Supported }

mm length units.

borderWidth (mm 5)
cm : Float -> Value { provides | cm : Supported }

cm length units.

borderWidth (cm 5)
q : Float -> Value { provides | q : Supported }

Q length units.

borderWidth (q 2.5)
inch : Float -> Value { provides | inch : Supported }

in length units.

borderWidth (inch 5)

(This is inch instead of in because in is a reserved keyword in Elm.)

pt : Float -> Value { provides | pt : Supported }

pt length units.

borderWidth (pt 5)
pc : Float -> Value { provides | pc : Supported }

pc length units.

borderWidth (pc 5)
pct : Float -> Value { provides | pct : Supported }

pct length units.

borderWidth (pct 5)
num : Float -> Value { provides | num : Supported }

A unitless number. Useful with properties like flexGrow, and order which accept unitless numbers.

flexGrow (num 2)


order (num -2)
int : Int -> Value { provides | int : Supported }

A unitless integer. Useful with properties like zIndex which accept unitless integers.

zIndex (int 3)

Angles

type alias Angle =
AngleSupported {}

A type alias used to accept an angle.

type alias AngleSupported supported =
{ supported
| deg : Supported
, grad : Supported
, rad : Supported
, turn : Supported
, zero : Supported
, calc : Supported
}

A type alias used to accept an angle among other values.

type alias Width =
WidthSupported {}

A type alias used to accept a 'width'.

type alias WidthSupported supported =
LengthSupported
{ supported
| auto : Supported
, pct : Supported
, minContent : Supported
, maxContent : Supported
, fitContent : Supported
}

A type alias used to accept a 'width' among other values.

deg : Float -> Value { provides | deg : Supported }

A deg angle

deg 360 -- one full circle


deg 14.23
grad : Float -> Value { provides | grad : Supported }

A grad angle

grad 400 -- one full circle


grad 38.8
rad : Float -> Value { provides | rad : Supported }

A rad angle

rad 6.2832 -- approximately one full circle


rad 1
turn : Float -> Value { provides | turn : Supported }

A turn angle

turn 1 -- one full circle


turn 0.25

Time

type alias Time =
TimeSupported {}

A type alias used to accept an time.

type alias TimeSupported supported =
{ supported | s : Supported, ms : Supported }

A type alias used to accept an time among other values.

s : Float -> Value { provides | s : Supported }

The s time unit.

animationDuration (s 1)
ms : Float -> Value { provides | ms : Supported }

The ms time unit.

animationDuration (ms 120)

Flex

fr : Float -> Value { provides | fr : Supported }

fr flex units.

gridAutoColumns (fr 1)
(LengthSupported
{ pct : Supported
, fr : Supported
, maxContent : Supported
, minContent : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, fr : Supported
, maxContent : Supported
, minContent : Supported
, auto : Supported
}
)
-> Value { provides | minmax : Supported }

The minmax() value for grid properties.

gridAutoRows (minmax (px 2) (pct 100))
Value (LengthSupported { pct : Supported })
-> Value { provides | fitContentTo : Supported }

The fit-content() value that can have a length or percentage value that you want the property to be clamped to.

Not to be confused with the fitContent value for flex properties.

gridAutoColumns (fitContentTo (pct 100))


height (fitContentTo (rem 20))

Names & URLs

customIdent : String -> Value { provides | customIdent : Supported }

Produces an custom-ident value used by properties such as (but not limited to) listStyle and listStyleType.

listStyleType (customIdent "hello-world")

Note: This method does not do any checking if the identifierer supplied is valid.

string : String -> Value { provides | string : Supported }

Produces a string value used by properties such as:

listStyleType (string "> ")

quotes2 (string "«") (string "»")

fontLanguageOverride (string "ENG")
url : String -> Value { provides | url : Supported }

The url value for the cursor, fill, strokeImage, and backgroundImage properties.

Color

type alias Color =
ColorSupported {}

A type alias used to accept a color.

type alias ColorSupported supported =
{ supported
| rgb : Supported
, rgba : Supported
, hsl : Supported
, hsla : Supported
, hex : Supported
, currentcolor : Supported
}

A type alias used to accept a color among other values.

hex : String -> Value { provides | hex : Supported }

[RGB color value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgb()) in hexadecimal notation.

You can optionally include # as the first character, for benefits like syntax highlighting in editors, ease of copy/pasting from tools which express these as e.g. #abcdef0, etc.

color (hex "#60b5cc")


color (hex "60b5cc")
rgb : Int -> Int -> Int -> Value { provides | rgb : Supported }

[RGB color value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgb()) in functional notation.

color (rgb 96 181 204)
rgba : Int -> Int -> Int -> Float -> Value { provides | rgba : Supported }

RGBA color value.

color (rgba 96 181 204 0.25)
hsl : Float -> Float -> Float -> Value { provides | hsl : Supported }

HSL color value.

The s and l values are expressed as a number between 0 and 1 and are converted to the appropriate percentage.

color (hsl 193 0.51 0.59) -- hsl(193, 51%, 59%)
Float
-> Float
-> Float
-> Float
-> Value { provides | hsla : Supported }

HSLA color value

The s and l values are expressed as a number between 0 and 1 and are converted to the appropriate percentage.

color (hsla 193 0.51 0.59 0.25) -- hsl(193, 51%, 59%, 0.25)
currentcolor : Value { provides | currentcolor : Supported }

The currentcolor value used by properties such as color, backgroundColor

color currentcolor

Images & Shapes

type alias Image =
ImageSupported {}

A type alias used to accept an image.

type alias ImageSupported supported =
{ supported
| url : Supported
, linearGradient : Supported
, radialGradient : Supported
, repeatingLinearGradient : Supported
, repeatingRadialGradient : Supported
}

A type alias used to accept an image among other values.

type alias BasicShape =
BasicShapeSupported {}

A type alias used to accept a basic shape.

type alias BasicShapeSupported supported =
{ supported
| insetRect : Supported
, insetRect2 : Supported
, insetRect3 : Supported
, insetRect4 : Supported
, circle : Supported
, circleAt : Supported
, circleAt2 : Supported
, ellipse : Supported
, ellipseAt : Supported
, ellipseAt2 : Supported
, polygon : Supported
, path : Supported
}

A type alias used to accept a basic shape among other values.

Value (LengthSupported { pct : Supported })
-> Maybe
{ insetRound : Supported
, insetRound2 : Supported
, insetRound3 : Supported
, insetRound4 : Supported
}
)
-> Value { provides | insetRect : Supported }

Provides a one-argument inset() value. (Which creates an inset rectangle shape.)

clipPath <| insetRect (px 20) Nothing, "inset(20px)" )


clipPath <| insetRect (px 20) (Just <| insetRound (px 2))


clipPath <| insetRect2 (pct 40) (pct 20) (Just <| insetRound4 (px 1) (px 2) (px 3) (px 1))


clipPath <| insetRect3 (px 20) (px 10) (pct 10) (Just <| insetRound (px 4))


clipPath <| insetRect3 (em 4) (em 1) (px 2) Nothing


clipPath <| insetRect4 (cm 4) (cm 5) (cm 2) (cm 1) (Just <| insetRound3 (mm 12) (mm 3) (mm 8))


clipPath <| insetRect4 (pt 20) (pt 10) (pt 30) (pt 40) (Just <| insetRound2 (pt 2) (pt 5))

Note: This is called insetRect instead of inset because inset and inset_ are already property and value functions handling other areas of CSS.

Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Maybe
{ insetRound : Supported
, insetRound2 : Supported
, insetRound3 : Supported
, insetRound4 : Supported
}
)
-> Value { provides | insetRect : Supported }

Provides a 2-argument inset() value. (Which creates an inset rectangle shape.)

clipPath <| insetRect (px 20) Nothing, "inset(20px)" )


clipPath <| insetRect (px 20) (Just <| insetRound (px 2))


clipPath <| insetRect2 (pct 40) (pct 20) (Just <| insetRound4 (px 1) (px 2) (px 3) (px 1))


clipPath <| insetRect3 (px 20) (px 10) (pct 10) (Just <| insetRound (px 4))


clipPath <| insetRect3 (em 4) (em 1) (px 2) Nothing


clipPath <| insetRect4 (cm 4) (cm 5) (cm 2) (cm 1) (Just <| insetRound3 (mm 12) (mm 3) (mm 8))


clipPath <| insetRect4 (pt 20) (pt 10) (pt 30) (pt 40) (Just <| insetRound2 (pt 2) (pt 5))

Note: This is called insetRect2 instead of inset2 because inset and inset_ are already property and value functions handling other areas of CSS.

Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Maybe
{ insetRound : Supported
, insetRound2 : Supported
, insetRound3 : Supported
, insetRound4 : Supported
}
)
-> Value { provides | insetRect : Supported }

Provides a 2-argument inset() value. (Which creates an inset rectangle shape.)

clipPath <| insetRect (px 20) Nothing, "inset(20px)" )


clipPath <| insetRect (px 20) (Just <| insetRound (px 2))


clipPath <| insetRect2 (pct 40) (pct 20) (Just <| insetRound4 (px 1) (px 2) (px 3) (px 1))


clipPath <| insetRect3 (px 20) (px 10) (pct 10) (Just <| insetRound (px 4))


clipPath <| insetRect3 (em 4) (em 1) (px 2) Nothing


clipPath <| insetRect4 (cm 4) (cm 5) (cm 2) (cm 1) (Just <| insetRound3 (mm 12) (mm 3) (mm 8))


clipPath <| insetRect4 (pt 20) (pt 10) (pt 30) (pt 40) (Just <| insetRound2 (pt 2) (pt 5))

Note: This is called insetRect3 instead of inset3 because inset and inset_ are already property and value functions handling other areas of CSS.

Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Maybe
{ insetRound : Supported
, insetRound2 : Supported
, insetRound3 : Supported
, insetRound4 : Supported
}
)
-> Value { provides | insetRect : Supported }

Provides a 2-argument inset() value. (Which creates an inset rectangle shape.)

clipPath <| insetRect (px 20) Nothing, "inset(20px)" )


clipPath <| insetRect (px 20) (Just <| insetRound (px 2))


clipPath <| insetRect2 (pct 40) (pct 20) (Just <| insetRound4 (px 1) (px 2) (px 3) (px 1))


clipPath <| insetRect3 (px 20) (px 10) (pct 10) (Just <| insetRound (px 4))


clipPath <| insetRect3 (em 4) (em 1) (px 2) Nothing


clipPath <| insetRect4 (cm 4) (cm 5) (cm 2) (cm 1) (Just <| insetRound3 (mm 12) (mm 3) (mm 8))


clipPath <| insetRect4 (pt 20) (pt 10) (pt 30) (pt 40) (Just <| insetRound2 (pt 2) (pt 5))

Note: This is called insetRect4 instead of inset4 because inset and inset_ are already property and value functions handling other areas of CSS.

Value (LengthSupported { pct : Supported })
-> Value { provides | insetRound : Supported }

Provides a 1-value border radius for use with insetRect(#insetRect) (inset()).

insetRect (px 40) (Just <| insetRound (px 2))


insetRect (px 40) (Just <| insetRound2 (px 2) (px 5))


insetRect (px 40) (Just <| insetRound3 (px 2) (px 3) (px 4))


insetRect (px 40) (Just <| insetRound4 (px 2) (px 5) (px 1) (px 3))
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value { provides | insetRound2 : Supported }

Provides a 2-value border radius for use with insetRect(#insetRect) (inset()).

insetRect (px 40) (Just <| insetRound (px 2))


insetRect (px 40) (Just <| insetRound2 (px 2) (px 5))


insetRect (px 40) (Just <| insetRound3 (px 2) (px 3) (px 4))


insetRect (px 40) (Just <| insetRound4 (px 2) (px 5) (px 1) (px 3))
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value { provides | insetRound3 : Supported }

Provides a 3-value border radius for use with insetRect(#insetRect) (inset()).

insetRect (px 40) (Just <| insetRound (px 2))


insetRect (px 40) (Just <| insetRound2 (px 2) (px 5))


insetRect (px 40) (Just <| insetRound3 (px 2) (px 3) (px 4))


insetRect (px 40) (Just <| insetRound4 (px 2) (px 5) (px 1) (px 3))
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value { provides | insetRound3 : Supported }

Provides a 4-value border radius for use with insetRect(#insetRect) (inset()).

insetRect (px 40) (Just <| insetRound (px 2))


insetRect (px 40) (Just <| insetRound2 (px 2) (px 5))


insetRect (px 40) (Just <| insetRound3 (px 2) (px 3) (px 4))


insetRect (px 40) (Just <| insetRound4 (px 2) (px 5) (px 1) (px 3))
(LengthSupported
{ pct : Supported
, closestSide : Supported
, farthestSide : Supported
}
)
-> Value { provides | circle : Supported }

Provides a one-argument circle() value.

clipPath (circle (pct 10))


clipPath (circle closestSide)


clipPath (circleAt (pct 10) left)


clipPath (circleAt closestSide (rem 5))


clipPath (circleAt2 closestSide (rem 5) (rem 1))

Note: This is not to be confused with circle_, which is a keyword value for properties such as listStyleType.

(LengthSupported
{ pct : Supported
, closestSide : Supported
, farthestSide : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, top_ : Supported
, bottom_ : Supported
, left_ : Supported
, right_ : Supported
, center : Supported
}
)
-> Value { provides | circleAt : Supported }

Provides a 2-argument circle(<rad> at <pos>) value.

clipPath (circleAt (pct 10) left_)


clipPath (circleAt closestSide (rem 5))


clipPath (circleAt2 closestSide (rem 5) (rem 1))
(LengthSupported
{ pct : Supported
, closestSide : Supported
, farthestSide : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, left_ : Supported
, right_ : Supported
, center : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, top_ : Supported
, bottom_ : Supported
, center : Supported
}
)
-> Value { provides | circleAt2 : Supported }

Provides a 3-argument circle(<rad> at <posX> <posY>) value.

clipPath (circleAt2 closestSide (rem 5) (rem 1))


clipPath (circleAt2 (pct 10) top_ left_)
(LengthSupported
{ pct : Supported
, closestSide : Supported
, farthestSide : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, closestSide : Supported
, farthestSide : Supported
}
)
-> Value { provides | ellipse : Supported }

Provides a one-argument ellipse() value.

clipPath (ellipse (px 20) (px 10))


clipPath (ellipse closestSide farthestSide)


clipPath (ellipseAt closestSide (pct 10) left_)


clipPath (ellipseAt (pct 20) (pct 10) (rem 5))


clipPath (ellipseAt2 (rem 5) closestSide (rem 5) (rem 1))
(LengthSupported
{ pct : Supported
, closestSide : Supported
, farthestSide : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, closestSide : Supported
, farthestSide : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, top_ : Supported
, bottom_ : Supported
, left_ : Supported
, right_ : Supported
, center : Supported
}
)
-> Value { provides | ellipseAt : Supported }

Provides a 3-argument ellipse(<radiusX> <radiusY> at <pos>) value.

clipPath (ellipseAt (pct 50) (pct 10) left_)


clipPath (ellipseAt (rem 5) closestSide (rem 5))
(LengthSupported
{ pct : Supported
, closestSide : Supported
, farthestSide : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, closestSide : Supported
, farthestSide : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, left_ : Supported
, right_ : Supported
, center : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, top_ : Supported
, bottom_ : Supported
, center : Supported
}
)
-> Value { provides | ellipseAt2 : Supported }

Provides a 4-argument ellipse(<radiusX> <radiusY> at <posX> <posY>) value.

clipPath (ellipseAt2 (rem 6) closestSide (rem 5) (rem 1))


clipPath (ellipseAt2 farthestSide (pct 10) left_ top_)
closestSide : Value { provides | closestSide : Supported }

The closest-side value for use in circle and ellipse shapes.

clipPath (circle closestSide)


clipPath (ellipse farthestSide (px 20))
farthestSide : Value { provides | farthestSide : Supported }

The farthest-side value for use in circle and ellipse shapes.

clipPath (circleAt farthestSide (pct 20))


clipPath (ellipseAt farthestSide (px 2) (pct 20))
polygon : List ( Float, Float ) -> Value { provides | polygon : Supported }

Creates a polygon() value for CSS properties that accept a <basic-shape> value.

Each numerical argument is a Float that represents a percentage.

clipPath <| polygon [ (20, 30), (40, 80.3), (14, 50) ]
path : String -> Value { provides | path : Supported }

Creates a path() value for CSS properties that accept a <basic-shape> value.

The input string needs to be a valid SVG path string.

clipPath <| path "M161.693,39.249C94.047,39.249 39.127,94.169 39.127,161.816C39.127,229.462 94.047,284.382 161.693,284.382C229.34,284.382 284.26,229.462 284.26,161.816C284.26,94.169 229.34,39.249 161.693,39.249ZM161.693,71.382C211.605,71.382 211.605,252.249 161.693,252.249C111.782,252.249 71.26,211.727 71.26,161.816C71.26,111.904 111.782,71.382 161.693,71.382Z"

Blend Modes

type alias BlendMode =
BlendModeSupported {}

A type alias used to accept a blend mode.

type alias BlendModeSupported supported =
{ supported
| normal : Supported
, multiply : Supported
, screen : Supported
, overlay : Supported
, darken : Supported
, lighten : Supported
, colorDodge : Supported
, colorBurn : Supported
, hardLight : Supported
, softLight : Supported
, difference : Supported
, exclusion : Supported
, hue : Supported
, saturation : Supported
, color_ : Supported
, luminosity : Supported
}

A type alias used to accept a blend mode among other values.

Filter Functions

type alias FilterFunction =
FilterFunctionSupported {}

A type alias used to accept a filter function.

type alias FilterFunctionSupported supported =
{ supported
| blur : Supported
, brightness : Supported
, contrast : Supported
, dropShadow : Supported
, grayscale : Supported
, hueRotate : Supported
, invert : Supported
, opacity_ : Supported
, saturate : Supported
, sepia : Supported
}

A type alias used to accept a filter function, among other values.

blur : Value Length -> Value { provides | blur : Supported }

Provides a blur() filter function value.

backdropFilter <| blur (px 20)
-- backdrop-filter: blur(20px);
{ zero : Supported
, pct : Supported
, num : Supported
}
-> Value { provides | brightness : Supported }

Provides a brightness() filter function value.

filter <| brightness (pct 20)
-- backdrop-filter: brightness(20%);


filter <| brightness zero -- completely black


backdropFilter <| contrast (num 1) -- no effect


filter <| brightness (num 0.4)
{ zero : Supported
, pct : Supported
, num : Supported
}
-> Value { provides | contrast : Supported }

Provides a contrast() filter function value.

backdropFilter <| contrast (pct 20)
-- backdrop-filter: contrast(20%);


backdropFilter <| contrast zero -- completely gray


backdropFilter <| contrast (num 1) -- no effect


backdropFilter <| contrast (num 0.4)
Value Length
-> Value Length
-> Maybe (Value Length)
-> Maybe (Value Color)
-> Value { provides | dropShadow : Supported }

Provides a drop-shadow() filter function value.

filter <| dropShadow (px 20) (px 3) (Just <| px 30) (Just <| hex "#fff")
-- filter: drop-shadow(20px 4px 30px #fff);
{ zero : Supported
, pct : Supported
, num : Supported
}
-> Value { provides | grayscale : Supported }

Provides a grayscale() filter function value.

backdropFilter <| grayscale (pct 20)
-- backdrop-filter: grayscale(20%);


backdropFilter <| grayscale zero -- no effect


backdropFilter <| grayscale (num 1) -- completely grayscale


backdropFilter <| grayscale (num 0.4) -- 40% grayscale
hueRotate : Value Angle -> Value { provides | hueRotate : Supported }

Provides a hue-rotate() filter function value.

backdropFilter <| hueRotate (deg -180)
-- backdrop-filter: hue-rotate(-180deg);
{ zero : Supported
, pct : Supported
, num : Supported
}
-> Value { provides | invert : Supported }

Provides a invert() filter function value.

backdropFilter <| invert (pct 20)
-- backdrop-filter: invert(20%);


backdropFilter <| invert zero -- no effect


backdropFilter <| invert (num 1) -- completely inverted


backdropFilter <| invert (num 0.4) -- 40% inversion
{ zero : Supported
, pct : Supported
, num : Supported
}
-> Value { provides | opacity_ : Supported }

Provides a opacity() filter function value.

backdropFilter <| opacity_ (pct 20)
-- backdrop-filter: opacity(20%);


backdropFilter <| opacity_ zero -- completely transparent


backdropFilter <| opacity_ (num 1) -- no effect


backdropFilter <| opacity_ (num 0.4) -- 40% transparent

Note: This is called opacity_ instead of opacity because opacity is already used as a property function.

{ zero : Supported
, pct : Supported
, num : Supported
}
-> Value { provides | saturate : Supported }

Provides a saturate() filter function value.

filter <| saturate (pct 20)
-- filter: saturate(20%);


filter <| saturate zero -- completely desaturated


filter <| saturate (num 1) -- no effect


filter <| saturate (num 2) -- double saturation


filter <| saturate (num 0.4) -- 40% saturated
{ zero : Supported
, pct : Supported
, num : Supported
}
-> Value { provides | sepia : Supported }

Provides a sepia() filter function value.

filter <| sepia (pct 20)
-- filter: sepia(20%);


filter <| sepia zero -- no effect


filter <| sepia (num 1) -- completely sepia


filter <| sepia (num 0.4) -- 40% sepia

Lines

type alias LineStyle =
LineStyleSupported { hidden : Supported }

A type alias used to accept a line-style. This includes hidden as a possible value.

type alias LineStyleSupported supported =
{ supported
| none : Supported
, dotted : Supported
, dashed : Supported
, solid : Supported
, double : Supported
, groove : Supported
, ridge : Supported
, inset_ : Supported
, outset : Supported
}

A type alias used to accept a line-style (without the hidden) value among other values.

type alias LineWidth =
LineWidthSupported {}

A type alias used to accept a line-width.

type alias LineWidthSupported supported =
LengthSupported
{ supported
| thin : Supported
, medium : Supported
, thick : Supported
}

A type alias used to accept a line-width among other values.

Calc

(LengthSupported
{ pct : Supported
, num : Supported
, int : Supported
}
)
-> Value { provides | calc : Supported }

The css calc function.

almostPct100 =
    calc (pct 100) (minus (px 2))


-- The following compiles to: calc(100vh - (2px + 2rem))
screenMinusBorderAndFooter =
    calc (vh 100) (minus (calc (px 2) (plus (rem 2))))


myWidth =
    width almostPct100


myHeight =
    height screenMinusBorderAndFooter

CAUTION: calc can easily be used to create invalid CSS values! For example, zIndex (calc (pct 100) (minus (px 5))) compiles to z-index: calc(100% - 5px); which is invalid. According to the spec, calc may return values that have no relation to its arguments, so unfortunately there's not much elm-css can do to make calc more reliable. Use with caution!

Either plus or minus.

See calc for how to use this.

(LengthSupported
{ pct : Supported
, num : Supported
, int : Supported
}
)

Use with calc to subtract one value from another.

calc (pct 100) (minus (px 2))
-- calc: (100% - 2px)
(LengthSupported
{ pct : Supported
, num : Supported
, int : Supported
}
)

Use with calc to add one numeric value to another.

calc (pct 100) (plus (px 2))
-- calc: (100% + 2px)
{ num : Supported
, int : Supported
, zero : Supported
}

Use with calc to multiply a value by a unitless number.

calc (pct 100) (times (int 2))
-- calc: (100% * 2px)
{ num : Supported
, int : Supported
, zero : Supported
}

Use with calc to divide a value by a unitless number.

calc (pct 100) (dividedBy (int 2))
-- calc: (100% / 2px)

Shared/Grouped keyword values

Many different kinds of CSS properties use the same keyword values, so they're put in this place for easier understanding.

Some of these keywords are used only in one property but they fit into a group of functionality (like Logical Values), so they're also grouped here.

General Values

All CSS properties can have the values unset, initial, inherit and revert.

type alias BaseValue supported =
{ supported
| initial : Supported
, inherit : Supported
, unset : Supported
, revert : Supported
}

A type that is used in properties for CSS wide values. See CSS-wide values.

unset : Value { provides | unset : Supported }

The unset value. Any CSS property can be set to this value.

display unset


borderStyle unset
initial : Value { provides | initial : Supported }

The initial value. Any CSS property can be set to this value.

display initial


borderStyle initial
inherit : Value { provides | inherit : Supported }

The inherit value. Any CSS property can be set to this value.

display inherit
revert : Value { provides | revert : Supported }

The revert value. Any CSS property can be set to this value.

all revert


color revert

Very common keywords

auto : Value { provides | auto : Supported }

The auto value used in many properties such as (but not limited to) width, zoom, outlineStyle, and flexBasis.

width auto


zoom auto


flexBasis auto
none : Value { provides | none : Supported }

The none value used in many properties such as (but not limited to) display, borderStyle, maxWidth, clear, strokeDashJustify, and flex.

display none


borderStyle none


strokeDashJustify none


flex none

(usually) Absolute positional values

left_ : Value { provides | left_ : Supported }

The left value, used in many properties such as:

backgroundPosition left_

clear left_

float left_

justifyContent left_

justifyItems left_

justifySelf left_

pageBreakAfter left_

textAlign left_

The value is called left_ instead of left because left is already a property function.

right_ : Value { provides | right_ : Supported }

The right value, used in many properties such as:

backgroundPosition right_

clear right_

float right_

justifyContent right_

justifyItems right_

justifySelf right_

pageBreakAfter right_

textAlign right_

The value is called right_ instead of right because right is already a property function.

top_ : Value { provides | top_ : Supported }

The top value, used in the following properties:

backgroundPosition top_

captionSide top_

objectPosition2 right_ top_

perspectiveOrigin2 left_ top_

transformOrigin top_

verticalAlign top_

The value is called top_ instead of top because top is already a property function.

bottom_ : Value { provides | bottom_ : Supported }

The bottom value, used in the following properties:

backgroundPosition bottom_

captionSide bottom_

objectPosition2 right_ bottom_

perspectiveOrigin2 left_ bottom_

transformOrigin bottom_

verticalAlign bottom_

The value is called bottom_ instead of bottom because bottom is already a property function.

(usually) Logical Values

Logical values are those that set properties by their relation to the user's reading direction.

Sometimes these keywords mean other things too.

block : Value { provides | block : Supported }

The block value.

This is a CSS Logical value used by display and resize.

display block


resize block
inline : Value { provides | inline : Supported }

The inline value.

This is a CSS Logical value used by display and resize.

display inline


resize inline
start : Value { provides | start : Supported }

The start value.

It's used in the following properties as a CSS Logical value:

alignContent start

justifyItems start

It's also used as an animation keyword used in steps2.

steps2 3 start
end : Value { provides | end : Supported }

The end value.

It's used in the following properties as a CSS Logical value:

alignContent end

justifyItems end

It's also used as an animation keyword used in steps2.

steps2 3 end
blockStart : Value { provides | blockEnd : Supported }

The block-start value, which is a CSS Logical value. It can be used with captionSide.

captionSide blockStart
blockEnd : Value { provides | blockEnd : Supported }

The block-end value, which is a CSS Logical value. It can be used with captionSide.

captionSide blockEnd
inlineStart : Value { provides | inlineStart : Supported }

Sets inline-start, which is a CSS Logical value. It can be used with the following properties:

    clear inlineStart

    captionSide inlineStart

    float inlineStart
inlineEnd : Value { provides | inlineEnd : Supported }

Sets inline-end, which is a CSS Logical value. It can be used with the following properties:

    clear inlineEnd

    captionSide inlineEnd

    float inlineEnd

Content sizing values

minContent : Value { provides | minContent : Supported }

The min-content value used for properties such as:

width minContent
maxContent : Value { provides | maxContent : Supported }

The max-content value used for properties such as:

width maxContent
fitContent : Value { provides | fitContent : Supported }

The fit-content value used for properties such as:

width fitContent

Axis values

x : Value { provides | x : Supported }

Sets x value for usage with scrollSnapType2 and rotate2.

scrollSnapType2 x mandatory


rotate x (deg 10)
y : Value { provides | y : Supported }

Sets y value for usage with scrollSnapType2 and rotate2.

scrollSnapType2 y mandatory


rotate y (deg 50)
z : Value { provides | z : Supported }

Sets z value for usage with rotate2.

rotate z (deg 100)

Alignment values

stretch : Value { provides | stretch : Supported }

The stretch value used in the following properties:

alignContent stretch

strokeDashJustify stretch
center : Value { provides | center : Supported }

The center value, used in many properties such as:

backgroundPosition enter

justifyContent center

Geometry box values

marginBox : Value { provides | marginBox : Supported }

The margin-box value, used in clipPath.

clipPath marginBox
borderBox : Value { provides | borderBox : Supported }

The border-box value, used in the following properties:

boxSizing borderBox

backgroundClip borderBox

backgroundOrigin borderBox

strokeOrigin borderBox
paddingBox : Value { provides | paddingBox : Supported }

The padding-box value, used with backgroundClip, backgroundOrigin, and strokeOrigin.

backgroundClip paddingBox


backgroundOrigin paddingBox


strokeOrigin paddingBox
contentBox : Value { provides | contentBox : Supported }

The content-box value, used in the following properties:

boxSizing contentBox

backgroundClip contentBox

backgroundOrigin contentBox

strokeOrigin contentBox
fillBox : Value { provides | fillBox : Supported }

The fill-box value used by strokeOrigin and transformBox.

strokeOrigin fillBox


transformBox fillBox
strokeBox : Value { provides | strokeBox : Supported }

The stroke-box value used by strokeOrigin and transformBox.

strokeOrigin strokeBoxx


transformBox strokeBox
viewBox : Value { provides | viewBox : Supported }

The view-box value used by transformBox.

transformBox viewBox

Typographic values

baseline : Value { provides | baseline : Supported }

The baseline value, used in the following properties:

alignItems baseline

verticalAlign baseline
sub : Value { provides | sub : Supported }

A sub value for the following properties:

    fontVariantPosition sub

    verticalAlign sub
super : Value { provides | super : Supported }

A super value for the following properties:

    fontVariantPosition super

    verticalAlign super
ruby : Value { provides | ruby : Supported }

The ruby value used by display and fontVariantEastAsian.

display ruby


fontVariantEastAsian2 ruby jis83
fullWidth : Value { provides | fullWidth : Supported }

A full-width value for:

textTransform

Forces the writing of characters in a square so they can be aligned in East Asian scripts.

fontVariantEastAsian

Activates the East Asian characters that are roughly be the same width.

textTransform fullWidth


fontVariantEastAsian fullWidth
under : Value { provides | under : Supported }

A under value for the textUnderlinePosition property and the textEmphasisPosition2 property.

textUnderlinePosition under


textEmphasisPosition2 under left_
circle_ : Value { provides | circle_ : Supported }

The circle value used by properties such as listStyle, listStyleType, textEmphasis and textEmphasisStyle.

listStyleType circle_


textEmphasis2 circle_ (hex "ff0000")


textEmphasisStyle circle_

Note: This is not to be confused with circle, circleAt or circleAt2, which are <basic-shape> data types.

Visibility

hidden : Value { provides | hidden : Supported }

The hidden value used for properties such as visibility, overflow and borderStyle.

visibility hidden


overflow hidden


borderStyle hidden
visible : Value { provides | visible : Supported }

The visible value used for properties such as visibility, overflow and pointer-events.

visibility visible


overflow visible


pointerEvents visible

Thickness

thin : Value { provides | thin : Supported }

The thin value used by various properties.

In borderWidth and columnRuleWidth, the value is equivalent to 1px.

borderWidth thin


columnRuleWidth thin

It's also used in scrollbarWidth.

scrollbarWidth thin
thick : Value { provides | thick : Supported }

The thick value used by properties such as borderWidth, and columnRuleWidth.

borderWidth thick


columnRuleWidth thick

The value is equivalent of 5px.

Miscellaneous shared

normal : Value { provides | normal : Supported }

The normal value, which can be used with such properties as:

alignItems normal

columnGap normal

fontVariantCaps normal

whiteSpace normal

wordBreak normal

zoom normal
strict : Value { provides | strict : Supported }

Sets strict value for usage with lineBreak and contain.

contain strict


lineBreak strict
all_ : Value { provides | all_ : Supported }

The all value used in properties such as columnSpan and pointerEvents.

columnSpan all_


pointerEvents all_

This value function has an underscore because all is already a property function.

both : Value { provides | both : Supported }

Sets both value for usage with clear and resize.

  clear both


  resize both
always : Value { provides | always : Supported }

Sets always value for usage with scrollSnapStop, pageBreakBefore, and pageBreakAfter.

scrollSnapStop always


pageBreakBefore always


pageBreakAfter always
scroll : Value { provides | scroll : Supported }

The scroll value used for properties such as overflow and background-attachment.

overflow scroll


backgroundAttachment scroll
column : Value { provides | column : Supported }

The column value, used in flex-direction, break-before and break-after properties.

flexDirection column


breakBefore column


breakAfter column
content : Value { provides | content : Supported }

The content value used in the following properties:

flexBasis content

contain content
fill_ : Value { provides | fill_ : Supported }

The fill value used in properties such as objectFit, pointerEvents, paintOrder and maskBorderSlice.

objectFit fill_


pointerEvents fill_


paintOrder2 fill_ markers


maskBorderSlice4 fill_ (num 20) (pct 10) (num 45)

The value is called fill_ instead of fill because fill is already a property function.

stroke : Value { provides | stroke : Supported }

The stroke value used by pointerEvents and paintOrder.

pointerEvents stroke


paintOrder2 stroke markers
text : Value { provides | text : Supported }

The text value for the cursor, backgroundClip, and user-select properties.

backgroundClip text


cursor text


userSelect text
style : Value { provides | style : Supported }

Sets the style value for:

    contain style

    fontSynthesis style
clip : Value { provides | clip : Supported }

The clip value used by overflow and textOverflow.

overflow clip


overflowX clip


overflowY clip


textOverflow clip
cover : Value { provides | cover : Supported }

Sets cover for the following properties:

backgroundSize cover

strokeSize cover
contain_ : Value { provides | contain_ : Supported }

Sets contain for the following properties:

  • backgroundSize (It always show the whole background image, even if it leaves empty spaces on the sides.)
  • objectFit (Replaced content is scaled to maintain proportions within the element's content box.)
  • userSelect (Lets selection start within the element but that selection will be contained within that element's bounds.)
  • overscrollBehavior (This means that default scroll overflow behavior is observed inside the element, but scroll chaining will not happen to neighbouring elements.)
backgroundSize contain_

overscrollBehavior contain_

The value is called contain_ instead of contain because contain is already a property function.

repeat : Value { provides | repeat : Supported }

The repeat value for background properties and strokeRepeat.

backgroundRepeat repeat


strokeRepeat repeat
noRepeat : Value { provides | repeat : Supported }

The no-repeat value for background properties and strokeRepeat.

backgroundRepeat noRepeat


strokeRpeat noRepeat
repeatX : Value { provides | repeatX : Supported }

The repeat-x value for repeating backgrounds and strokeRepeat.

backgroundRepeat repeatX


strokeRepeat repeatX
repeatY : Value { provides | repeatY : Supported }

The repeat-y value for repeating backgrounds and strokeRepeat.

backgroundRepeat repeatY


strokeRepeat repeatY
space : Value { provides | space : Supported }

The space value for repeating backgrounds and strokeRepeat.

backgroundRepeat space


strokeRepeat space
round_ : Value { provides | round_ : Supported }

The round value used for properties such as:

This is called round_ because round is a function word used in Elm Core's Basics module.

    backgroundRepeat round_

    strokeLineCap round_

    strokeLinejoin2 miter round_

    strokeRepeat round_
isolate : Value { provides | isolate : Supported }

Sets isolate value for usage with isolation, and unicodeBidi.

isolation isolate


unicodeBidi isolate
matchParent : Value { provides | matchParent : Supported }

A match-parent value for the text-align, and strokeOrigin properties.

textAlign matchParent


strokeOrigin matchParent
nowrap : Value { provides | nowrap : Supported }

A nowrap value for the white-space and flex-wrapproperties.

whiteSpace nowrap


flexWrap nowrap

All

all : BaseValue a -> Style

Sets an all property.

all inherit

Display

BaseValue
{ block : Supported
, flex_ : Supported
, flow : Supported
, flowRoot : Supported
, grid_ : Supported
, listItem : Supported
, inline : Supported
, inlineBlock : Supported
, inlineFlex : Supported
, inlineGrid : Supported
, inlineTable : Supported
, none : Supported
, contents : Supported
, ruby : Supported
, rubyBase : Supported
, rubyBaseContainer : Supported
, rubyText : Supported
, rubyTextContainer : Supported
, runIn : Supported
, table : Supported
, tableCaption : Supported
, tableCell : Supported
, tableColumn : Supported
, tableColumnGroup : Supported
, tableFooterGroup : Supported
, tableHeaderGroup : Supported
, tableRow : Supported
, tableRowGroup : Supported
}
-> Style

Sets display.

display block

Note: This function accepts flex_ and grid_ ather than flex and grid because flex and grid are already property functions.

{ block : Supported
, inline : Supported
, runIn : Supported
}
-> Value
{ flow : Supported
, flowRoot : Supported
, table : Supported
, flex_ : Supported
, grid_ : Supported
, ruby : Supported
}
-> Style

Sets display.

display2 block flex_

Note: This function accepts flex_ and grid_ ather than flex and grid because flex and grid are already property functions.

For display: inline list-item and similar property values that include list-item look at displayListItem2 and displayListItem3.

{ block : Supported
, inline : Supported
, runIn : Supported
, flow : Supported
, flowRoot : Supported
}
-> Style

The display property. This function is used to generate complex display: list-item properties such as display: block list-item.

displayListItem2 block
{ block : Supported
, inline : Supported
, runIn : Supported
}
-> Value
{ flow : Supported
, flowRoot : Supported
}
-> Style

The display property. This function is used to generate complex display: list-item properties such as display: block flow-root list-item.

displayListItem3 block flowRoot
flex_ : Value { provides | flex_ : Supported }

The flex value used by display.

display flex_

The value is called flex_ instead of flex because flex is already a property function.

flow : Value { provides | flow : Supported }

The flow value used by display.

display flow
flowRoot : Value { provides | flowRoot : Supported }

The flow-root value used by display.

display flowRoot
grid_ : Value { provides | grid_ : Supported }

The grid value used by display.

The value is called grid_ instead of grid because grid is already a property function.

display grid_
contents : Value { provides | contents : Supported }

The contents value used by display.

display contents
listItem : Value { provides | listItem : Supported }

The list-item value used by display.

display listItem
inlineBlock : Value { provides | inlineBlock : Supported }

The inline-block value used by display.

display inlineBlock
inlineFlex : Value { provides | inlineFlex : Supported }

The inline-flex value used by display.

display inlineFlex
inlineTable : Value { provides | inlineTable : Supported }

The inline-table value used by display.

display inlineTable
inlineGrid : Value { provides | inlineGrid : Supported }

The inline-grid value used by display.

display inlineGrid
rubyBase : Value { provides | rubyBase : Supported }

The ruby-base value used by display.

display rubyBase
rubyBaseContainer : Value { provides | rubyBaseContainer : Supported }

The ruby-base-container value used by display.

display rubyBaseContainer
rubyText : Value { provides | rubyText : Supported }

The ruby-text value used by display.

display rubyText
rubyTextContainer : Value { provides | rubyTextContainer : Supported }

The ruby-text-container value used by display.

display rubyTextContainer
runIn : Value { provides | runIn : Supported }

The run-in value used by display.

display runIn
table : Value { provides | table : Supported }

The table value used by display.

display table
tableCaption : Value { provides | tableCaption : Supported }

The table-caption value used by display.

display tableCaption
tableCell : Value { provides | tableCell : Supported }

The table-cell value used by display.

display tableCell
tableColumn : Value { provides | tableColumn : Supported }

The table-column value used by display.

display tableColumn
tableColumnGroup : Value { provides | tableColumnGroup : Supported }

The table-column-group value used by display.

display tableColumnGroup
tableFooterGroup : Value { provides | tableFooterGroup : Supported }

The table-footer-group value used by display.

display tableFooterGroup
tableHeaderGroup : Value { provides | tableHeaderGroup : Supported }

The table-header-group value used by display.

display tableHeaderGroup
tableRow : Value { provides | tableRow : Supported }

The table-row value used by display.

display tableRow
tableRowGroup : Value { provides | tableRowGroup : Supported }

The table-row-group value used by display.

display tableRowGroup

Position

BaseValue
{ absolute : Supported
, fixed : Supported
, relative : Supported
, static : Supported
, sticky : Supported
}
-> Style

Sets the position of an element.

position absolute


position relative
absolute : Value { provides | absolute : Supported }

An absolute position.

position absolute

The default position value is static. See also position: sticky, and [the differences between absolute, relative, and fixed positioning](https://css-tricks.com/absolute-relative-fixed-positioining-how-do-they-differ/

fixed : Value { provides | fixed : Supported }

A fixed position or fixed background-attachment or fixed table-layout.

position fixed


backgroundAttachment fixed


tableLayout fixed

The default position value is static. See also position: sticky, and the differences between absolute, relative, and fixed positioning

relative : Value { provides | relative : Supported }
static : Value { provides | static : Supported }

A static position.

position static

This is the default position value. See also position: sticky, and the differences between absolute, relative, and fixed positioning.

sticky : Value { provides | sticky : Supported }

A sticky position

position sticky

The default position value is static. See also the differences between absolute, relative, and fixed positioning.


Stacking contexts & box-sizing

BaseValue
{ int : Supported
, auto : Supported
}
-> Style

Sets z-index

zIndex (int 10)


zIndex auto

NOTE: Z-index is not as simple as it looks! Make sure to read about stacking contexts if you're not already familiar with them.

BaseValue
{ auto : Supported
, isolate : Supported
}
-> Style

Sets isolation

isolation auto


isolation isolate
BaseValue
{ contentBox : Supported
, borderBox : Supported
}
-> Style

Sets box-sizing property.

boxSizing contentBox


boxSizing borderBox

Contain

BaseValue
{ none : Supported
, strict : Supported
, content : Supported
, size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Style

The contain property.

contain none


contain content


contain2 size layout


contain3 size layout style


contain4 -- all multiple choice values in use, no value entry needed
{ size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Value
{ size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Style

The contain property.

This two-argument version lets you use 2 of the 4 multiple choice values you can use for this property.

contain2 size layout
{ size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Value
{ size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Value
{ size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Style

The contain property.

This two-argument version lets you use 3 of the 4 multiple choice values you can use for this property.

contain3 size layout style
{ size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Value
{ size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Value
{ size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Value
{ size : Supported
, inlineSize_ : Supported
, layout : Supported
, style : Supported
, paint : Supported
}
-> Style

The contain property.

This 4-argument version lets you use all 4 multiple choice values you can use for this property.

contain4 size layout style paint

Note: The style value is considered at-risk from being depreciated.

size : Value { provides | size : Supported }

Sets the size value for contain.

This indicates that the element can be sized without needing to look at the size of its descendants.

contain size
inlineSize_ : Value { provides | inlineSize_ : Supported }

Sets the inline-size value for contain.

Indicates that inline size containment is applied to the element.

contain inlineSize_

Note: This is named inlineSize_ instead of inlineSize because it is already a property function.

layout : Value { provides | layout : Supported }

Sets the layout value for contain.

This indicates that nothing outside the element may affect its internal layout and vice versa.

contain layout
paint : Value { provides | paint : Supported }

Sets the paint value for contain.

Indicates that descendants of the element will not display outside its bounds and will not be painted by the browser if the containing box is offscreen.

contain paint
containIntrinsicSize : BaseValue (LengthSupported { none : Supported }) -> Style

The contain-intrinsic-size property.

This 1-argument variant lets you use global values, none and lengths for width and height.

containIntrinsicSize revert


containIntrinsicSize none


                -- width + height
containIntrinsicSize (px 500)


                    -- width | height
containIntrinsicSize2 (rem 5) (px 800)


                -- width + height w/ auto
containIntrinsicSize2 auto (px 800)


                  -- width w/ auto | height w/ auto
containIntrinsicSize4 auto (rem 50) auto (px 250)
Value (LengthSupported { auto : Supported })
-> Value Length
-> Style

The contain-intrinsic-size property.

This 2-argument variant lets you use separate lengths for width and height or joined with and height with auto.

containIntrinsicSize revert


containIntrinsicSize none


                -- width + height
containIntrinsicSize (px 500)


                    -- width | height
containIntrinsicSize2 (rem 5) (px 800)


                -- width + height w/ auto
containIntrinsicSize2 auto (px 800)


                  -- width w/ auto | height w/ auto
containIntrinsicSize4 auto (rem 50) auto (px 250)
Value { auto : Supported }
-> Value Length
-> Value { auto : Supported }
-> Value Length
-> Style

The contain-intrinsic-size property.

This 4-argument variant lets you use separate lengths for width and height with auto.

Note: The 1st and 3rd argument can only be auto.

containIntrinsicSize revert


containIntrinsicSize none


                -- width + height
containIntrinsicSize (px 500)


                    -- width | height
containIntrinsicSize2 (rem 5) (px 800)


                -- width + height w/ auto
containIntrinsicSize2 auto (px 800)


                  -- width w/ auto | height w/ auto
containIntrinsicSize4 auto (rem 50) auto (px 250)
containIntrinsicWidth : BaseValue (LengthSupported { none : Supported }) -> Style

The contain-intrinsic-width property.

This 1-argument variant lets you use global values, none and lengths.

containIntrinsicWidth revert


containIntrinsicWidth none


                 -- specified width
containIntrinsicWidth (px 500)


                 -- specified width w/ auto
containIntrinsicWidth2 auto (px 800)
containIntrinsicWidth2 : Value { auto : Supported } -> Value Length -> Style

The contain-intrinsic-width property.

This 2-argument variant lets you use lengths with auto.

Note: The 1st argument can only be auto.

containIntrinsicWidth revert


containIntrinsicWidth none


                 -- specified width
containIntrinsicWidth (px 500)


                 -- specified width w/ auto
containIntrinsicWidth2 auto (px 800)
containIntrinsicHeight : BaseValue (LengthSupported { none : Supported }) -> Style

The contain-intrinsic-height property.

This 1-argument variant lets you use global values, none and lengths.

containIntrinsicHeight revert


containIntrinsicHeight none


                 -- specified height
containIntrinsicHeight (px 500)


                 -- specified height w/ auto
containIntrinsicHeight2 auto (px 800)
containIntrinsicHeight2 : Value { auto : Supported } -> Value Length -> Style

The contain-intrinsic-height property.

This 2-argument variant lets you use lengths with auto.

Note: The 1st argument can only be auto.

containIntrinsicHeight revert


containIntrinsicHeight none


                 -- specified height
containIntrinsicHeight (px 500)


                 -- specified height w/ auto
containIntrinsicHeight2 auto (px 800)
containIntrinsicInlineSize : BaseValue (LengthSupported { none : Supported }) -> Style

The contain-intrinsic-inline-size property.

This 1-argument variant lets you use global values, none and lengths.

containIntrinsicInlineSize revert


containIntrinsicInlineSize none


            -- specified inline size
containIntrinsicInlineSize (px 500)


            -- specified inline size w/ auto
containIntrinsicInlineSize2 auto (px 800)
containIntrinsicInlineSize2 : Value { auto : Supported } -> Value Length -> Style

The contain-intrinsic-inline-size property.

This 2-argument variant lets you use lengths with auto.

Note: The 1st argument can only be auto.

containIntrinsicInlineSize revert


containIntrinsicInlineSize none


            -- specified inline size
containIntrinsicInlineSize (px 500)


            -- specified inline size w/ auto
containIntrinsicInlineSize2 auto (px 800)
containIntrinsicBlockSize : BaseValue (LengthSupported { none : Supported }) -> Style

The contain-intrinsic-block-size property.

This 1-argument variant lets you use global values, none and lengths.

containIntrinsicBlockSize revert


containIntrinsicBlockSize none


            -- specified block size
containIntrinsicBlockSize (px 500)


            -- specified block size w/ auto
containIntrinsicBlockSize2 auto (px 800)
containIntrinsicBlockSize2 : Value { auto : Supported } -> Value Length -> Style

The contain-intrinsic-block-size property.

This 2-argument variant lets you use lengths with auto.

Note: The 1st argument can only be auto.

containIntrinsicBlockSize revert


containIntrinsicBlockSize none


            -- specified block size
containIntrinsicBlockSize (px 500)


            -- specified block size w/ auto
containIntrinsicBlockSize2 auto (px 800)

Sizing

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The width property.

width (px 150)


width (em 1.5)


width auto


width minContent
BaseValue
(LengthSupported
{ pct : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The min-width property.

minWidth (px 150)


minWidth (em 1.5)


minWidth auto
BaseValue
(LengthSupported
{ pct : Supported
, none : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The max-width property.

maxWidth (px 150)


maxWidth (em 1.5)


maxWidth auto
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The height property.

height (px 34)
BaseValue
(LengthSupported
{ pct : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The min-height property.

minHeight (px 20)
BaseValue
(LengthSupported
{ pct : Supported
, none : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The max-height property.

maxHeight (px 20)
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The block-size property.

blockSize (px 20)
BaseValue
(LengthSupported
{ pct : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The min-block-size property.

minBlockSize (px 20)
BaseValue
(LengthSupported
{ pct : Supported
, none : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The max-block-size property.

maxBlockSize (px 20)
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The inline-size property.

inlineSize (px 20)
BaseValue
(LengthSupported
{ pct : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The min-inline-size property.

minInlineSize (px 20)
BaseValue
(LengthSupported
{ pct : Supported
, none : Supported
, maxContent : Supported
, minContent : Supported
, fitContent : Supported
, fitContentTo : Supported
}
)
-> Style

The max-inline-size property.

maxInlineSize (px 20)

Inset

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset property.

inset sets the top, bottom, left and right properties.

inset (px 10) -- top, bottom, left and right are all 10px.


inset2 (pct 5) (pct 5) -- top & bottom = 5%, left & right = 5%


inset3 (px 20) (px 20) (px 20) -- top = 20px, left & right = 20px, bottom = 20px


inset4 (px 20) (px 20) (px 40) (px 20) -- top = 20px, right = 20px, bottom = 40px, left = 20px
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset property.

inset sets the top, bottom, left and right properties.

inset (px 10) -- top, bottom, left and right are all 10px.


inset2 (pct 5) (pct 5) -- top & bottom = 5%, left & right = 5%


inset3 (px 20) (px 20) (px 20) -- top = 20px, left & right = 20px, bottom = 20px


inset4 (px 20) (px 20) (px 40) (px 20) -- top = 20px, right = 20px, bottom = 40px, left = 20px
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset property.

inset sets the top, bottom, left and right properties.

inset (px 10) -- top, bottom, left and right are all 10px.


inset2 (pct 5) (pct 5) -- top & bottom = 5%, left & right = 5%


inset3 (px 20) (px 20) (px 20) -- top = 20px, left & right = 20px, bottom = 20px


inset4 (px 20) (px 20) (px 40) (px 20) -- top = 20px, right = 20px, bottom = 40px, left = 20px
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset property.

inset sets the top, bottom, left and right properties.

inset (px 10) -- top, bottom, left and right are all 10px.


inset2 (pct 5) (pct 5) -- top & bottom = 5%, left & right = 5%


inset3 (px 20) (px 20) (px 20) -- top = 20px, left & right = 20px, bottom = 20px


inset4 (px 20) (px 20) (px 40) (px 20) -- top = 20px, right = 20px, bottom = 40px, left = 20px

Absolute insets

top :
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the top property.

top (px 10)


top (pct 50)


top auto


top zero

If you need to use top as a CSS value instead of as a property, for example in vertical-align: top, use top_ instead of this.

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the bottom property.

bottom (px 10)


bottom (pct 50)


bottom auto


bottom zero

If you need to use bottom as a CSS value instead of as a property, for example in vertical-align: bottom, use bottom_ instead of this.

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the left property.

left (px 10)


left (pct 50)


left auto


left zero

If you need to use left as a CSS value instead of as a property, for example in float: left, use left_ instead of this.

Logical insets

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset-block property.

inset-block sets the inset-block-start and inset-block-end properties.

insetBlock (px 10) -- block start and block end are both 10px.


insetBlock2 (pct 5) (pct 5) -- block start = 5%, block end = 5%
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset-block property.

inset-block sets the inset-block-start and inset-block-end properties.

insetBlock (px 10) -- block start and block end are both 10px.


insetBlock2 (pct 5) (pct 5) -- block start = 5%, block end = 5%
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset-inline property.

inset-inline sets the inset-inline-start and inset-inline-end properties.

insetInline (px 10) -- inline start and inline end are both 10px.


insetInline2 (pct 5) (pct 5) -- inline start = 5%, inline end = 5%
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset-inline property.

inset-inline sets the inset-inline-start and inset-inline-end properties.

insetInline (px 10) -- inline start and inline end are both 10px.


insetInline2 (pct 5) (pct 5) -- inline start = 5%, inline end = 5%
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset-block-start property.

insetBlockStart (px 10)


insetBlockStart (pct 50)


insetBlockStart auto


insetBlockStart zero
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset-block-end property.

insetBlockEnd (px 10)


insetBlockEnd (pct 50)


insetBlockEnd auto


insetBlockEnd zero
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset-inline-start property.

insetInlineStart (px 10)


insetInlineStart (pct 50)


insetInlineStart auto


insetInlineStart zero
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the inset-inline-end property.

insetInlineEnd (px 10)


insetInlineEnd (pct 50)


insetInlineEnd auto


insetInlineEnd zero

Margin

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin property. The margin property is a shorthand property for setting margin-top, margin-right, margin-bottom, and margin-left in a single declaration.

If there is only one argument value, it applies to all sides. If there are two values, the top and bottom margins are set to the first value and the right and left margins are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values they apply to the top, right, bottom, and left, respectively.

margin (em 4) -- set all margins to 4em


margin2 (em 4) (px 2) -- top & bottom = 4em, right & left = 2px


margin3 (em 4) (px 2) (pct 5) -- top = 4em, right = 2px, bottom = 5%, left = 2px


margin4 (em 4) (px 2) (pct 5) (px 3) -- top = 4em, right = 2px, bottom = 5%, left = 3px

You may want to check out this article on collapsing margins!

(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin property. The margin2 property is a shorthand property for setting margin-top, margin-right, margin-bottom, and margin-left in a single declaration.

The top and bottom margins are set to the first value and the right and left margins are set to the second.

margin2 (em 4) (px 2) -- top & bottom = 4em, right & left = 2px

You may want to check out this article on collapsing margins!

(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin property. The margin3 property is a shorthand property for setting margin-top, margin-right, margin-bottom, and margin-left in a single declaration.

The top margin is set to the first value, the left and right are set to the second, and the bottom is set to the third.

margin3 (em 4) (px 2) (pct 5) -- top = 4em, right = 2px, bottom = 5%, left = 2px

You may want to check out this article on collapsing margins!

(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin property. The margin4 property is a shorthand property for setting margin-top, margin-right, margin-bottom, and margin-left in a single declaration.

The four values apply to the top, right, bottom, and left margins.

margin4 (em 4) (px 2) (pct 5) (px 3) -- top = 4em, right = 2px, bottom = 5%, left = 3px

You may want to check out this article on collapsing margins!

Absolute margin edges

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-top property.

marginTop (px 4)

This article on margin-top versus margin-bottom may be useful.

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-right property.

marginRight (px 4)
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-bottom property.

marginBottom (px 4)

This article on margin-top versus margin-bottom may be useful.

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-left property.

marginLeft (px 4)

Logical margin edges

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-block property. The margin-block property is a shorthand property for setting margin-block-start and margin-block-end in a single declaration.

If there is only one argument value, it applies to both sides. If there are two values, the block start margin is set to the first value and the block end margin is set to the second.

marginBlock (em 4) -- set both block margins to 4em


marginBlock2 (em 4) (px 2) -- block start = 4em, block end = 2px

You may want to check out this article on collapsing margins!

(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-block property. The margin-block property is a shorthand property for setting margin-block-start and margin-block-end in a single declaration.

The block start margin is set to the first value and the block end margin is set to the second.

marginBlock2 (em 4) (px 2) -- block start = 4em, block end = 2px

You may want to check out this article on collapsing margins!

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-block-start property.

marginBlockStart (px 4)
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-block-end property.

marginBlockEnd (px 4)
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-inline property. The margin-inline property is a shorthand property for setting margin-inline-start and margin-inline-end in a single declaration.

If there is only one argument value, it applies to both sides. If there are two values, the inline start margin is set to the first value and the inline end margin is set to the second.

marginInline (em 4) -- set both inline margins to 4em


marginInline2 (em 4) (px 2) -- inline start = 4em, inline end = 2px

You may want to check out this article on collapsing margins!

(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-inline property. The margin-inline property is a shorthand property for setting margin-inline-start and margin-inline-end in a single declaration.

The inline start margin is set to the first value and the inline end margin is set to the second.

marginInline2 (em 4) (px 2) -- inline start = 4em, inline end = 2px

You may want to check out this article on collapsing margins!

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-inline-start property.

marginInlineStart (px 4)
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets margin-inline-end property.

marginInlineEnd (px 4)

Padding

padding : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding property. The padding property is a shorthand property for setting padding-top, padding-right, padding-bottom, and padding-left in a single declaration.

If there is only one argument value, it applies to all sides. If there are two values, the top and bottom paddings are set to the first value and the right and left paddings are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values they apply to the top, right, bottom, and left, respectively.

padding (em 4) -- set all margins to 4em


padding2 (em 4) (px 2) -- top & bottom = 4em, right & left = 2px


padding3 (em 4) (px 2) (pct 5) -- top = 4em, right = 2px, bottom = 5%, left = 2px


padding4 (em 4) (px 2) (pct 5) (px 3) -- top = 4em, right = 2px, bottom = 5%, left = 3px
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets padding property. The padding2 property is a shorthand property for setting padding-top, padding-right, padding-bottom, and padding-left in a single declaration.

The top and bottom margins are set to the first value and the right and left margins are set to the second.

padding2 (em 4) (px 2) -- top & bottom = 4em, right & left = 2px
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets padding property. The padding3 property is a shorthand property for setting padding-top, padding-right, padding-bottom, and padding-left in a single declaration.

The top padding is set to the first value, the left and right are set to the second, and the bottom is set to the third.

padding3 (em 4) (px 2) (pct 5) -- top = 4em, right = 2px, bottom = 5%, left = 2px
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets padding property. The padding4 property is a shorthand property for setting padding-top, padding-right, padding-bottom, and padding-left in a single declaration.

The four values apply to the top, right, bottom, and left paddings.

padding4 (em 4) (px 2) (pct 5) (px 3) -- top = 4em, right = 2px, bottom = 5%, left = 3px

Absolute padding edges

paddingTop : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-top property.

paddingTop (px 4)
paddingRight : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-right property.

paddingRight (px 4)
paddingBottom : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-bottom property.

paddingBottom (px 4)
paddingLeft : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-left property.

paddingLeft (px 4)

Logical padding edges

paddingBlock : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-block property. The padding-block property is a shorthand property for setting padding-block-start and padding-block-end in a single declaration.

If there is only one argument value, it applies to both sides. If there are two values, the block start is set to the first value and the block end is set to the second.

paddingBlock (em 4) -- set both block start and block end to 4em


paddingBlock2 (em 4) (px 2) -- block start = 4em, block end = 2px
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets padding-block property.

The padding-block property is a shorthand property for setting padding-block-start and padding-block-end in a single declaration.

The block start value is set to the first value and the block end value is set to the second.

paddingBlock2 (em 4) (px 2) -- block start = 4em, block end = 2px
paddingBlockStart : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-block-start property.

paddingBlockStart (px 4)
paddingBlockEnd : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-block-end property.

paddingBlockEnd (px 4)
paddingInline : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-inline property.

The padding-inline property is a shorthand property for setting padding-inline-start and padding-inline-end and in a single declaration.

If there is only one argument value, it applies to both sides. If there are two values, the inline start is set to the first value and the inline end is set to the second.

paddingInline (em 4) -- set both inline start and inline end to 4em


paddingInline2 (em 4) (px 2) -- inline start = 4em, inline end = 2px
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets padding-inline property.

The padding-inline property is a shorthand property for setting padding-inline-start and padding-inline-end in a single declaration.

The inline start value is set to the first value and the inline end value is set to the second.

paddingInline2 (em 4) (px 2) -- inline start = 4em, inline end = 2px
paddingInlineStart : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-inline-start property.

paddingInlineStart (px 4)
paddingInlineEnd : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets padding-inline-end property.

paddingInlineEnd (px 4)

Borders

border : BaseValue LineWidth -> Style

Sets border property.

border (px 1)


border2 (px 1) solid


border3 (px 1) solid (hex "#f00")
border2 : Value LineWidth -> Value LineStyle -> Style

Sets border property.

border (px 1)


border2 (px 1) solid


border3 (px 1) solid (hex "#f00")
border3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border property.

border (px 1)


border2 (px 1) solid


border3 (px 1) solid (hex "#f00")

Absolute border edges

borderTop : BaseValue LineWidth -> Style

Sets border-top property.

borderTop (px 1)


borderTop2 (px 1) solid


borderTop3 (px 1) solid (hex "#f00")
borderTop2 : Value LineWidth -> Value LineStyle -> Style

Sets border-top property.

borderTop (px 1)


borderTop2 (px 1) solid


borderTop3 (px 1) solid (hex "#f00")
borderTop3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-top property.

borderTop (px 1)


borderTop2 (px 1) solid


borderTop3 (px 1) solid (hex "#f00")
borderRight : BaseValue LineWidth -> Style

Sets border-right property.

borderRight (px 1)


borderRight2 (px 1) solid


borderRight3 (px 1) solid (hex "#f00")
borderRight2 : Value LineWidth -> Value LineStyle -> Style

Sets border-right property.

borderRight (px 1)


borderRight2 (px 1) solid


borderRight3 (px 1) solid (hex "#f00")
borderRight3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-right property.

borderRight (px 1)


borderRight2 (px 1) solid


borderRight3 (px 1) solid (hex "#f00")
borderBottom : BaseValue LineWidth -> Style

Sets border-bottom property.

borderBottom (px 1)


borderBottom2 (px 1) solid


borderBottom3 (px 1) solid (hex "#f00")
borderBottom2 : Value LineWidth -> Value LineStyle -> Style

Sets border-bottom property.

borderBottom (px 1)


borderBottom2 (px 1) solid


borderBottom3 (px 1) solid (hex "#f00")
borderBottom3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-bottom property.

borderBottom (px 1)


borderBottom2 (px 1) solid


borderBottom3 (px 1) solid (hex "#f00")
borderLeft : BaseValue LineWidth -> Style

Sets border-left property.

borderLeft (px 1)


borderLeft2 (px 1) solid


borderLeft3 (px 1) solid (hex "#f00")
borderLeft2 : Value LineWidth -> Value LineStyle -> Style

Sets border-left property.

borderLeft (px 1)


borderLeft2 (px 1) solid


borderLeft3 (px 1) solid (hex "#f00")
borderLeft3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-left property.

borderLeft (px 1)


borderLeft2 (px 1) solid


borderLeft3 (px 1) solid (hex "#f00")

Logical border edges

borderBlock : BaseValue LineWidth -> Style

Sets border-block property.

borderBlock (px 1)


borderBlock2 (px 1) solid


borderBlock3 (px 1) solid (hex "#f00")
borderBlock2 : Value LineWidth -> Value LineStyle -> Style

Sets border-block property.

borderBlock (px 1)


borderBlock2 (px 1) solid


borderBlock3 (px 1) solid (hex "#f00")
borderBlock3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-block property.

borderBlock (px 1)


borderBlock2 (px 1) solid


borderBlock3 (px 1) solid (hex "#f00")
borderBlockStart : BaseValue LineWidth -> Style

Sets border-block-start property.

borderBlockStart (px 1)


borderBlockStart2 (px 1) solid


borderBlockStart3 (px 1) solid (hex "#f00")
borderBlockStart2 : Value LineWidth -> Value LineStyle -> Style

Sets border-block-start property.

borderBlockStart (px 1)


borderBlockStart2 (px 1) solid


borderBlockStart3 (px 1) solid (hex "#f00")
borderBlockStart3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-block-start property.

borderBlockStart (px 1)


borderBlockStart2 (px 1) solid


borderBlockStart3 (px 1) solid (hex "#f00")
borderBlockEnd : BaseValue LineWidth -> Style

Sets border-block-end property.

borderBlockEnd (px 1)


borderBlockEnd2 (px 1) solid


borderBlockEnd3 (px 1) solid (hex "#f00")
borderBlockEnd2 : Value LineWidth -> Value LineStyle -> Style

Sets border-block-end property.

borderBlockEnd (px 1)


borderBlockEnd2 (px 1) solid


borderBlockEnd3 (px 1) solid (hex "#f00")
borderBlockEnd3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-block-end property.

borderBlockEnd (px 1)


borderBlockEnd2 (px 1) solid


borderBlockEnd3 (px 1) solid (hex "#f00")
borderInline : BaseValue LineWidth -> Style

Sets border-inline property.

borderInline (px 1)


borderInline2 (px 1) solid


borderInline3 (px 1) solid (hex "#f00")
borderInline2 : Value LineWidth -> Value LineStyle -> Style

Sets border-inline property.

borderInline (px 1)


borderInline2 (px 1) solid


borderInline3 (px 1) solid (hex "#f00")
borderInline3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-inline property.

borderInline (px 1)


borderInline2 (px 1) solid


borderInline3 (px 1) solid (hex "#f00")
borderInlineStart : BaseValue LineWidth -> Style

Sets border-inline-start property.

borderInlineStart (px 1)


borderInlineStart2 (px 1) solid


borderInlineStart3 (px 1) solid (hex "#f00")
borderInlineStart2 : Value LineWidth -> Value LineStyle -> Style

Sets border-inline-start property.

borderInlineStart (px 1)


borderInlineStart2 (px 1) solid


borderInlineStart3 (px 1) solid (hex "#f00")
borderInlineStart3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-inline-start property.

borderInlineStart (px 1)


borderInlineStart2 (px 1) solid


borderInlineStart3 (px 1) solid (hex "#f00")
borderInlineEnd : BaseValue LineWidth -> Style

Sets border-inline-end property.

borderInlineEnd (px 1)


borderInlineEnd2 (px 1) solid


borderInlineEnd3 (px 1) solid (hex "#f00")
borderInlineEnd2 : Value LineWidth -> Value LineStyle -> Style

Sets border-inline-end property.

borderInlineEnd (px 1)


borderInlineEnd2 (px 1) solid


borderInlineEnd3 (px 1) solid (hex "#f00")
borderInlineEnd3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets border-inline-end property.

borderInlineEnd (px 1)


borderInlineEnd2 (px 1) solid


borderInlineEnd3 (px 1) solid (hex "#f00")

Border width

borderWidth : BaseValue LineWidth -> Style

Sets border-width property.

borderWidth (px 1)


borderWidth2 (px 1) thin


borderWidth3 (px 1) thin zero


borderWidth4 (px 1) thin zero (em 1)
borderWidth2 : Value LineWidth -> Value LineWidth -> Style

Sets border-width property.

borderWidth (px 1)


borderWidth2 (px 1) thin


borderWidth3 (px 1) thin zero


borderWidth4 (px 1) thin zero (em 1)
borderWidth3 : Value LineWidth -> Value LineWidth -> Value LineWidth -> Style

Sets border-width property.

borderWidth (px 1)


borderWidth2 (px 1) thin


borderWidth3 (px 1) thin zero


borderWidth4 (px 1) thin zero (em 1)
Value LineWidth
-> Value LineWidth
-> Value LineWidth
-> Value LineWidth
-> Style

Sets border-width property.

borderWidth (px 1)


borderWidth2 (px 1) thin


borderWidth3 (px 1) thin zero


borderWidth4 (px 1) thin zero (em 1)
borderTopWidth : BaseValue LineWidth -> Style

Sets border-top-width property.

borderTopWidth (px 1)
borderRightWidth : BaseValue LineWidth -> Style

Sets border-right-width property.

borderRightWidth (px 1)
borderBottomWidth : BaseValue LineWidth -> Style

Sets border-bottom-width property.

borderBottomWidth (px 1)
borderLeftWidth : BaseValue LineWidth -> Style

Sets border-left-width property.

borderLeftWidth (px 1)
borderBlockWidth : BaseValue LineWidth -> Style

Sets border-block-width property.

borderBlockWidth (px 1)
borderBlockStartWidth : BaseValue LineWidth -> Style

Sets border-block-start-width property.

borderBlockStartWidth (px 1)
borderBlockEndWidth : BaseValue LineWidth -> Style

Sets border-block-end-width property.

borderBlockEndWidth (px 1)
borderInlineWidth : BaseValue LineWidth -> Style

Sets border-inline-width property.

borderTopWidth (px 1)
borderInlineStartWidth : BaseValue LineWidth -> Style

Sets border-inline-start-width property.

borderInlineStartWidth (px 1)
borderInlineEndWidth : BaseValue LineWidth -> Style

Sets border-inline-end-width property.

borderInlineEndWidth (px 1)

Border style

borderStyle : BaseValue LineStyle -> Style

Sets border-style property.

borderStyle solid


borderStyle2 solid none


borderStyle3 solid none dotted


borderStyle4 solid none dotted groove
borderStyle2 : Value LineStyle -> Value LineStyle -> Style

Sets border-style property.

borderStyle solid
borderStyle3 : Value LineStyle -> Value LineStyle -> Value LineStyle -> Style

Sets border-style property.

borderStyle2 solid none
Value LineStyle
-> Value LineStyle
-> Value LineStyle
-> Value LineStyle
-> Style

Sets border-style property.

borderStyle4 solid none dotted groove
borderTopStyle : BaseValue LineStyle -> Style

Sets border-top-style property.

borderTopStyle solid
borderRightStyle : BaseValue LineStyle -> Style

Sets border-right-style property.

borderRightStyle solid
borderBottomStyle : BaseValue LineStyle -> Style

Sets border-bottom-style property.

borderBottomStyle solid
borderLeftStyle : BaseValue LineStyle -> Style

Sets border-left-style property.

borderLeftStyle solid
borderBlockStyle : BaseValue LineStyle -> Style

Sets border-block-style property.

borderBlockStyle solid
borderBlockStartStyle : BaseValue LineStyle -> Style

Sets border-block-start-style property.

borderBlockStartStyle solid
borderBlockEndStyle : BaseValue LineStyle -> Style

Sets border-block-end-style property.

borderBlockEndStyle solid
borderInlineStyle : BaseValue LineStyle -> Style

Sets border-inline-style property.

borderInlineStyle solid
borderInlineStartStyle : BaseValue LineStyle -> Style

Sets border-inline-start-style property.

borderInlineStartStyle solid
borderInlineEndStyle : BaseValue LineStyle -> Style

Sets border-inline-end-style property.

borderInlineEndStyle solid
dotted : Value { provides | dotted : Supported }

The dotted value used by properties such as borderStyle, columnRuleStyle, and textDecorationStyle.

It represents a line that consists of dots.

borderStyle dotted


columnRuleStyle dotted


textDecorationStyle dotted
dashed : Value { provides | dashed : Supported }

The dashed value used by properties such as borderStyle, columnRuleStyle, and textDecorationStyle.

borderStyle dashed


columnRuleStyle dashed


textDecorationStyle dashed

It represents a line that consists of dashes.

solid : Value { provides | solid : Supported }

The solid value used by properties such as borderStyle, columnRuleStyle, and textDecorationStyle.

borderStyle solid


columnRuleStyle solid


textDecorationStyle solid

It represents a solid, continuous line.

double : Value { provides | double : Supported }

The double value used by properties such as borderStyle, columnRuleStyle, and textDecorationStyle.

borderStyle double


columnRuleStyle double


textDecorationStyle double

It represents a double line: two lines side by side.

groove : Value { provides | groove : Supported }

The groove value used by properties such as borderStyle, columnRuleStyle, and textDecorationStyle.

borderStyle groove


columnRuleStyle groove


textDecorationStyle groove

Adds a bevel based on the color value, which makes things appear pressed into the document.

ridge : Value { provides | ridge : Supported }

The ridge value used by properties such as borderStyle, columnRuleStyle, and textDecorationStyle.

borderStyle ridge


columnRuleStyle ridge


textDecorationStyle ridge

Similar to groove, but reverses the color values in a way that makes things appear raised.

inset_ : Value { provides | inset_ : Supported }

The inset value used by properties such as borderStyle, columnRuleStyle, and textDecorationStyle.

This is called inset_ rather than inset because inset is already a property function.

borderStyle inset_


columnRuleStyle inset_


textDecorationStyle inset_

Adds a split tone to the line that makes it appear slightly depressed.

Contrast with outset

outset : Value { provides | outset : Supported }

The outset value used by properties such as borderStyle, columnRuleStyle, and textDecorationStyle, and strokeAlign.

borderStyle outset


columnRuleStyle outset


strokeAlign outset


textDecorationStyle outset

Similar to inset_, but reverses the colors in a way that makes it appear slightly raised.

Border color

borderColor : BaseValue Color -> Style

Sets border-color property.

borderColor (rgb 0 0 0)


borderColor2 (rgb 0 0 0) (hsl 10 10 10)


borderColor3 (rgb 0 0 0) (hsl 10 10 10) (hex "#fff")


borderColor4 (rgb 0 0 0) (hsl 10 10 10) (hex "#fff") transparent
borderColor2 : Value Color -> Value Color -> Style

Sets border-color property.

borderColor (rgb 0 0 0)


borderColor2 (rgb 0 0 0) (hsl 10 10 10)


borderColor3 (rgb 0 0 0) (hsl 10 10 10) (hex "#fff")


borderColor4 (rgb 0 0 0) (hsl 10 10 10) (hex "#fff") transparent
borderColor3 : Value Color -> Value Color -> Value Color -> Style

Sets border-color property.

borderColor (rgb 0 0 0)


borderColor2 (rgb 0 0 0) (hsl 10 10 10)


borderColor3 (rgb 0 0 0) (hsl 10 10 10) (hex "#fff")


borderColor4 (rgb 0 0 0) (hsl 10 10 10) (hex "#fff") transparent
borderColor4 : Value Color -> Value Color -> Value Color -> Value Color -> Style

Sets border-color property.

borderColor (rgb 0 0 0)


borderColor2 (rgb 0 0 0) (hsl 10 10 10)


borderColor3 (rgb 0 0 0) (hsl 10 10 10) (hex "#fff")


borderColor4 (rgb 0 0 0) (hsl 10 10 10) (hex "#fff") transparent
borderTopColor : BaseValue Color -> Style

Sets border-top-color property.

borderTopColor (rgb 0 0 0)
borderRightColor : BaseValue Color -> Style

Sets border-right-color property.

borderRightColor (rgb 0 0 0)
borderBottomColor : BaseValue Color -> Style

Sets border-bottom-color property.

borderBottomColor (rgb 0 0 0)
borderLeftColor : BaseValue Color -> Style

Sets border-left-color property.

borderLeftColor (rgb 0 0 0)
borderBlockColor : BaseValue Color -> Style

Sets border-block-color property.

borderBlockColor (rgb 0 0 0)
borderBlockStartColor : BaseValue Color -> Style

Sets border-block-start-color property.

borderBlockStartColor (rgb 0 0 0)
borderBlockEndColor : BaseValue Color -> Style

Sets border-block-end-color property.

borderBlockEndColor (rgb 0 0 0)
borderInlineColor : BaseValue Color -> Style

Sets border-inline-color property.

borderInlineColor (rgb 0 0 0)
borderInlineStartColor : BaseValue Color -> Style

Sets border-inline-start-color property.

borderInlineStartColor (rgb 0 0 0)
borderInlineEndColor : BaseValue Color -> Style

Sets border-inline-end-color property.

borderInlineEndColor (rgb 0 0 0)

Border radius

borderRadius : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets border-radius property.

borderRadius (em 4)


borderRadius2 (em 4) (px 2)


borderRadius3 (em 4) (px 2) (pct 5)


borderRadius4 (em 4) (px 2) (pct 5) (px 3)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-radius property.

borderRadius (em 4)


borderRadius2 (em 4) (px 2)


borderRadius3 (em 4) (px 2) (pct 5)


borderRadius4 (em 4) (px 2) (pct 5) (px 3)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-radius property.

borderRadius (em 4)


borderRadius2 (em 4) (px 2)


borderRadius3 (em 4) (px 2) (pct 5)


borderRadius4 (em 4) (px 2) (pct 5) (px 3)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-radius property.

borderRadius (em 4)


borderRadius2 (em 4) (px 2)


borderRadius3 (em 4) (px 2) (pct 5)


borderRadius4 (em 4) (px 2) (pct 5) (px 3)
borderTopLeftRadius : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets border-top-left-radius property.

borderTopLeftRadius (em 4)


borderTopLeftRadius2 (em 4) (px 2)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-top-left-radius property.

borderTopLeftRadius (em 4)


borderTopLeftRadius2 (em 4) (px 2)
borderTopRightRadius : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets border-top-right-radius property.

borderTopRightRadius (em 4)


borderTopRightRadius2 (em 4) (px 2)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-top-right-radius property.

borderTopRightRadius (em 4)


borderTopRightRadius2 (em 4) (px 2)
borderBottomRightRadius : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets border-bottom-right-radius property.

borderBottomRightRadius (em 4)


borderBottomRightRadius2 (em 4) (px 2)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-bottom-right-radius property.

borderBottomRightRadius (em 4)


borderBottomRightRadius2 (em 4) (px 2)
borderBottomLeftRadius : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets border-bottom-left-radius property.

borderBottomLeftRadius (em 4)


borderBottomLeftRadius2 (em 4) (px 2)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-bottom-left-radius property.

borderBottomLeftRadius (em 4)


borderBottomLeftRadius2 (em 4) (px 2)
borderStartStartRadius : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets border-start-start-radius property.

borderStartStartRadius (em 4)


borderStartStartRadius2 (em 4) (px 2)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-start-start-radius property.

borderStartStartRadius (em 4)


borderStartStartRadius2 (em 4) (px 2)
borderStartEndRadius : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets border-start-end-radius property.

borderStartEndRadius (em 4)


borderStartEndRadius2 (em 4) (px 2)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-start-end-radius property.

borderStartEndRadius (em 4)


borderStartEndRadius2 (em 4) (px 2)
borderEndStartRadius : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets border-end-start-radius property.

borderEndStartRadius (em 4)


borderEndStartRadius2 (em 4) (px 2)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-end-start-radius property.

borderEndStartRadius (em 4)


borderEndStartRadius2 (em 4) (px 2)
borderEndEndRadius : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets border-end-end-radius property.

borderEndEndRadius (em 4)


borderEndEndRadius2 (em 4) (px 2)
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets border-end-end-radius property.

borderEndEndRadius (em 4)


borderEndEndRadius2 (em 4) (px 2)

Border image

borderImageOutset : BaseValue (LengthSupported { num : Supported }) -> Style

Sets border-image-outset property.

borderImageOutset (rem 1)


borderImageOutset2 (num 1) (num 1.2)


borderImageOutset3 (px 30) (num 2) (px 45)


borderImageOutset4 (px 7) (px 12) (px 14) (px 5)

Specifies the distance by which an element's border image is set out from its border box. Supports values specified as length units or unitless numbers. Negative values are invalid.

Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Style

Sets border-image-outset property.

borderImageOutset (rem 1)


borderImageOutset2 (num 1) (num 1.2)


borderImageOutset3 (px 30) (num 2) (px 45)


borderImageOutset4 (px 7) (px 12) (px 14) (px 5)

Specifies the distance by which an element's border image is set out from its border box. Supports values specified as length units or unitless numbers. Negative values are invalid.

Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Style

Sets border-image-outset property.

borderImageOutset (rem 1)


borderImageOutset2 (num 1) (num 1.2)


borderImageOutset3 (px 30) (num 2) (px 45)


borderImageOutset4 (px 7) (px 12) (px 14) (px 5)

Specifies the distance by which an element's border image is set out from its border box. Supports values specified as length units or unitless numbers. Negative values are invalid.

Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Style

Sets border-image-outset property.

borderImageOutset (rem 1)


borderImageOutset2 (num 1) (num 1.2)


borderImageOutset3 (px 30) (num 2) (px 45)


borderImageOutset4 (px 7) (px 12) (px 14) (px 5)

Specifies the distance by which an element's border image is set out from its border box. Supports values specified as length units or unitless numbers. Negative values are invalid.

BaseValue
(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Style

Sets border-image-width property.

borderImageWidth (rem 1)


borderImageWidth2 (num 1) (num 1.2)


borderImageWidth3 (pct 5) (pct 15) (pct 10)


borderImageWidth4 (px 7) (px 12) (px 14) (px 5)

Specifies the width of an element's border image. Supports values specified as length units, percentages, unitless numbers or auto. Negative values are invalid.

(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Style

Sets border-image-width property.

borderImageWidth (rem 1)


borderImageWidth2 (num 1) (num 1.2)


borderImageWidth3 (pct 5) (pct 15) (pct 10)


borderImageWidth4 (px 7) (px 12) (px 14) (px 5)

Specifies the width of an element's border image. Supports values specified as length units, percentages, unitless numbers or auto. Negative values are invalid.

(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Style

Sets border-image-width property.

borderImageWidth (rem 1)


borderImageWidth2 (num 1) (num 1.2)


borderImageWidth3 (pct 5) (pct 15) (pct 10)


borderImageWidth4 (px 7) (px 12) (px 14) (px 5)

Specifies the width of an element's border image. Supports values specified as length units, percentages, unitless numbers or auto. Negative values are invalid.

(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, num : Supported
, auto : Supported
}
)
-> Style

Sets border-image-width property.

borderImageWidth (rem 1)


borderImageWidth2 (num 1) (num 1.2)


borderImageWidth3 (pct 5) (pct 15) (pct 10)


borderImageWidth4 (px 7) (px 12) (px 14) (px 5)

Specifies the width of an element's border image. Supports values specified as length units, percentages, unitless numbers or auto. Negative values are invalid.


Outlines

BaseValue
(LineWidthSupported
(LineStyleSupported
(ColorSupported
{ auto : Supported
, invert_ : Supported
}
)
)
)
-> Style

Sets outline.

outline zero


outline none
Value LineWidth
-> Value (LineStyleSupported { auto : Supported })
-> Value (ColorSupported { invert_ : Supported })
-> Style

Sets outline.

outline3 (em 0.25) auto (rgb 120 250 32)
outlineWidth : BaseValue LineWidth -> Style

Sets outline-width.

outlineWidth (px 2)


outlineWidth thin
outlineColor : BaseValue (ColorSupported { invert_ : Supported }) -> Style

Sets outline-color.

outlineColor (hex "eee")


outlineColor invert_
invert_ : Value { provides | invert_ : Supported }

The invert value used by properties such as outlineColor

outlineColor invert_

Note: This is called invert_ instead of invert because invert is already used as a filter-function value.

outlineStyle : BaseValue (LineStyleSupported { auto : Supported }) -> Style

Sets outline-style.

outlineStyle auto


outlineStyle dashed
outlineOffset : BaseValue Length -> Style

Sets outline-offset.

outlineOffset (px 2)

Overflow and resizing

BaseValue
{ visible : Supported
, hidden : Supported
, scroll : Supported
, auto : Supported
, clip : Supported
}
-> Style

Sets overflow.

overflow visible


overflow hidden


overflow scroll


overflow auto


overflow2 visible hidden -- x: visible, y: hidden
{ visible : Supported
, hidden : Supported
, scroll : Supported
, auto : Supported
, clip : Supported
}
-> Value
{ visible : Supported
, hidden : Supported
, scroll : Supported
, auto : Supported
, clip : Supported
}
-> Style

Sets overflow.

overflow visible


overflow hidden


overflow scroll


overflow auto


overflow2 visible hidden -- x: visible, y: hidden
BaseValue
{ visible : Supported
, hidden : Supported
, scroll : Supported
, auto : Supported
, clip : Supported
}
-> Style

Sets overflow-x.

overflowX visible


overflowX hidden


overflowX scroll


overflowX auto
BaseValue
{ visible : Supported
, hidden : Supported
, scroll : Supported
, auto : Supported
, clip : Supported
}
-> Style

Sets overflow-y.

overflowY visible


overflowY hidden


overflowY scroll


overflowY auto
BaseValue
{ visible : Supported
, hidden : Supported
, scroll : Supported
, auto : Supported
}
-> Style

Sets overflow-block.

overflowBlock visible


overflowBlock hidden


overflowBlock scroll


overflowBlock auto
BaseValue
{ visible : Supported
, hidden : Supported
, scroll : Supported
, auto : Supported
}
-> Style

Sets overflow-inline.

overflowInline visible


overflowInline hidden


overflowInline scroll


overflowInline auto
BaseValue
{ anywhere : Supported
, breakWord : Supported
, normal : Supported
}
-> Style

Sets overflow-wrap

overflowWrap breakWord


overflowWrap normal
BaseValue
{ auto : Supported
, none : Supported
}
-> Style

Sets overflow-anchor

overflowAnchor auto


overflowAnchor none
breakWord : Value { provides | breakWord : Supported }

The break-word value, which can be used with such properties as overflow-wrap and word-break.

overflowWrap breakWord


wordBreak breakWord
anywhere : Value { provides | anywhere : Supported }

The anywhere value used by overflowWrap and lineBreak.

overflowWrap anywhere


lineBreak anywhere
BaseValue
{ none : Supported
, both : Supported
, horizontal : Supported
, vertical : Supported
, block : Supported
, inline : Supported
}
-> Style

The resize property.

resize none


resize both


resize inline
horizontal : Value { provides | horizontal : Supported }

The horizontal value used by resize.

resize horizontal
vertical : Value { provides | vertical : Supported }

The vertical value used by resize.

resize vertical

Flex

The CSS Flexible Box Layout Module. See this complete guide.

Basics

BaseValue
(WidthSupported
{ none : Supported
, content : Supported
, num : Supported
}
)
-> Style

The flex shorthand property.

flex none


flex auto


flex (num 1)
{ num : Supported
, zero : Supported
, calc : Supported
}
-> Value
(WidthSupported
{ content : Supported
, num : Supported
}
)
-> Style

The flex shorthand property.

flex2 zero auto
{ num : Supported
, zero : Supported
, calc : Supported
}
-> Value
{ num : Supported
, zero : Supported
, calc : Supported
}
-> Value (WidthSupported { content : Supported })
-> Style

The flex shorthand property.

flex3 (num 1) zero (pct 50)
flexBasis : BaseValue (WidthSupported { content : Supported }) -> Style

Sets flex-basis.

flexBasis (em 10)


flexBasis (px 3)


flexBasis (pct 100)


flexBasis auto
BaseValue
{ num : Supported
, zero : Supported
, calc : Supported
}
-> Style

Sets flex-grow.

flexGrow (num 3)


flexGrow (num 0.6)
BaseValue
{ num : Supported
, zero : Supported
, calc : Supported
}
-> Style

Sets flex-shrink.

flexShrink (num 2)


flexShrink (num 0.6)

Layout dynamics

BaseValue
{ row : Supported
, rowReverse : Supported
, column : Supported
, columnReverse : Supported
}
-> Style

Sets flex-direction.

flexDirection column
BaseValue
{ nowrap : Supported
, wrap : Supported
, wrapReverse : Supported
}
-> Style

Sets flex-wrap.

flexWrap wrap


flexWrap wrapReverse


flexWrap nowrap
BaseValue
{ row : Supported
, rowReverse : Supported
, column : Supported
, columnReverse : Supported
, nowrap : Supported
, wrap : Supported
, wrapReverse : Supported
}
-> Style

The flex-flow shorthand property.

flexFlow rowReverse


flexFlow wrap


flexFlow inherit


flexFlow2 column wrapReverse
{ row : Supported
, rowReverse : Supported
, column : Supported
, columnReverse : Supported
}
-> Value
{ nowrap : Supported
, wrap : Supported
, wrapReverse : Supported
}
-> Style

The flex-flow shorthand property.

flexFlow rowReverse


flexFlow wrap


flexFlow inherit


flexFlow2 column wrapReverse

Alignment

Other values you can use for flex item alignment:

BaseValue
{ normal : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
, spaceBetween : Supported
, spaceAround : Supported
, spaceEvenly : Supported
, stretch : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
}
-> Style

Sets align-content.

alignContent flexStart

Note: This property has no effect when the flexbox has only a single line.

{ safe : Supported
, unsafe : Supported
}
-> Value
{ center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
}
-> Style

Sets align-content.

alignContent2 unsafe start

Note: This property has no effect when the flexbox has only a single line.

BaseValue
{ normal : Supported
, stretch : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
}
-> Style

Sets align-items.

alignItems firstBaseline
{ safe : Supported
, unsafe : Supported
}
-> Value
{ center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
}
-> Style

Sets align-items.

alignItems2 unsafe selfStart
BaseValue
{ auto : Supported
, normal : Supported
, stretch : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
}
-> Style

Sets align-self.

alignSelf firstBaseline
{ safe : Supported
, unsafe : Supported
}
-> Value
{ center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
}
-> Style

Sets align-self.

alignSelf2 unsafe flexStart

Justify

BaseValue
{ normal : Supported
, spaceBetween : Supported
, spaceAround : Supported
, spaceEvenly : Supported
, stretch : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

Sets justify-content.

justifyContent flexStart

Note: This function takes left_ and right_ values.

{ safe : Supported
, unsafe : Supported
}
-> Value
{ center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

Sets justify-content.

justifyContent2 safe flexStart

Note: This function takes left_ and right_ values.

BaseValue
{ normal : Supported
, stretch : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
, left_ : Supported
, right_ : Supported
, legacy : Supported
, legacyLeft : Supported
, legacyRight : Supported
, legacyCenter : Supported
}
-> Style

The justify-items property.

justifyItems center
{ safe : Supported
, unsafe : Supported
}
-> Value
{ center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

The justify-items property.

justifyItems2 unsafe right_
BaseValue
{ auto : Supported
, normal : Supported
, stretch : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

The justify-self property.

jusitfySelf left_

Note: This function takes left_ and right_ values.

{ safe : Supported
, unsafe : Supported
}
-> Value
{ center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

The justify-self property.

justifySelf2 unsafe left_

Note: This function takes left_ and right_ values.

Place

placeContent : BaseValue {} -> Style

The place-content property.

placeContent is a shorthand for the alignContent and justifyContent properties in a single declaration.

This one-argument version only accepts global values.

placeContent inherit


placeContent2 flexStart flexEnd
{ normal : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
, spaceBetween : Supported
, spaceAround : Supported
, spaceEvenly : Supported
, stretch : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
}
-> Value
{ normal : Supported
, spaceBetween : Supported
, spaceAround : Supported
, spaceEvenly : Supported
, stretch : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

The place-content property.

placeContent is a shorthand for the alignContent and justifyContent properties in a single declaration.

This two-argumant version accepts alignContent and justifyContent values.

placeContent inherit


placeContent2 flexStart flexEnd
placeItems : BaseValue {} -> Style

The place-items property.

placeItems is a shorthand for the alignItems and justifyItems properties in a single declaration.

This one-argument version only accepts global values.

placeItems inherit


placeItems2 center selfEnd
{ normal : Supported
, stretch : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
}
-> Value
{ normal : Supported
, stretch : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
, left_ : Supported
, right_ : Supported
, legacy : Supported
, legacyLeft : Supported
, legacyRight : Supported
, legacyCenter : Supported
}
-> Style

The place-items property.

placeItems is a shorthand for the alignItems and justifyItems properties in a single declaration.

This one-argument version only accepts global values.

placeItems inherit


placeItems2 center selfEnd
placeSelf : BaseValue {} -> Style

The place-self property.

placeSelf is a shorthand for the alignSelf and justifySelf properties in a single declaration.

This one-argument version only accepts global values.

placeSelf inherit


placeSelf2 flexStart flexEnd
{ auto : Supported
, normal : Supported
, stretch : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
}
-> Value
{ auto : Supported
, normal : Supported
, stretch : Supported
, baseline : Supported
, firstBaseline : Supported
, lastBaseline : Supported
, center : Supported
, start : Supported
, end : Supported
, flexStart : Supported
, flexEnd : Supported
, selfStart : Supported
, selfEnd : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

The place-self property.

placeSelf is a shorthand for the alignSelf and justifySelf properties in a single declaration.

This one-argument version only accepts global values.

placeSelf inherit


placeSelf2 flexStart flexEnd

Order

BaseValue
{ int : Supported
, zero : Supported
}
-> Style

Sets order

order (num 2)


order (num -2)

Flex value keywords

row : Value { provides | row : Supported }

The row flex-direction value.

flexDirection row
rowReverse : Value { provides | rowReverse : Supported }

The row-reverse flex-direction value.

flexDirection rowReverse
columnReverse : Value { provides | columnReverse : Supported }

The column-reverse flex-direction value.

flexDirection columnReverse
flexStart : Value { provides | flexStart : Supported }

The flex-start value used by alignItems, justifyContent, and alignContent.

alignItems flexStart


justifyContent flexStart


alignContent flexStart
flexEnd : Value { provides | flexEnd : Supported }

The flex-end value used by alignItems, justifyContent, and alignContent.

alignItems flexEnd


justifyContent flexEnd


alignContent flexEnd
selfStart : Value { provides | selfStart : Supported }
selfEnd : Value { provides | selfEnd : Supported }
spaceBetween : Value { provides | spaceBetween : Supported }

The space-between value used by justifyContent and alignContent.

justifyContent spaceBetween


alignContent spaceBetween
spaceAround : Value { provides | spaceAround : Supported }

The space-around value used by justifyContent and alignContent.

justifyContent spaceAround


alignContent spaceAround
spaceEvenly : Value { provides | spaceEvenly : Supported }

Distribute items evenly, with an equal size space between each element and the start and end.

justifyContent spaceEvenly
firstBaseline : Value { provides | firstBaseline : Supported }

The first baseline value used for properties such as alignContent, alignItems, and alignSelf.

alignItems firstBaseline
lastBaseline : Value { provides | lastBaseline : Supported }

The last baseline value used for properties such as alignContent, alignItems, and alignSelf.

alignItems lastBaseline
safe : Value { provides | safe : Supported }

The safe value used for properties such as alignContent2.

alignContent2 safe center
unsafe : Value { provides | unsafe : Supported }

The unsafe value used for properties such as alignContent2.

alignContent2 unsafe center
legacy : Value { provides | legacy : Supported }

The legacy value used for properties such as justifyItems.

justifyItems legacy
legacyLeft : Value { provides | legacyLeft : Supported }

The legacy left value used for properties such as justifyItems.

justifyItems legacyLeft
legacyRight : Value { provides | legacyRight : Supported }

The legacy right value used for properties such as justifyItems.

justifyItems legacyRight
legacyCenter : Value { provides | legacyCenter : Supported }

The legacy center value used for properties such as justifyItems.

justifyItems legacyCenter
wrap : Value { provides | wrap : Supported }

The wrap flex-wrap value.

flexWrap wrap
wrapReverse : Value { provides | wrapReverse : Supported }

The wrap-reverse flex-wrap value.

flexWrap wrapReverse
breakSpaces : Value { provides | breakSpaces : Supported }

A break-spaces value for the white-space property.

whiteSpace breakSpaces

Grid

Types

type alias FixedSizeSupported supported =
TrackBreadthSupported
{ supported | minmax : Supported, fitContent : Supported }

Extensible type representing the possibilities of the <fixed-size> type used in grids.

type alias TrackBreadthSupported supported =
LengthSupported
{ supported
| pct : Supported
, fr : Supported
, auto : Supported
, minContent : Supported
, maxContent : Supported
}

Extensible type representing the possibilities of the <track-breadth> type used in grids.

type alias TrackSizeSupported supported =
TrackBreadthSupported
{ supported | minmax : Supported, fitContentTo : Supported }

Extensible type representing the possibilities of the <track-size> type used in grids.

type alias TrackSize =
TrackSizeSupported {}

Type representing the possibilities of the <track-size> type used in grids.

Grid auto

gridAutoRows : BaseValue TrackSize -> Style

The 1-argument version of the grid-auto-rows property.

gridAutoRows (px 100)


gridAutoRows (vmax 30)


gridAutoRows (fr 1)


gridAutoRows (minmax (fr 2) (pct 20))
gridAutoRowsMany : List (Value TrackSize) -> Style

The many-argument version of the grid-auto-rows property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

gridAutoRows (px 100)


gridAutoRows (vmax 30)


gridAutoRows (fr 1)


gridAutoRows (minmax (fr 2) (pct 20))


gridAutoRowsMany [ fr 1, px 100, minmax (fr 2) (pct 20) ]


gridAutoRowsMany [] -- unset
gridAutoColumns : BaseValue TrackSize -> Style

The 1-argument version of the grid-auto-columns property.

gridAutoColumns (px 100)


gridAutoColumns (vmax 30)


gridAutoColumns (fr 1)


gridAutoColumns (minmax (fr 2) (pct 20))


gridAutoColumnsMany [ fr 1, px 100, minmax (fr 2) (pct 20) ]


gridAutoColumnsMany [] -- unset
gridAutoColumnsMany : List (Value TrackSize) -> Style

The many-argument version of the grid-auto-columns property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

gridAutoColumns (px 100)


gridAutoColumns (vmax 30)


gridAutoColumns (fr 1)


gridAutoColumns (minmax (fr 2) (pct 20))


gridAutoColumnsMany [ fr 1, px 100, minmax (fr 2) (pct 20) ]


gridAutoColumnsMany [] -- unset
BaseValue
{ row : Supported
, column : Supported
, dense : Supported
}
-> Style

The 1-argument version of the grid-auto-flow property.

gridAutoFlow dense


gridAutoFlow column


gridAutoFlow2 row dense
{ row : Supported
, column : Supported
}
-> Value { dense : Supported }
-> Style

The 1-argument version of the grid-auto-flow property.

gridAutoFlow2 row dense

(The last argument can only be dense but I thought this would be the most natural way to make it fit into Elm, even if it's a bit redundant.)

Grid areas

type alias GridLine =
{ auto : Supported
, num : Supported
, gridLineIdent : Supported
, gridLineSpanNum : Supported
, gridLineSpanIdent : Supported
}

A type encapsulating the possibilities for defining a <grid-line>, which are the lines around the spaces in a CSS grid.

String
-> Maybe Int
-> Value { provides | gridLineIdent : Supported }

Creates a grid line value with a <custom-ident> value and an optional integer.

gridLineIdent "footer" Nothing -- footer


gridLineIdent "header" (Just 1) -- header 1


gridLineSpanNum 4 -- span 4


gridLineSpanIdent "header" Nothing -- span header


gridLineSpanIdent "footer" (Just 1) -- span header 1
gridLineSpanNum : Int -> Value { provides | gridLineSpanNum : Supported }

Creates a grid line value with a 'span' keyword value followed by an integer.

gridLineIdent "footer" Nothing -- footer


gridLineIdent "header" (Just 1) -- header 1


gridLineSpanNum 4 -- span 4


gridLineSpanIdent "header" Nothing -- span header


gridLineSpanIdent "footer" (Just 1) -- span header 1
String
-> Maybe Int
-> Value { provides | gridLineSpanIdent : Supported }

Creates a grid line value with a 'span' keyword value followed by an ident and an optional integer.

gridLineIdent "footer" Nothing -- footer


gridLineIdent "header" (Just 1) -- header 1


gridLineSpanNum 4 -- span 4


gridLineSpanIdent "header" Nothing -- span header


gridLineSpanIdent "footer" (Just 1) -- span header 1
gridArea : BaseValue GridLine -> Style

The grid-area property.

This variant is for keywords or for 1 <grid-line> (GridLine) that determines the start and end positions of this grid item.

Numbers used in this should not be zero, else they won't work.

gridArea auto


gridArea inherit


gridArea <| gridLineSpanNum 4


gridArea <| gridLineIdent "big-grid" (Just 4)


gridArea2
    ( gridLineIdent "big-grid" (Just 4) )
    ( gridLineSpanIdent "other-grid" Nothing )


gridArea3
    ( gridLineIdent "big-grid" (Just 4))
    ( gridLineSpanIdent "other-grid" Nothing)
    ( num 7 )


gridArea4
    ( gridLineIdent "big-grid" (Just 4) )
    ( gridLineSpanIdent "other-grid" Nothing )
    ( num 7 )
    ( gridLineSpanIdent "another-grid" (Just 12) )
gridArea2 : Value GridLine -> Value GridLine -> Style

The grid-area property.

This variant specifies 2 <grid-line>s (GridLine) that determines the start and end positions of this grid item.

Numbers used in this should not be zero, else they won't work.

gridArea auto


gridArea inherit


gridArea <| gridLineSpanNum 4


gridArea <| gridLineIdent "big-grid" (Just 4)


gridArea2
    ( gridLineIdent "big-grid" (Just 4) )
    ( gridLineSpanIdent "other-grid" Nothing )


gridArea3
    ( gridLineIdent "big-grid" (Just 4))
    ( gridLineSpanIdent "other-grid" Nothing)
    ( num 7 )


gridArea4
    ( gridLineIdent "big-grid" (Just 4) )
    ( gridLineSpanIdent "other-grid" Nothing )
    ( num 7 )
    ( gridLineSpanIdent "another-grid" (Just 12) )
gridArea3 : Value GridLine -> Value GridLine -> Value GridLine -> Style

The grid-area property.

This variant specifies 3 <grid-line>s (GridLine) that determines the start and end positions of this grid item.

Numbers used in this should not be zero, else they won't work.

gridArea auto


gridArea inherit


gridArea <| gridLineSpanNum 4


gridArea <| gridLineIdent "big-grid" (Just 4)


gridArea2
    ( gridLineIdent "big-grid" (Just 4) )
    ( gridLineSpanIdent "other-grid" Nothing )


gridArea3
    ( gridLineIdent "big-grid" (Just 4))
    ( gridLineSpanIdent "other-grid" Nothing)
    ( num 7 )


gridArea4
    ( gridLineIdent "big-grid" (Just 4) )
    ( gridLineSpanIdent "other-grid" Nothing )
    ( num 7 )
    ( gridLineSpanIdent "another-grid" (Just 12) )
Value GridLine
-> Value GridLine
-> Value GridLine
-> Value GridLine
-> Style

The grid-area property.

This variant specifies 4 <grid-line>s (GridLine) that determines the start and end positions of this grid item.

Numbers used in this should not be zero, else they won't work.

gridArea auto


gridArea inherit


gridArea <| gridLineSpanNum 4


gridArea <| gridLineIdent "big-grid" (Just 4)


gridArea2
    ( gridLineIdent "big-grid" (Just 4) )
    ( gridLineSpanIdent "other-grid" Nothing )


gridArea3
    ( gridLineIdent "big-grid" (Just 4))
    ( gridLineSpanIdent "other-grid" Nothing)
    ( num 7 )


gridArea4
    ( gridLineIdent "big-grid" (Just 4) )
    ( gridLineSpanIdent "other-grid" Nothing )
    ( num 7 )
    ( gridLineSpanIdent "another-grid" (Just 12) )
gridRow : BaseValue GridLine -> Style

The grid-row property.

This variant is for single keyword arguments and specifying 1 <grid-line> (GridLine), which determines the start and end position of this grid item.

Numbers used in this should not be zero, else they won't work.

gridRow auto


gridRow inherit


gridRow <| gridLineIdent "main-grid" (Just 3)
-- grid-row: main-grid 3


gridRow2 auto ( gridLineSpanIdent "grid-thing" (Just 5) )
-- grid-row: auto / span grid-thing 5
gridRow2 : Value GridLine -> Value GridLine -> Style

The grid-row property.

This variant specifies 2 <grid-line>s (GridLine) that determine the start and end position of this grid item.

Numbers used in this should not be zero, else they won't work.

gridRow auto


gridRow inherit


gridRow <| gridLineIdent "main-grid" (Just 3)
-- grid-row: main-grid 3


gridRow2 auto ( gridLineSpanIdent "grid-thing" (Just 5) )
-- grid-row: auto / span grid-thing 5
gridRowStart : BaseValue GridLine -> Style

The 1-argument version of the grid-row-start property.

gridRowStart inherit


gridRowStart auto


gridRowStart <| gridLineSpanIdent "big-grid" Nothing


gridRowStart <| int 3


gridRowStart <| gridLineIdent "big-grid" (Just 2)
gridRowEnd : BaseValue GridLine -> Style

The 1-argument version of the grid-row-end property.

gridRowEnd inherit


gridRowEnd auto


gridRowEnd <| gridLineSpanIdent "big-grid" Nothing


gridRowEnd <| int 3


gridRowEnd <| gridLineIdent "big-grid" (Just 2)
gridColumn : BaseValue GridLine -> Style

The grid-column property.

This variant is for single keyword arguments and specifying 1 <grid-line> (GridLine), which determines the start and end position of this grid item.

Numbers used in this should not be zero, else they won't work.

gridColumn auto


gridColumn inherit


gridColumn <| gridLineIdent "main-grid" (Just 3)
-- grid-column: main-grid 3


gridColumn2 auto ( gridLineSpanIdent "grid-thing") (Just 5) )
-- grid-column: auto / span grid-thing 5
gridColumn2 : Value GridLine -> Value GridLine -> Style

The grid-column property.

This variant specifies 2 <grid-line>s (GridLine) that determine the start and end position of this grid item.

Numbers used in this should not be zero, else they won't work.

gridColumn auto


gridColumn inherit


gridColumn <| gridLineIdent "main-grid" (Just 3)
-- grid-column: main-grid 3


gridColumn2 auto ( gridLineSpanIdent "grid-thing") (Just 5) )
-- grid-column: auto / span grid-thing 5
gridColumnStart : BaseValue GridLine -> Style

The 1-argument version of the grid-column-start property.

gridColumnStart inherit


gridColumnStart auto


gridColumnStart <| gridLineSpanIdent "big-grid") Nothing


gridColumnStart <| int 3


gridColumnStart <| gridLineIdent "big-grid" (Just 2)
gridColumnEnd : BaseValue GridLine -> Style

The 1-argument version of the grid-column-end property.

gridColumnEnd inherit


gridColumnEnd auto


gridColumnEnd <| gridLineSpanIdent "big-grid") Nothing


gridColumnEnd <| int 3


gridColumnEnd <| gridLineIdent "big-grid" (Just 2)

Grid templates

BaseValue
{ none : Supported
, templateRowsColumns : Supported
, templateAreasRowsColumns : Supported
}
-> Style

Thegrid-template property.

gridTemplate initial


gridTemplate none


gridTemplate <|
    templateAreasRowsColumns
        [ templateAreaRow
            ( Just <| lineNames ["header-left"] )
            "head head"
            ( Just <| px 30 )
            ( Just <| lineNames ["header-right"] )


        , templateAreaRow
            ( Just <| lineNames ["main-left"] )
            "nav main"
            ( Just <| fr 1 )
            ( Just <| lineNames ["main-right"])


        , templateAreaRow
            ( Just <| lineNames ["footer-left"] )
            "nav foot"
            ( Just <| px 30 )
            ( Just <| lineNames ["footer-right"])
        ]
        ( Just <| templateColumns
            ( px 120 )
            [ fr 120
            ]
        )


gridTemplate <|
    templateRowsColumns
        ( trackList
            ( lineNames ["line1", "line2"] )
            [ px 300
            , lineNames ["line3"]
            ]
        )


        ( autoTrackList
            ( minmax (px 210) maxContent )
            [ autoRepeat autoFill [px 200]
            , pct 20
            ]
        )
gridTemplateAreas : BaseValue { none : Supported } -> Style

The grid-template-areas property. Use the gridTemplateAreasMany function if you want to use multiple strings as a value.

gridTemplateAreas none


gridTemplateAreas inherit


gridTemplateAreasCells
    [ "c c b"
    , "c a b"
    , "c d e"
    ]
gridTemplateAreasCells : List String -> Style

A version of gridTemplateAreas that lets you input a list of strings as values, representing grid cells.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

gridTemplateAreasCells
    [ "c c b"
    , "c a b"
    , "c d e"
    ]


gridTemplateAreasCells [] -- unset
BaseValue
{ none : Supported
, trackList : Supported
, autoTrackList : Supported
}
-> Style

The grid-template-rows property.

gridTemplateRows inherit


gridTemplateRows none


gridTemplateRows <|
    trackList (px 200) [fr 1, px 180]


gridTemplateRows <|
    trackList 
        ( lineNames ["line1", "line2"] )
        [ px 300
        , lineNames ["line3"]
        ]


gridTemplateRows <|
    trackList [ fixedRepeat (num 4) [px 520] ]


gridTemplateRows <|
    autoTrackList
        ( minmax (px 210) maxContent )
        [ autoRepeat autoFill [px 200]
        , pct 20
        ]
BaseValue
{ none : Supported
, trackList : Supported
, autoTrackList : Supported
}
-> Style

The grid-template-columns property.

gridTemplateColumns inherit


gridTemplateColumns none


gridTemplateColumns <|
    trackList (px 200) [fr 1, px 180]


gridTemplateColumns <|
    trackList 
        ( lineNames ["line1", "line2"] )
        [ px 300
        , lineNames ["line3"]
        ]


gridTemplateColumns <|
    trackList [ fixedRepeat (num 4) [px 520] ]


gridTemplateColumns <|
    autoTrackList
        ( minmax (px 210) maxContent )
        [ autoRepeat autoFill [px 200]
        , pct 20
        ]
{ trackList : Supported
, autoTrackList : Supported
}
-> Value
{ trackList : Supported
, autoTrackList : Supported
}
-> Value { provides | templateRowsColumns : Supported }

Provides structured input for gridTemplate for inputting rows and columns, equivalent to inputting gridTemplateRows and [gridTemplateColumns] separately.

gridTemplate <|
    templateRowsColumns
        trackList
            ( lineNames ["line1", "line2"] )
            [ px 300
            , lineNames ["line3"]
            ]


        autoTrackList
            ( minmax (px 210) maxContent )
            [ autoRepeat autoFill [px 200]
            , pct 20
            ]
List (Value { templateAreaRow : Supported })
-> Maybe (Value { templateColumns : Supported })
-> Value { provides | templateAreasRowsColumns : Supported }

Provides structured input for gridTemplate for inputting areas combined with rows, and then columns.

gridTemplate <|
    templateAreasRowsColumns
        [ templateAreaRow
            ( Just <| lineNames ["left"] )
            "nav foot"
            ( Just <| px 30 )
            ( Just <| lineNames ["right"])
        ]
        ( Just <| templateColumns
            ( px 120 )
            [ fr 120
            ]
        )
Maybe (Value { lineNames : Supported })
-> String
-> Maybe (Value TrackSize)
-> Maybe (Value { lineNames : Supported })
-> Value { provides | templateAreaRow : Supported }

The portion of a possible way of giving a gridTemplate`a value that sets rows and areas.

gridTemplate <|
    templateAreasRowsColumns
        [ templateAreaRow
            ( Just <| lineNames ["header-left"] )
            "head head"
            ( Just <| px 30 )
            ( Just <| lineNames ["header-right"] )


        , templateAreaRow
            ( Just <| lineNames ["main-left"] )
            "nav main"
            ( Just <| fr 1 )
            ( Just <| lineNames ["main-right"])


        , templateAreaRow
            ( Just <| lineNames ["footer-left"] )
            "nav foot"
            ( Just <| px 30 )
            ( Just <| lineNames ["footer-right"])
        ]
        ( Just <| templateColumns
            ( px 120 )
            [ fr 120
            ]
        )
Value (TrackSizeSupported { lineNames : Supported })
-> List (Value (TrackSizeSupported { lineNames : Supported }))
-> Value { provides | templateColumns : Supported }

The portion of a possible way of giving a gridTemplate`a value that sets columns.

The first value is the head of the list. This function is structured in this way to prevent giving empty lists.

gridTemplate <|
    templateAreasRowsColumns
        [ templateAreaRow
            ( Just <| lineNames ["left"] )
            "nav foot"
            ( Just <| px 30 )
            ( Just <| lineNames ["right"])
        ]
        ( Just <| templateColumns
            ( px 120 )
            [ fr 120
            ]
        )
(TrackSizeSupported
{ fixedRepeat : Supported
, lineNames : Supported
}
)
-> List
(TrackSizeSupported
{ fixedRepeat : Supported
, lineNames : Supported
}
)
)
-> Value { provides | trackList : Supported }

Creates a <track-list> value for use in creating grid tempolates.

gridTemplateColumns <|
    trackList [ fixedRepeat (num 4) [px 520] ]
(FixedSizeSupported
{ fixedRepeat : Supported
, autoRepeat : Supported
, lineNames : Supported
}
)
-> List
(FixedSizeSupported
{ fixedRepeat : Supported
, autoRepeat : Supported
, lineNames : Supported
}
)
)
-> Value { provides | autoTrackList : Supported }

Creates a <auto-track-list> value for use in creating grid templates.

gridTemplateColumns <|
    autoTrackList
        ( minmax (px 210) maxContent )
        [ autoRepeat autoFill [px 200]
        , pct 20
        ]
Value { num : Supported }
-> List
(LengthSupported
{ pct : Supported
, fr : Supported
, minmax : Supported
, lineNames : Supported
}
)
)
-> Value { provides | fixedRepeat : Supported }

Performs the repeat() function used in CSS Grid track lists. This lets you repeat a pattern of grid lines in CSS Grid without duplicating code.

This is the fixed variant of the repeat() function. In this variant, you must specify a num before specifying the track list pattern you want to repeat.

gridTemplate <|
    templateRowsColumns
        ( trackList
            ( lineNames ["line1", "line2"] )
            [ px 300
            , lineNames ["line3"]
            ]
        )


        ( autoTrackList
            ( minmax (px 210) maxContent )
            [ autoRepeat autoFill [px 200]
            , pct 20
            ]
        )
{ autoFill : Supported
, autoFit : Supported
}
-> List
(LengthSupported
{ pct : Supported
, fr : Supported
, minmax : Supported
, lineNames : Supported
}
)
)
-> Value { provides | autoRepeat : Supported }

Performs the repeat() function used in CSS Grid track lists. This lets you repeat a pattern of grid lines in CSS Grid without duplicating code.

You must specify a autoFit, or autoFill before specifying the track list pattern you want to repeat.

gridTemplateRows <|
    autoTrackList
        [ lineNames ["linename1"]
        , px 100
        , lineNames ["linename2"]
        , autoRepeat autoFit
            (px 10)
            [ lineNames["row-start"]
            , px 250
            , lineNames["row-end"]
            ]
        , px 100
        ]
autoFill : Value { provides | autoFill : Supported }

The auto-fill value used in the repeat() function.

gridTemplateColumnsList
    [ minmax (px 210) maxContent
    , repeatedTracks autoFill [px 200]
    , pct 20
    ]

(Note: due to a naming conflict, the repeat() function is called repeatedTracks in this package.)

autoFit : Value { provides | autoFit : Supported }

The auto-fit value used in the repeat() function.

gridTemplateColumnsList
    [ minmax (px 210) maxContent
    , repeatedTracks autoFit [px 200]
    , pct 20
    ]

(Note: due to a naming conflict, the repeat() function is called repeatedTracks in this package.)

lineNames : List String -> Value { provides | lineNames : Supported }

Custom ident(s) that are only used in grid area definitions, for naming lines of a grid layout. A line may have multiple names.

Line names are case sensitive.

gridTemplateColumnsList
    [ lineNames["line1", "line2"]
    , px 300
    , lineNames["line3"]
    ]


--- grid-template-colums: [line1 line2] 300px [line3];
dense : Value { provides | dense : Supported }

The dense value for the grid-auto-flow property.

gridAutoFlow dense


gridAutoFlow2 row dense

Gap

gap : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets the gap property.

The gap property is a shorthand for setting row-gap and column-gap in a single declaration.

gap specifies the size of spacing between items within grid, flex and multi-column layouts.

gap initial


gap (px 20) -- 20px gap between all items.


gap2 (px 20) (px 40) -- 20px row gap, 40px column gap.
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Style

Sets the gap property.

The gap property is a shorthand for setting row-gap and column-gap in a single declaration.

gap specifies the size of spacing between items within grid, flex and multi-column layouts.

gap2 (px 20) (px 40) -- 20px row gap, 40px column gap.
rowGap : BaseValue (LengthSupported { pct : Supported }) -> Style

Sets the row-gap property.

row-gap specifies the size of spacing between rows of items within grid, flex and multi-column layouts.

rowGap normal


rowGap (px 20)
BaseValue
(LengthSupported
{ normal : Supported
, pct : Supported
}
)
-> Style

Sets the column-gap property.

column-gap specifies the size of spacing between column of items within grid, flex and multi-column layouts.

columnGap normal


columnGap (px 20)

Background

backgroundColor : BaseValue (ColorSupported { transparent : Supported }) -> Style

Sets background-color.

backgroundColor (hex "#60b5cc")


backgroundColor (rgb 96 181 204)


backgroundColor (rgba 96 181 204 0.5)


backgroundColor transparent
BaseValue
{ fixed : Supported
, scroll : Supported
, local : Supported
}
-> Style

Sets background-attachment.

backgroundAttachment local


backgroundAttachmentMany [ fixed, scroll, fixed ]


backgroundAttachmentMany [ fixed, scroll, fixed ]


backgroundAttachmentMany [] -- background-attachment: unset;
List
{ fixed : Supported
, scroll : Supported
, local : Supported
}
)
-> Style

Sets background-attachment.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

backgroundAttachment local


backgroundAttachmentMany [ fixed, scroll, fixed ]


backgroundAttachmentMany [ fixed, scroll, fixed ]


backgroundAttachmentMany [] -- background-attachment: unset;
local : Value { provides | local : Supported }

The local background-attachment value

backgroundAttachment local
backgroundBlendMode : BaseValue BlendMode -> Style

Sets background-blend-mode. Note that this takes an argument of color_, not color!

backgroundBlendMode color_


backgroundBlendMode darken


backgroundBlendMode colorBurn


backgroundBlendModeMany [ darken, color_ ]


backgroundBlendModeMany [] -- background-blend-mode: unset;
backgroundBlendModeMany : List (Value BlendMode) -> Style

Sets background-blend-mode.

Note that this takes an argument of color_, not color!

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

backgroundBlendMode color_


backgroundBlendMode darken


backgroundBlendMode colorBurn


backgroundBlendModeMany [ darken, color_ ]


backgroundBlendModeMany [] -- background-blend-mode: unset;
multiply : Value { provides | multiply : Supported }

The multiply background-blend-mode value

backgroundBlendMode multiply
screen : Value { provides | screen : Supported }

The screen background-blend-mode value

backgroundBlendMode screen
overlay : Value { provides | overlay : Supported }

The overlay background-blend-mode value

backgroundBlendMode overlay
darken : Value { provides | darken : Supported }

The darken background-blend-mode value

backgroundBlendMode darken
lighten : Value { provides | lighten : Supported }

The lighten background-blend-mode value

backgroundBlendMode lighten
colorDodge : Value { provides | colorDodge : Supported }

The color-dodge background-blend-mode value

backgroundBlendMode color - colorDodge
colorBurn : Value { provides | colorBurn : Supported }

The color-burn background-blend-mode value

backgroundBlendMode colorBurn
hardLight : Value { provides | hardLight : Supported }

The hard-light background-blend-mode value

backgroundBlendMode hardLight
softLight : Value { provides | softLight : Supported }

The soft-light background-blend-mode value

backgroundBlendMode softLight
difference : Value { provides | difference : Supported }

The difference background-blend-mode value

backgroundBlendMode difference
exclusion : Value { provides | exclusion : Supported }

The exclusion background-blend-mode value

backgroundBlendMode exclusion
hue : Value { provides | hue : Supported }

The hue background-blend-mode value

backgroundBlendMode hue
saturation : Value { provides | saturation : Supported }

The saturation background-blend-mode value

backgroundBlendMode saturation
color_ : Value { provides | color_ : Supported }

The color background-blend-mode value

backgroundBlendMode color_

Not to be confused with color.

luminosity : Value { provides | luminosity : Supported }

The luminosity background-blend-mode value

backgroundBlendMode luminosity
BaseValue
{ borderBox : Supported
, paddingBox : Supported
, contentBox : Supported
, text : Supported
}
-> Style

Sets background-clip. Note that this takes an argument of text, not color!

backgroundClip text


backgroundClip paddingBox


backgroundClip contentBox


backgroundClipMany [ text, borderBox, text ]


backgroundClipMany [] -- background-clip: unset;
List
{ borderBox : Supported
, paddingBox : Supported
, contentBox : Supported
, text : Supported
}
)
-> Style

Sets background-clip. Note that this takes an argument of text, not color!

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

backgroundClip text


backgroundClip paddingBox


backgroundClip contentBox


backgroundClipMany [ text, borderBox, text ]


backgroundClipMany [] -- background-clip: unset;
BaseValue
{ borderBox : Supported
, paddingBox : Supported
, contentBox : Supported
}
-> Style

Sets background-origin.

backgroundOrigin paddingBox


backgroundOrigin contentBox


backgroundOriginMany [ contentBox, borderBox, contentBox ]


backgroundOriginMany [] -- background-origin: unset;
List
{ borderBox : Supported
, paddingBox : Supported
, contentBox : Supported
}
)
-> Style

Sets background-origin.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

backgroundOrigin paddingBox


backgroundOrigin contentBox


backgroundOriginMany [ contentBox, borderBox, contentBox ]


backgroundOriginMany [] -- background-origin: unset;
backgroundImage : BaseValue (ImageSupported { none : Supported }) -> Style

Sets background-image.

backgroundImage (url "http://www.example.com/chicken.jpg")


backgroundImage (linearGradient (stop red) (stop blue))

See also backgroundImages if you need multiple images.

backgroundImageMany : List (Value Image) -> Style

Sets background-image for multiple images.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

backgroundImageMany
    (linearGradient (stop red) (stop blue))
    [ url "http://www.example.com/chicken.jpg" ]


backgroundImageMany [] -- background-image: unset;

See also backgroundImage if you need only one.

BaseValue
(LengthSupported
{ pct : Supported
, left_ : Supported
, right_ : Supported
, top_ : Supported
, bottom_ : Supported
, center : Supported
}
)
-> Style

Sets background-position.

backgroundPosition left_


backgroundPosition (px 45)

backgroundPosition sets the horizontal direction. If you need the vertical direction instead, use backgroundPosition2 like this:

backgroundPosition2 zero (px 45)

If you need to set the offsets from the right or bottom, use backgroundPosition4 like this:

backgroundPosition4 right_ (px 20) bottom_ (pct 30)
(LengthSupported
{ pct : Supported
, left_ : Supported
, right_ : Supported
, center : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, top_ : Supported
, bottom_ : Supported
, center : Supported
}
)
-> Style

Sets background-position.

backgroundPosition2 left_ top_


backgroundPosition2 (px 45) (pct 50)

backgroundPosition2 sets both the horizontal and vertical directions (in that order, same as CSS.) If you need only the horizontal, you can use backgroundPosition instead:

backgroundPosition left_

If you need to set the offsets from the right or bottom, use backgroundPosition4.

{ left_ : Supported
, right_ : Supported
, top_ : Supported
, bottom_ : Supported
}
-> Value (LengthSupported { pct : Supported })
-> Value { center : Supported }
-> Style

Sets background-position.

backgroundPosition3 right_ (px 20) center

The three-argument form of background position sets one side to center and the other to the specified offest. So the example above would position the background image 20px from the right, and center it vertically.

{ left_ : Supported
, right_ : Supported
}
-> Value (LengthSupported { pct : Supported })
-> Value
{ top_ : Supported
, bottom_ : Supported
}
-> Value (LengthSupported { pct : Supported })
-> Style

Sets background-position.

backgroundPosition4 right_ (px 20) bottom_ (pct 30)

The four-argument form of background position alternates sides and offets. So the example above would position the background image 20px from the right, and 30% from the bottom.

See also backgroundPosition for horizontal alignment and backgroundPosition2 for horizontal (from left) and vertical (from top) alignment.

BaseValue
{ repeat : Supported
, repeatX : Supported
, repeatY : Supported
, space : Supported
, round_ : Supported
, noRepeat : Supported
}
-> Style

Sets background-repeat

backgroundRepeat repeat


backgroundRepeat repeatX

If you need to set horizontal and vertical direction separately, see backgroundRepeat2

{ repeat : Supported
, space : Supported
, round_ : Supported
, noRepeat : Supported
}
-> Value
{ repeat : Supported
, space : Supported
, round_ : Supported
, noRepeat : Supported
}
-> Style

Sets background-repeat along the horizontal axis, then the vertical axis.

backgroundRepeat2 repeat space


backgroundRepeat2 space round

If you only need to set one value for both, see backgroundRepeat instead.

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
, cover : Supported
, contain_ : Supported
}
)
-> Style

Sets background-size.

backgroundSize cover


backgroundSize (px 400)

If you give a length value, it will be used for the width. The height will be set proportional to the size of the background-image. If you need to set both width and height explicitly, use backgroundImage2 instead.

(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets background-size for both width and height (in that order.)

backgroundSize2 (px 300) (px 100)


backgroundSize2 auto (px 400)

If you only want to set the width, use backgroundImage instead.


Basic typographic options

Sizing

BaseValue
(LengthSupported
{ xxSmall : Supported
, xSmall : Supported
, small : Supported
, medium : Supported
, large : Supported
, xLarge : Supported
, xxLarge : Supported
, xxxLarge : Supported
, smaller : Supported
, larger : Supported
, pct : Supported
}
)
-> Style

Sets font-size

fontSize xxSmall


fontSize (px 12)

Check out fluid typography for some cool stuff you can do with this.

xxSmall : Value { provides | xxSmall : Supported }

The xx-small font-size value.

fontSize xxSmall
xSmall : Value { provides | xSmall : Supported }

The x-small font-size value.

fontSize xSmall
small : Value { provides | small : Supported }

The small font-size value.

fontSize small
medium : Value { provides | medium : Supported }

The medium value used by properties such as fontSize, borderWidth, columnRuleWidth.

fontSize medium


borderWidth medium


columnRuleWidth medium

The value is equivalent of 3px when using for border-width.

large : Value { provides | large : Supported }

The large font-size value.

fontSize large
xLarge : Value { provides | xLarge : Supported }

The x-large font-size value.

fontSize xLarge
xxLarge : Value { provides | xxLarge : Supported }

The xx-large font-size value.

fontSize xxLarge
xxxLarge : Value { provides | xxxLarge : Supported }

The xxx-large font-size value.

fontSize xxxLarge
smaller : Value { provides | smaller : Supported }

The smaller font-size value.

fontSize smaller
larger : Value { provides | larger : Supported }

The larger font-size value.

fontSize larger
BaseValue
{ none : Supported
, zero : Supported
, num : Supported
}
-> Style

Sets font-size-adjust

fontSizeAdjust zero


fontSizeAdjust none


fontSizeAdjust (num 0.5)

@font-face

BaseValue
{ auto : Supported
, block : Supported
, swap : Supported
, fallback : Supported
, optional : Supported
}
-> Style

Sets font-display

fontDisplay auto


fontDisplay block


fontDisplay swap


fontDisplay fallback


fontDisplay optional
fallback : Value { provides | fallback : Supported }

Sets fallback value for usage with fontDisplay or strokeLinejoin.

  fontDisplay fallback


  strokeLinejoin2 miter fallback
swap : Value { provides | swap : Supported }

Sets swap value for usage with fontDisplay.

fontDisplay swap
optional : Value { provides | optional : Supported }

Sets optional value for usage with fontDisplay.

  fontDisplay optional

Font family

BaseValue
{ serif : Supported
, sansSerif : Supported
, monospace : Supported
, cursive : Supported
, fantasy : Supported
, systemUi : Supported
, uiSerif : Supported
, uiSansSerif : Supported
, uiMonospace : Supported
, uiRounded : Supported
, emoji : Supported
, math : Supported
, fangsong : Supported
}
-> Style

For when your font is one of the six generic font family names - serif, sansSerif, monospace, cursive, fantasy, or systemUi.

If you want to refer to a font by its name (like Helvetica or Arial), use fontFamilyMany instead.

List String
-> Value
{ serif : Supported
, sansSerif : Supported
, monospace : Supported
, cursive : Supported
, fantasy : Supported
, systemUi : Supported
, uiSerif : Supported
, uiSansSerif : Supported
, uiMonospace : Supported
, uiRounded : Supported
, emoji : Supported
, math : Supported
, fangsong : Supported
}
-> Style

Define multiple font families.

Per the CSS spec, a generic name must always be at the end of this list. (The generic names are serif, sansSerif, monospace, cursive or fantasy.)

fontFamilyMany [ "Gill Sans Extrabold", "Helvetica", "Arial" ] sansSerif

This function will automatically wrap each font family in quotation marks unless it is one of the six [generic names]((https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#%3Cgeneric-name%3E)) (like sans-serif), which must never be quoted.

serif : Value { provides | serif : Supported }

The serif generic font family name.

fontFamily serif


fontFamilyMany [ "Gill Sans", "Helvetica" ] serif

This can be used with fontFamily and fontFamilyMany.

sansSerif : Value { provides | sansSerif : Supported }

The sans-serif generic font family name.

fontFamily sansSerif


fontFamilyMany [ "Georgia", "Times" ] sansSerif

This can be used with fontFamily and fontFamilyMany.

monospace : Value { provides | monospace : Supported }

The monospace generic font family name.

fontFamily monospace


fontFamilyMany [ "Source Code Pro", "Lucida Console" ] monospace

This can be used with fontFamily and fontFamilyMany.

cursive : Value { provides | cursive : Supported }

The cursive generic font family name.

fontFamily cursive


fontFamilyMany [ "Brush Script Std", "Lucida Calligraphy" ] cursive

This can be used with fontFamily and fontFamilyMany.

fantasy : Value { provides | fantasy : Supported }

The fantasy generic font family name.

fontFamily fantasy
fontFamilyMany [ "Herculanum", "Harrington" ] fantasy

This can be used with fontFamily and fontFamilyMany.

systemUi : Value { provides | systemUi : Supported }

The system-ui generic font family name.

You may want to read more about the system font stack before using this one.

fontFamily systemUi


fontFamilyMany [ "", "Segoe UI" ] systemUi


fontFamilyMany [ "system-ui", "Segoe UI", "Roboto", "Helvetica", "Arial", "sans-serif", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" ] sansSerif

This can be used with fontFamily and fontFamilyMany.

uiSerif : Value { provides | uiSerif : Supported }

The ui-serif generic font family name.

fontFamily uiSerif


fontFamilyMany [ "New York" ] uiSerif

This can be used with fontFamily and fontFamilyMany.

uiSansSerif : Value { provides | uiSansSerif : Supported }

The ui-sans-serif generic font family name.

fontFamily uiSansSerif

This can be used with fontFamily and fontFamilyMany.

uiMonospace : Value { provides | uiMonospace : Supported }

The ui-monospace generic font family name.

fontFamily uiMonospace

This can be used with fontFamily and fontFamilyMany.

uiRounded : Value { provides | uiRounded : Supported }

The ui-rounded generic font family name.

fontFamily uiRounded

This can be used with fontFamily and fontFamilyMany.

math : Value { provides | math : Supported }

The math generic font family name.

fontFamily math

This can be used with fontFamily and fontFamilyMany.

fangsong : Value { provides | fangsong : Supported }

The fangsong generic font family name.

fontFamily fangsong

This can be used with fontFamily and fontFamilyMany.

Font color, style, weight & stretch

color : BaseValue Color -> Style

Sets color.

color (hex "#60b5cc")


color (rgb 96 181 204)


color (rgba 96 181 204 0.5)
BaseValue
{ normal : Supported
, italic : Supported
, oblique : Supported
}
-> Style

Sets font-style

fontStyle italic
italic : Value { provides | italic : Supported }
oblique : Value { provides | oblique : Supported }
BaseValue
{ normal : Supported
, bold : Supported
, bolder : Supported
, lighter : Supported
, int : Supported
}
-> Style

Sets font-weight

fontWeight bold


fontWeight (int 300)
bold : Value { provides | bold : Supported }
lighter : Value { provides | lighter : Supported }
bolder : Value { provides | bolder : Supported }
BaseValue
{ ultraCondensed : Supported
, extraCondensed : Supported
, condensed : Supported
, semiCondensed : Supported
, normal : Supported
, semiExpanded : Supported
, expanded : Supported
, extraExpanded : Supported
, ultraExpanded : Supported
, pct : Supported
}
-> Style

Sets font-stretch

fontStretch ultraCondensed


fontStretch extraCondensed


fontStretch condensed


fontStretch semiCondensed


fontStretch normal


fontStretch semiExpanded


fontStretch expanded


fontStretch extraExpanded


fontStretch ultraExpanded


fontStretch (pct 100)
ultraCondensed : Value { provides | ultraCondensed : Supported }

Sets ultra-condensed value for usage with fontStretch.

  fontDisplay ultraCondensed
extraCondensed : Value { provides | extraCondensed : Supported }

Sets extra-condensed value for usage with fontStretch.

  fontDisplay extraCondensed
condensed : Value { provides | condensed : Supported }

Sets condensed value for usage with fontStretch.

  fontDisplay Condensed
semiCondensed : Value { provides | semiCondensed : Supported }

Sets semi-condensed value for usage with fontStretch.

  fontDisplay semiCondensed
semiExpanded : Value { provides | semiExpanded : Supported }

Sets semi-expanded value for usage with fontStretch.

  fontDisplay semiExpanded
expanded : Value { provides | expanded : Supported }

Sets expanded value for usage with fontStretch.

  fontDisplay Expanded
extraExpanded : Value { provides | extraExpanded : Supported }

Sets extra-expanded value for usage with fontStretch.

  fontDisplay extraExpanded
ultraExpanded : Value { provides | ultraExpanded : Supported }

Sets ultra-expanded value for usage with fontStretch.

  fontDisplay ultraExpanded

Missing typeface synthesis

BaseValue
{ none : Supported
, weight : Supported
, style : Supported
, smallCaps : Supported
}
-> Style

The font-synthesis property.

fontSynthesis none


fontSynthesis smallCaps


fontSynthesis2 smallCaps weight


fontSynthesis3 weight style smallCaps
{ weight : Supported
, style : Supported
, smallCaps : Supported
}
-> Value
{ weight : Supported
, style : Supported
, smallCaps : Supported
}
-> Style

The font-synthesis property.

This is the two-argument variant, in which you can indicate two different font properties to be synthesised by the browser.

fontSynthesis2 smallCaps weight
Value { weight : Supported }
-> Value { style : Supported }
-> Value { smallCaps : Supported }
-> Style

The font-synthesis property.

This is the three-argument variant, in which you can indicate all three different font properties to be synthesised by the browser.

fontSynthesis3 weight style smallCaps
weight : Value { provides | weight : Supported }

The weight value for the fontSynthesis property.

fontSynthesis weight

Variable fonts (not to be confused with font variants)

fontVariationSettings : BaseValue { normal : Supported } -> Style

The 1-argument variant of the font-variation-settings property.

For controlling aspects of variable fonts. Use fontVariationSettingsMany to work with variable font tags.

fontVariationSettings normal


fontVariationSettings inherit


fontVariationSettingsMany [ ("XHGT", 0.7) ]
fontVariationSettingsMany : List ( String, Float ) -> Style

The multi-argument variant of the font-variation-settings property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

For using single keywords with this property, use fontVariationSettings.

fontVariationSettingsMany [ ("XHGT", 0.7) ]


fontVariationSettingsMany [] -- font-variation-settings: unset;

Typographic features

OpenType typographic features

BaseValue
{ featureTag : Supported
, normal : Supported
}
-> Style

Sets font-feature-settings

fontFeatureSettings normal


fontFeatureSettings (featureTag "liga")


fontFeatureSettings (featureTag2 "swsh" 2)
fontFeatureSettingsMany : List (Value { featureTag : Supported }) -> Style

Sets font-feature-settings in a way that lets you add a list of featureTags.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

fontFeatureSettingsMany featureTag "liga" [ featureTag2 "swsh" 2 ]


fontFeatureSettingsMany [] -- font-feature-settings: unset;
featureTag : String -> Value { provides | featureTag : Supported }

Creates a feature-tag-value for use with fontFeatureSettings and fontFeatureSettingsMany

featureTag "smcp"
featureTag2 : String -> Int -> Value { provides | featureTag : Supported }

Creates a feature-tag-value with an specific value for use with fontFeatureSettings and fontFeatureSettingsMany

featureTag2 "swsh" 2

Font Variants

type alias AllFontVariantsSupported supported =
FontVariantCapsSupported
(FontVariantEastAsianSupported
(FontVariantLigaturesSupported
(FontVariantNumericSupported
(FontVariantEmojiSupported
(FontVariantPositionSupported supported)
)
)
)
)

A type that encapsulates all special font variant keywords plus additional types.

type alias AllFontVariants =
AllFontVariantsSupported {}

A type that encapsulates all special font variant keywords.

BaseValue
(AllFontVariantsSupported
{ none : Supported
, normal : Supported
}
)
-> Style

The font-variant CSS property.

This is a shorthand property, encapsulating the following:

fontVariant inherit

fontVariant normal

fontVariant jis83

fontVariant2 commonLigatures smallCaps

fontVariant2 noCommonLigatures slashedZero
fontVariant2 : Value AllFontVariants -> Value AllFontVariants -> Style

The font-variant CSS property.

This is a shorthand property, encapsulating the following:

fontVariant inherit

fontVariant normal

fontVariant jis83

fontVariant2 commonLigatures smallCaps

fontVariant2 noCommonLigatures slashedZero

Alternative capitals

type alias FontVariantCapsSupported supported =
{ supported
| smallCaps : Supported
, allSmallCaps : Supported
, petiteCaps : Supported
, allPetiteCaps : Supported
, unicase : Supported
, titlingCaps : Supported
}

A type that encapsulates all caps font variant keywords plus additional types.

BaseValue (FontVariantCapsSupported { normal : Supported })
-> Style

Sets font-variant-caps.

fontVariantCaps normal


fontVariantCaps smallCaps


fontVariantCaps allSmallCaps


fontVariantCaps petiteCaps


fontVariantCaps allPetiteCaps


fontVariantCaps unicase


fontVariantCaps titlingCaps
smallCaps : Value { provides | smallCaps : Supported }

The small-caps value used in

fontVariantCaps smallCaps

fontSynthesis2 smallCaps style
allSmallCaps : Value { provides | allSmallCaps : Supported }

The all-small-caps font-variant-caps value.

fontVariantCaps allSmallCaps
petiteCaps : Value { provides | petiteCaps : Supported }

The petite-caps font-variant-caps value.

fontVariantCaps petiteCaps
allPetiteCaps : Value { provides | allPetiteCaps : Supported }

The all-petite-caps font-variant-caps value.

fontVariantCaps allPetiteCaps
unicase : Value { provides | unicase : Supported }

The unicase font-variant-caps value.

fontVariantCaps unicase
titlingCaps : Value { provides | titlingCaps : Supported }

The titling-caps font-variant-caps value.

fontVariantCaps titlingCaps

East Asian glyph variants

type alias FontVariantEastAsianSupported supported =
{ supported
| ruby : Supported
, jis78 : Supported
, jis83 : Supported
, jis90 : Supported
, jis04 : Supported
, simplified : Supported
, traditional : Supported
, fullWidth : Supported
, proportionalWidth : Supported
}

A type that encapsulates all east asian font variant keywords plus additional types.

FontVariantEastAsianSupported {}

A type that encapsulates all east asian font variant keywords.

BaseValue
(FontVariantEastAsianSupported { normal : Supported })
-> Style

The font-variant-east-asian property.

This property controls the use of alternative glyphs for East Asian scripts.

fontVariantEastAsian normal


fontVariantEastAsian2 ruby jis83


fontVariantEastAsian3 ruby jis90 fullWidth
fontVariantEastAsian2 : Value FontVariantEastAsian -> Value FontVariantEastAsian -> Style

The font-variant-east-asian property.

This property controls the use of alternative glyphs for East Asian scripts.

fontVariantEastAsian2 ruby jis83
Value { ruby : Supported }
-> Value
{ jis78 : Supported
, jis83 : Supported
, jis90 : Supported
, jis04 : Supported
, simplified : Supported
, traditional : Supported
}
-> Value
{ fullWidth : Supported
, proportionalWidth : Supported
}
-> Style

The font-variant-east-asian property.

This property controls the use of alternative glyphs for East Asian scripts.

fontVariantEastAsian3 ruby jis90 fullWidth
jis78 : Value { provides | jis78 : Supported }

Sets the jis78 value for fontVariantEastAsian.

This specifies that the JIS X 0208:1978 standard for East Asian logographic glyphs should be used.

fontVariantEastAsian jis78
jis83 : Value { provides | jis83 : Supported }

Sets the jis83 value for fontVariantEastAsian.

This specifies that the JIS X 0208:1983 standard for East Asian logographic glyphs should be used.

fontVariantEastAsian jis83
jis90 : Value { provides | jis90 : Supported }

Sets the jis90 value for fontVariantEastAsian.

This specifies that the JIS X 0208:1990 standard for East Asian logographic glyphs should be used.

fontVariantEastAsian jis90
jis04 : Value { provides | jis04 : Supported }

Sets the jis04 value for fontVariantEastAsian.

This specifies that the JIS X 0208:2004 standard for East Asian logographic glyphs should be used.

fontVariantEastAsian jis04
simplified : Value { provides | simplified : Supported }

Sets the simplified value for fontVariantEastAsian.

This specifies that no particular standard should be used for East Asian logographic glyphs apart from them being simplified Chinese glyphs.

fontVariantEastAsian simplified
traditional : Value { provides | traditional : Supported }

Sets the traditional value for fontVariantEastAsian.

This specifies that no particular standard should be used for East Asian logographic glyphs apart from them being traditional Chinese glyphs.

fontVariantEastAsian traditional
proportionalWidth : Value { provides | proportionalWidth : Supported }

Sets the proportional-width value for fontVariantEastAsian.

This activates the East Asian characters that vary in width.

(As opposed to fullWidth, which specifies that they should roughly be the same width.)

fontVariantEastAsian proportionalWidth

Ligatures & contextual forms

type alias FontVariantLigaturesSupported supported =
{ supported
| commonLigatures : Supported
, noCommonLigatures : Supported
, discretionaryLigatures : Supported
, noDiscretionaryLigatures : Supported
, historicalLigatures : Supported
, noHistoricalLigatures : Supported
, contextual : Supported
, noContextual : Supported
}

A type that encapsulates all ligature font variant keywords plus additional types.

BaseValue
(FontVariantLigaturesSupported
{ normal : Supported
, none : Supported
}
)
-> Style

Sets font-variant-ligatures.

fontVariantLigatures discretionaryLigatures


fontVariantLigatures none
commonLigatures : Value { provides | commonLigatures : Supported }

The common-ligatures font-variant-ligatures value.

fontVariantLigatures commonLigatures
noCommonLigatures : Value { provides | noCommonLigatures : Supported }

The no-common-ligatures font-variant-ligatures value.

fontVariantLigatures noCommonLigatures
discretionaryLigatures : Value { provides | discretionaryLigatures : Supported }

The discretionary-ligatures font-variant-ligatures value.

fontVariantLigatures discretionaryLigatures
noDiscretionaryLigatures : Value { provides | noDiscretionaryLigatures : Supported }

The no-discretionary-ligatures font-variant-ligatures value.

fontVariantLigatures noDiscretionaryLigatures
historicalLigatures : Value { provides | historicalLigatures : Supported }

The historical-ligatures font-variant-ligatures value.

fontVariantLigatures historicalLigatures
noHistoricalLigatures : Value { provides | noHistoricalLigatures : Supported }

The no-historical-ligatures font-variant-ligatures value.

fontVariantLigatures noHistoricalLigatures
contextual : Value { provides | contextual : Supported }

The contextual font-variant-ligatures value.

fontVariantLigatures contextual
noContextual : Value { provides | noContextual : Supported }

The no-contextual font-variant-ligatures value.

fontVariantLigatures noContextual

Numerical variants

type alias FontVariantNumericSupported supported =
{ supported
| ordinal : Supported
, slashedZero : Supported
, liningNums : Supported
, oldstyleNums : Supported
, proportionalNums : Supported
, tabularNums : Supported
, diagonalFractions : Supported
, stackedFractions : Supported
}

A type that encapsulates all numeric font variant keywords plus additional types.

type alias FontVariantNumeric =
FontVariantNumericSupported {}

A type that encapsulates all numeric font variant keywords.

BaseValue (FontVariantNumericSupported { normal : Supported })
-> Style

Sets font-variant-numeric.

fontVariantNumeric ordinal


fontVariantNumericMany [ slashedZero liningNums ]
Maybe
{ ordinal : Supported
, slashedZero : Supported
}
)
-> Maybe
{ liningNums : Supported
, oldstyleNums : Supported
}
)
-> Maybe
{ proportionalNums : Supported
, tabularNums : Supported
}
)
-> Maybe
{ diagonalFractions : Supported
, stackedFractions : Supported
}
)
-> Style

Sets font-variant-numeric.

This one can be tricky to use because many of the options are mutually exclusive. For example, normal cannot be used with any of the others, so the only way to get it from this function is to pass Nothing for everything. The other arguments are chosen such that you can choose between the mutually exclusive values, or leave that value off.

fontVariantNumeric ordinal


fontVariantNumeric4 Nothing Nothing Nothing Nothing -- "normal"


fontVariantNumeric4
    (Just ordinal)
    Nothing
    (Just tabularNums)
    Nothing
    -- "ordinal tabular-nums"
ordinal : Value { provides | ordinal : Supported }

The ordinal font-variant-numeric value.

fontVariantNumeric ordinal
slashedZero : Value { provides | slashedZero : Supported }

The slashed-zero font-variant-numeric value.

fontVariantNumeric slashedZero
liningNums : Value { provides | liningNums : Supported }

The lining-nums font-variant-numeric value.

fontVariantNumeric liningNums
oldstyleNums : Value { provides | oldstyleNums : Supported }

The oldstyle-nums font-variant-numeric value.

fontVariantNumeric oldstyleNums
proportionalNums : Value { provides | proportionalNums : Supported }

The proportional-nums font-variant-numeric value.

fontVariantNumeric proportionalNums
tabularNums : Value { provides | tabularNums : Supported }

The tabular-nums font-variant-numeric value.

fontVariantNumeric tabularNums
diagonalFractions : Value { provides | diagonalFractions : Supported }

The diagonal-fractions font-variant-numeric value.

fontVariantNumeric diagonalFractions
stackedFractions : Value { provides | stackedFractions : Supported }

The stacked-fractions font-variant-numeric value.

fontVariantNumeric stackedFractions

Emoji variants

type alias FontVariantEmojiSupported supported =
{ supported
| text : Supported
, emoji : Supported
, unicode : Supported
}

A type that encapsulates all emoji font variant keywords plus additional types.

BaseValue (FontVariantEmojiSupported { normal : Supported })
-> Style

The font-variant-emoji property.

fontVariantEmoji unset


fontVariantEmoji emoji


fontVariantEmoji normal
emoji : Value { provides | emoji : Supported }

The emoji value used with fontFamily, fontFamilyMany and fontVariantEmoji.

fontFamily emoji


fontVariantEmoji emoji
unicode : Value { provides | unicode : Supported }

The unicode value used with fontVariantEmoji.

fontVariantEmoji unicode

Superscript & subscript

type alias FontVariantPositionSupported supported =
{ supported | sub : Supported, super : Supported }

A type that encapsulates all position font variant keywords plus additional types.

BaseValue (FontVariantPositionSupported { normal : Supported })
-> Style

The font-variant-position property.

fontVariantPosition sub


fontVariantPosition normal

Other typographic properties

Kerning

BaseValue
{ none : Supported
, auto : Supported
, normal : Supported
}
-> Style

The font-kerning property.

fontKerning none

Language override

BaseValue
{ normal : Supported
, string : Supported
}
-> Style

The font-language-override property.

fontLanguageOverride normal


fontLanguageOverride (string "ENG")

Optical sizing

BaseValue
{ none : Supported
, auto : Supported
}
-> Style

The font-optical-sizing property.

fontOpticalSizing none

Typographic metrics

BaseValue
(LengthSupported
{ pct : Supported
, normal : Supported
, num : Supported
}
)
-> Style

Sets line-height

lineHeight (pct 150)


lineHeight (em 2)


lineHeight (num 1.5)


lineHeight normal
letterSpacing : BaseValue (LengthSupported { normal : Supported }) -> Style

Sets letter-spacing

letterSpacing (pct 150)


letterSpacing (em 2)


letterSpacing (num 1.5)


letterSpacing normal
textIndent : BaseValue (LengthSupported { pct : Supported }) -> Style

The text-indent property.

textIndent (em 1.5)
Value (LengthSupported { pct : Supported })
-> Value
{ hanging : Supported
, eachLine : Supported
}
-> Style

The text-indent property.

textIndent2 (em 1.5) hanging
Value (LengthSupported { pct : Supported })
-> Value { hanging : Supported }
-> Value { eachLine : Supported }
-> Style

The text-indent property.

textIndent3 (em 1.5) hanging eachLine
hanging : Value { provides | hanging : Supported }

The hanging value used for properties such as textIdent2.

textIdent2 (px 20) hanging
eachLine : Value { provides | eachLine : Supported }

The each-line value used for properties such as textIdent2.

textIdent2 (px 20) eachLine
BaseValue
(LengthSupported
{ normal : Supported
, pct : Supported
}
)
-> Style

Sets word-spacing.

wordSpacing normal


wordSpacing zero


wordSpacing (px 5)
tabSize : BaseValue (LengthSupported { int : Supported }) -> Style

Sets tab-size Note: only positive integer values are allowed.

tabSize (int 4)

Text wrapping, overflow and newlines

BaseValue
{ normal : Supported
, breakAll : Supported
, keepAll : Supported
, breakWord : Supported
}
-> Style

Sets word-break

Note: breakWord has been depreciated.

  wordBreak normal
  wordBreak breakAll
  wordBreak keepAll
  wordBreak breakWord
breakAll : Value { provides | breakAll : Supported }

A breakAll value for the word-break property.

  wordBreak breakAll
keepAll : Value { provides | keepAll : Supported }

A keepAll value for the word-break property.

  wordBreak keepAll
BaseValue
{ auto : Supported
, loose : Supported
, normal : Supported
, strict : Supported
, anywhere : Supported
}
-> Style

Sets the lineBreak property.

lineBreak auto


lineBreak strict
loose : Value { provides | loose : Supported }

Sets loose value for usage with lineBreak.

lineBreak loose
BaseValue
{ normal : Supported
, nowrap : Supported
, pre : Supported
, preWrap : Supported
, preLine : Supported
, breakSpaces : Supported
}
-> Style

Sets white-space

whiteSpace pre


whiteSpace nowrap


whiteSpace preWrap


whiteSpace preLine
pre : Value { provides | pre : Supported }

A pre value for the white-space property.

whiteSpace pre
preWrap : Value { provides | preWrap : Supported }

A pre-wrap value for the white-space property.

whiteSpace preWrap
preLine : Value { provides | preLine : Supported }

A pre-line value for the white-space property.

whiteSpace preLine
BaseValue
{ clip : Supported
, ellipsis : Supported
}
-> Style

Sets the text-overflow property.

text-overflow describes how text that gets cut off is signalled to users.

When the one-argument version is used, it sets the end of text (right end for LTR users) that is cut off.

textOverflow ellipsis

When the two-argument version is used, it specifies how the text cut-off is displayed at the start (left in LTR) and the end (right in LTR) of the text.

textOverflow2 ellipsis ellipsis
{ clip : Supported
, ellipsis : Supported
}
-> Value
{ clip : Supported
, ellipsis : Supported
}
-> Style

Sets the text-overflow property.

text-overflow describes how text that gets cut off is signalled to users.

This version specifies how the text cut-off is displayed at the start (left in LTR) and at the end (right in LTR) of the text.

textOverflow2 ellipsis ellipsis
ellipsis : Value { provides | ellipsis : Supported }

Sets ellipsis value for usage with textOverflow.

textOverflow ellipsis
BaseValue
{ none : Supported
, manual : Supported
, auto : Supported
}
-> Style

Sets hyphens

hyphens none


hyphens manual


hyphens auto
manual : Value { provides | manual : Supported }

Sets manual value for usage with hyphens.

hyphens manual
BaseValue
{ none : Supported
, first_ : Supported
, forceEnd : Supported
, allowEnd : Supported
, last : Supported
}
-> Style

Sets hanging-punctuation

hangingPunctuation none


hangingPunctuation first_


hangingPunctuation2 first_ forceEnd


hangingPunctuation3 first_ allowEnd last
{ first_ : Supported
, last : Supported
}
-> Value
{ first_ : Supported
, forceEnd : Supported
, allowEnd : Supported
, last : Supported
}
-> Style

Sets hanging-punctuation

first_ first_, last first and last last are invalid combinations.

hangingPunctuation2 first_ forceEnd
Value { first_ : Supported }
-> Value
{ forceEnd : Supported
, allowEnd : Supported
}
-> Value { last : Supported }
-> Style

Sets hanging-punctuation

hangingPunctuation3 first_ allowEnd last
first_ : Value { provides | first_ : Supported }

Sets first value for usage with hangingPunctuation.

  hangingPunctuation first_

This is called first_ instead of first because first is already a pseudo-class function.

last : Value { provides | last : Supported }

Sets last value for usage with hangingPunctuation.

  hangingPunctuation last
forceEnd : Value { provides | forceEnd : Supported }

Sets force-end value for usage with hangingPunctuation.

  hangingPunctuation forceEnd
allowEnd : Value { provides | allowEnd : Supported }

Sets allow-end value for usage with hangingPunctuation.

  hangingPunctuation allowEnd

Text decoration and transform

BaseValue
(ColorSupported
{ none : Supported
, underline : Supported
, overline : Supported
, lineThrough : Supported
, solid : Supported
, double : Supported
, dotted : Supported
, dashed : Supported
, wavy : Supported
}
)
-> Style

Sets text-decoration shorthand property.

textDecoration underline
{ none : Supported
, underline : Supported
, overline : Supported
, lineThrough : Supported
}
-> Value
{ solid : Supported
, double : Supported
, dotted : Supported
, dashed : Supported
, wavy : Supported
}
-> Style

Sets text-decoration property.

textDecoration2 underline dotted
{ none : Supported
, underline : Supported
, overline : Supported
, lineThrough : Supported
}
-> Value
{ solid : Supported
, double : Supported
, dotted : Supported
, dashed : Supported
, wavy : Supported
}
-> Value Color
-> Style

Sets text-decoration property.

textDecoration3 underline dotted (hex "#cf0")
BaseValue
{ none : Supported
, underline : Supported
, overline : Supported
, lineThrough : Supported
}
-> Style

Sets text-decoration-line property.

textDecorationLine underline
{ underline : Supported
, overline : Supported
, lineThrough : Supported
}
-> Value
{ underline : Supported
, overline : Supported
, lineThrough : Supported
}
-> Style

Sets text-decoration-line property.

textDecorationLine2 underline overline

Note: The first and second argument MUST NOT be the same.

Value { underline : Supported }
-> Value { overline : Supported }
-> Value { lineThrough : Supported }
-> Style

Sets text-decoration-line property.

textDecorationLine3 underline overline lineThrough
BaseValue
{ solid : Supported
, double : Supported
, dotted : Supported
, dashed : Supported
, wavy : Supported
}
-> Style

Sets text-decoration-style property.

textDecorationStyle wavy
wavy : Value { provides | wavy : Supported }

The wavy text-decoration-style value.

textDecorationStyle wavy
underline : Value { provides | underline : Supported }

The underline text-decoration-line value.

textDecorationLine underline
overline : Value { provides | overline : Supported }

The overline text-decoration-line value.

textDecorationLine overline
lineThrough : Value { provides | lineThrough : Supported }

The line-through text-decoration-line value.

textDecorationLine lineThrough
textDecorationColor : BaseValue (ColorSupported { transparent : Supported }) -> Style

Sets text-decoration-color property.

textDecorationColor (hex "#0cf")
transparent : Value { provides | transparent : Supported }

Sets the transparent value for usage with textDecorationColor.

textDecorationColor transparent
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
, fromFont : Supported
}
)
-> Style

Sets the text-decoration-thickness property.

textDecorationThickness (pct 10)
fromFont : Value { provides | fromFont : Supported }

Sets the from-font value for usage with textDecorationThickness.

textDecorationThickness fromFont
BaseValue
{ auto : Supported
, all_ : Supported
, none : Supported
}
-> Style

Sets text-decoration-skip-ink property.

textDecorationSkipInk auto


textDecorationSkipInk all_


textDecorationSkipInk none
BaseValue
{ auto : Supported
, under : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

Sets text-underline-position

textUnderlinePosition auto


textUnderlinePosition under


textUnderlinePosition left_


textUnderlinePosition right_
Value { under : Supported }
-> Value
{ left_ : Supported
, right_ : Supported
}
-> Style

Sets text-underline-position

textUnderlinePosition2 under left_


textUnderlinePosition2 under right_
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets the text-underline-offset property.

textUnderlineOffset (pct 5)
BaseValue
(ColorSupported
{ none : Supported
, filled : Supported
, open : Supported
, dot : Supported
, circle_ : Supported
, doubleCircle : Supported
, triangle : Supported
, sesame : Supported
, string : Supported
}
)
-> Style

Sets the text-emphasis property.

This is for drawing attention towards textual elements in a way that is commonly used in East Asian languages.

String values should only be one character in length.

textEmphasis (hex "ff0000")


textEmphasis sesame


textEmphasis2 triangle (hex "00ff00")


textEmphasis3 filled dot (hex "ff0000")
{ none : Supported
, filled : Supported
, open : Supported
, dot : Supported
, circle_ : Supported
, doubleCircle : Supported
, triangle : Supported
, sesame : Supported
, string : Supported
}
-> Value Color
-> Style

Sets the text-emphasis property.

This 2-argument form sets textEmphasisStyle and textEmphasisColor in a single declaration.

String values should only be one character in length.

textEmphasis (hex "ff0000")


textEmphasis sesame


textEmphasis2 triangle (hex "00ff00")


textEmphasis3 filled dot (hex "ff0000")
BaseValue
{ filled : Supported
, open : Supported
}
-> BaseValue
{ dot : Supported
, circle_ : Supported
, doubleCircle : Supported
, triangle : Supported
, sesame : Supported
}
-> Value Color
-> Style

Sets the text-emphasis property.

This 3-argument form sets textEmphasisStyle2 and a textEmphasisColor in a single declaration.

textEmphasis (hex "ff0000")


textEmphasis sesame


textEmphasis2 triangle (hex "00ff00")


textEmphasis3 filled dot (hex "ff0000")
BaseValue
{ none : Supported
, filled : Supported
, open : Supported
, dot : Supported
, circle_ : Supported
, doubleCircle : Supported
, triangle : Supported
, sesame : Supported
, string : Supported
}
-> Style

Sets the text-emphasis-style property.

String values should only be one character in length.

textEmphasisStyle none


textEmphasisStyle open


textEmphasisStyle (string "🐯")
{ filled : Supported
, open : Supported
}
-> Value
{ dot : Supported
, circle_ : Supported
, doubleCircle : Supported
, triangle : Supported
, sesame : Supported
}
-> Style

Sets the text-emphasis-style property when you want to use two arguments - one for filled or open, and one for the shape style.

textEmphasisStyle filled sesame


textEmphasisStyle open dot
textEmphasisColor : BaseValue (ColorSupported { transparent : Supported }) -> Style

Sets the text-emphasis-color property.

textEmphasisColor currentcolor


textEmphasisColor (hex "0000ff")


textEmphasisColor transparent
textEmphasisPosition : BaseValue a -> Style

Sets the text-emphasis-position property.

This is the one argument version, which is limited to setting global values.

If you want to specify the positions of the text-emphasis, you must use the 2-argument form.

textEmphasisPosition inherit


textEmphasisPosition revert


textEmphasisPosition2 over left_


textEmphasisPosition2 under right_
BaseValue
{ over : Supported
, under : Supported
}
-> BaseValue
{ left_ : Supported
, right_ : Supported
}
-> Style

Sets the the text-emphasis-position property.

This is the 2-argument form that lets you specify the positions of the emphasis.

if you want to apply global values, you must use the 1-argument form.

textEmphasisPosition inherit


textEmphasisPosition revert


textEmphasisPosition2 over left_


textEmphasisPosition2 under right_
filled : Value { provides | filled : Supported }

The filled value used in textEmphasis.

textEmphasis filled
open : Value { provides | open : Supported }

The open value used in textEmphasis.

textEmphasis open
dot : Value { provides | dot : Supported }

The dot value used in textEmphasis.

textEmphasis dot
doubleCircle : Value { provides | doubleCircle : Supported }

The doubleCircle value used in textEmphasis.

textEmphasis doubleCircle
triangle : Value { provides | triangle : Supported }

The triangle value used in textEmphasis.

textEmphasis triangle
sesame : Value { provides | sesame : Supported }

The sesame value used in textEmphasis.

textEmphasis sesame
over : Value { provides | over : Supported }

The over value used in textEmphasisPosition2.

textEmphasisPosition2 over left_
BaseValue
{ capitalize : Supported
, uppercase : Supported
, lowercase : Supported
, fullWidth : Supported
, fullSizeKana : Supported
, none : Supported
}
-> Style

Sets text-transform.

textTransform capitalize


textTransform uppercase
capitalize : Value { provides | capitalize : Supported }

A capitalize value for the text-transform property.

textTransform capitalize
uppercase : Value { provides | uppercase : Supported }

An uppercase value for the text-transform property.

textTransform uppercase
lowercase : Value { provides | lowercase : Supported }

A lowercase value for the text-transform property.

textTransform lowercase
fullSizeKana : Value { provedes | fullSizeKana : Supported }

The full-size-kana value used by textTransform

textTransform fullSizeKana


Text alignment and justification

BaseValue
{ left_ : Supported
, right_ : Supported
, center : Supported
, justify : Supported
, start : Supported
, end : Supported
, matchParent : Supported
}
-> Style

Sets text-align

textAlign left_


textAlign justfy
justify : Value { provides | justify : Supported }

A justify value for the text-align

textAlign justify
BaseValue
{ interWord : Supported
, interCharacter : Supported
, auto : Supported
, none : Supported
}
-> Style

Sets text-justify

textJustify interWord


textJustify interCharacter


textJustify auto


textJustify none
interWord : Value { provides | interWord : Supported }

A inter-word value for the textJustify property.

textJustify interWord
interCharacter : Value { provides | interCharacter : Supported }

A inter-character value for the textJustify property.

textJustify interCharacter

Script handling

BaseValue
{ rtl : Supported
, ltr : Supported
}
-> Style

Sets direction

direction ltr


direction rtl
ltr : Value { provides | ltr : Supported }

A ltr value for the direction property.

direction ltr
rtl : Value { provides | rtl : Supported }

A rtl value for the direction property.

direction rtl
BaseValue
{ horizontalTb : Supported
, verticalRl : Supported
, verticalLr : Supported
}
-> Style

Sets writing-mode.

writingMode horizontalTb


writingMode verticalRl


writingMode verticalLr
verticalLr : Value { provides | verticalLr : Supported }

Sets vertical-lr value for usage with writingMode.

writingMode verticalLr
verticalRl : Value { provides | verticalRl : Supported }

Sets vertical-rl value for usage with writingMode.

writingMode verticalRl
horizontalTb : Value { provides | horizontalTb : Supported }

Sets horizontal-tb value for usage with writingMode.

writingMode horizontalTb
BaseValue
{ normal : Supported
, embed : Supported
, isolate : Supported
, bidiOverride : Supported
, isolateOverride : Supported
, plaintext : Supported
}
-> Style

Sets unicode-bidi

unicodeBidi normal


unicodeBidi embed


unicodeBidi isolate


unicodeBidi bidiOverride


unicodeBidi isolateOverride


unicodeBidi plaintext
embed : Value { provides | embed : Supported }

Sets embed value for usage with unicodeBidi.

unicodeBidi embed
plaintext : Value { provides | plaintext : Supported }

Sets plaintext value for usage with unicodeBidi.

unicodeBidi plaintext
bidiOverride : Value { provides | bidiOverride : Supported }

Sets bidi-override value for usage with unicodeBidi.

unicodeBidi bidiOverride
isolateOverride : Value { provides | isolateOverride : Supported }

Sets isolate-override value for usage with unicodeBidi.

unicodeBidi isolateOverride
BaseValue
{ mixed : Supported
, sideways : Supported
, sidewaysRight : Supported
, upright : Supported
, useGlyphOrientation : Supported
}
-> Style

Sets text-orientation.

textOrientation sideways


textOrientation upright
mixed : Value { provides | mixed : Supported }

A mixed value for the textOrientation property.

textOrientation mixed
sideways : Value { provides | sideways : Supported }

A sideways value for the textOrientation property.

textOrientation sideways
sidewaysRight : Value { provides | sidewaysRight : Supported }

A sideways-right value for the textOrientation property.

textOrientation sidewaysRight
upright : Value { provides | upright : Supported }

A upright value for the textOrientation property.

textOrientation upright
useGlyphOrientation : Value { provides | useGlyphOrientation : Supported }

A use-glyph-orientation value for the textOrientation property.

textOrientation useGlyphOrientation
BaseValue
{ none : Supported
, auto : Supported
}
-> Style

Sets the quotes property.

This one-argument version can only use keyword or global values.

quotes none


quotes inherit


quotes2 (string "\"") (string "\"")


quotes4 (string "\"") (string "\"") (string "'") (string "'")
Value { string : Supported }
-> Value { string : Supported }
-> Style

Sets the quotes property.

This 2-argument version sets the starting and closing quotation marks for a top-level quote (a quote that is not nested within another quote). It only accepts string values.

quotes auto


quotes2 (string "\"") (string "\"") -- "Hey, this is a first-level quote."


quotes2 (string "'") (string "'") -- 'Hey, this is a first-level quote.'


quotes2 (string "«") (string "»") -- «Hey, this is a first-level quote.»
Value { string : Supported }
-> Value { string : Supported }
-> Value { string : Supported }
-> Value { string : Supported }
-> Style

Sets the quotes property.

This 4-argument version sets the starting and closing quotation marks for both a top-level quote and a nested quote. It only accepts string values.

quotes auto


quotes2 (string "\"") (string "\"")


-- "Hey, this is a first-level quote."




quotes4 (string "\"") (string "\"") (string "\'") (string "\'")


{- "Hey, this is a first-level quote.
'And this is someone else I made up for
a second-level quote!' Yeah, I did that!"
-}


quotes4 (string "«") (string "»") (string "👏") (string "🤔")


{- «Hey, this is a first-level quote.
👏And this is something else I made up for
a second-level quote!🤔 Yeah, I did that!»
-}

Text rendering

BaseValue
{ auto : Supported
, geometricPrecision : Supported
, optimizeLegibility : Supported
, optimizeSpeed : Supported
}
-> Style

Sets text-rendering.

textRendering geometricPrecision


textRendering optimizeSpeed
geometricPrecision : Value { provides | geometricPrecision : Supported }

A geometricPrecision value for the text-rendering property.

textRendering geometricPrecision
optimizeLegibility : Value { provides | optimizeLegibility : Supported }

An optimizeLegibility value for the text-rendering property.

textRendering optimizeLegibility
optimizeSpeed : Value { provides | optimizeSpeed : Supported }

An optimizeSpeed value for the text-rendering property.

textRendering optimizeSpeed

Text selection

BaseValue
{ none : Supported
, auto : Supported
, text : Supported
, contain_ : Supported
, all_ : Supported
}
-> Style

Sets user-select

userSelect none


userSelect auto


userSelect text


userSelect contain_


userSelect all_

Accessibility

BaseValue
{ none : Supported
, normal : Supported
, spellOut : Supported
}
-> Style

Sets speak

speak none


speak normal


speak spellOut
spellOut : Value { provides | spellOut : Supported }

Sets spellOut value for usage with speak.

speak spellOut

List styles

type alias ListStyleType =
ListStyleTypeSupported {}

A type alias used to accept a list-style-type

type alias ListStyleTypeSupported supported =
{ supported
| customIdent : Supported
, string : Supported
, none : Supported
, arabicIndic : Supported
, armenian : Supported
, bengali : Supported
, cambodian : Supported
, circle_ : Supported
, cjkDecimal : Supported
, cjkEarthlyBranch : Supported
, cjkHeavenlyStem : Supported
, cjkIdeographic : Supported
, decimal : Supported
, decimalLeadingZero : Supported
, devanagari : Supported
, disc : Supported
, disclosureClosed : Supported
, disclosureOpen : Supported
, ethiopicNumeric : Supported
, georgian : Supported
, gujarati : Supported
, gurmukhi : Supported
, hebrew : Supported
, hiragana : Supported
, hiraganaIroha : Supported
, japaneseFormal : Supported
, japaneseInformal : Supported
, kannada : Supported
, katakana : Supported
, katakanaIroha : Supported
, khmer : Supported
, koreanHangulFormal : Supported
, koreanHanjaFormal : Supported
, koreanHanjaInformal : Supported
, lao : Supported
, lowerAlpha : Supported
, lowerArmenian : Supported
, lowerGreek : Supported
, lowerLatin : Supported
, lowerRoman : Supported
, malayalam : Supported
, monogolian : Supported
, myanmar : Supported
, oriya : Supported
, persian : Supported
, simpChineseFormal : Supported
, simpChineseInformal : Supported
, square : Supported
, tamil : Supported
, telugu : Supported
, thai : Supported
, tibetan : Supported
, tradChineseFormal : Supported
, tradChineseInformal : Supported
, upperAlpha : Supported
, upperArmenian : Supported
, upperLatin : Supported
, upperRoman : Supported
}

A type alias used to accept a list-style-type among other values.

Note: The [symbols()](https://developer.mozilla.org/en-US/docs/Web/CSS/symbols()) function is not supported. Use property instead.

BaseValue
(ListStyleTypeSupported
(ImageSupported
{ inside : Supported
, outside : Supported
}
)
)
-> Style

The list-style shorthand property.

listStyle lowerAlpha


listStyle outside


listStyle (url "https://example.com")
Value ListStyleType
-> Value
{ inside : Supported
, outside : Supported
}
-> Style

The list-style shorthand property.

listStlye2 lowerAlpha inside

For other combinations of two values please use the dedicated functions: listStyleType, listStlyePosition, and listStyleImage

Value ListStyleType
-> Value
{ inside : Supported
, outside : Supported
}
-> Value (ImageSupported { none : Supported })
-> Style

The list-style shorthand property.

listStyle3 arabic outside (url "https://example.com")
BaseValue
{ inside : Supported
, outside : Supported
}
-> Style

The list-style-position property

listStylePosition inside


listStylePosition outside
inside : Value { provides | inside : Supported }

The inside value used for properties such as list-style-position, and listStyle.

listStylePosition inside
outside : Value { provides | outside : Supported }

The inside value used for properties such as list-style-position, and listStyle.

listStylePosition outside
listStyleType : BaseValue ListStyleType -> Style

The list-style-type property.

listStyleType decimalLeadingZero
listStyleImage : BaseValue (ImageSupported { none : Supported }) -> Style

The list-style-image property.

listStyleImage (url "https://example.com")
arabicIndic : Value { provides | arabicIndic : Supported }

The arabic-indic value used by properties such as listStyle, and listStyleType

listStyleType arabicIndic
armenian : Value { provides | armenian : Supported }

The armenian value used by properties such as listStyle, and listStyleType

listStyleType armenian
bengali : Value { provides | bengali : Supported }

The bengali value used by properties such as listStyle, and listStyleType

listStyleType bengali
cambodian : Value { provides | cambodian : Supported }

The cambodian value used by properties such as listStyle, and listStyleType

listStyleType cambodian
cjkDecimal : Value { provides | cjkDecimal : Supported }

The cjk-decimal value used by properties such as listStyle, and listStyleType

listStyleType cjkDecimal
cjkEarthlyBranch : Value { provides | cjkEarthlyBranch : Supported }

The cjk-earthly-branch value used by properties such as listStyle, and listStyleType

listStyleType cjkEarthlyBranch
cjkHeavenlyStem : Value { provides | cjkHeavenlyStem : Supported }

The cjk-heavenly-stem value used by properties such as listStyle, and listStyleType

listStyleType cjkHeavenlyStem
cjkIdeographic : Value { provides | cjkIdeographic : Supported }

The cjk-ideographic value used by properties such as listStyle, and listStyleType

listStyleType cjkIdeographic
decimal : Value { provides | decimal : Supported }

The decimal value used by properties such as listStyle, and listStyleType

listStyleType decimal
decimalLeadingZero : Value { provides | decimalLeadingZero : Supported }

The decimal-leading-zero value used by properties such as listStyle, and listStyleType

listStyleType decimalLeadingZero
devanagari : Value { provides | devanagari : Supported }

The devanagari value used by properties such as listStyle, and listStyleType

listStyleType devanagari
disclosureClosed : Value { provides | disclosureClosed : Supported }

The disclosure-closed value used by properties such as listStyle, and listStyleType

listStyleType disclosureClosed
disclosureOpen : Value { provides | disclosureOpen : Supported }

The disclosure-open value used by properties such as listStyle, and listStyleType

listStyleType disclosureOpen
disc : Value { provides | disc : Supported }

The disc value used by properties such as listStyle, and listStyleType

listStyleType disc
ethiopicNumeric : Value { provides | ethiopicNumeric : Supported }

The ethiopic-numeric value used by properties such as listStyle, and listStyleType

listStyleType ethiopicNumeric
georgian : Value { provides | georgian : Supported }

The georgian value used by properties such as listStyle, and listStyleType

listStyleType georgian
gujarati : Value { provides | gujarati : Supported }

The gujarati value used by properties such as listStyle, and listStyleType

listStyleType gujarati
gurmukhi : Value { provides | gurmukhi : Supported }

The gurmukhi value used by properties such as listStyle, and listStyleType

listStyleType gurmukhi
hebrew : Value { provides | hebrew : Supported }

The hebrew value used by properties such as listStyle, and listStyleType

listStyleType hebrew
hiragana : Value { provides | hiragana : Supported }

The hiragana value used by properties such as listStyle, and listStyleType

listStyleType hiragana
hiraganaIroha : Value { provides | hiraganaIroha : Supported }

The hiragana-iroha value used by properties such as listStyle, and listStyleType

listStyleType hiraganaIroha
japaneseFormal : Value { provides | japaneseFormal : Supported }

The japanese-formal value used by properties such as listStyle, and listStyleType

listStyleType japaneseFormal
japaneseInformal : Value { provides | japaneseInformal : Supported }

The japanese-informal value used by properties such as listStyle, and listStyleType

listStyleType japaneseInformal
kannada : Value { provides | kannada : Supported }

The kannada value used by properties such as listStyle, and listStyleType

listStyleType kannada
katakana : Value { provides | katakana : Supported }

The katakana value used by properties such as listStyle, and listStyleType

listStyleType katakana
katakanaIroha : Value { provides | katakanaIroha : Supported }

The katakana-iroha value used by properties such as listStyle, and listStyleType

listStyleType katakanaIroha
khmer : Value { provides | khmer : Supported }

The khmer value used by properties such as listStyle, and listStyleType

listStyleType khmer
koreanHangulFormal : Value { provides | koreanHangulFormal : Supported }

The korean-hangul-formal value used by properties such as listStyle, and listStyleType

listStyleType koreanHangulFormal
koreanHanjaFormal : Value { provides | koreanHanjaFormal : Supported }

The korean-hanja-formal value used by properties such as listStyle, and listStyleType

listStyleType koreanHanjaFormal
koreanHanjaInformal : Value { provides | koreanHanjaInformal : Supported }

The korean-hanja-informal value used by properties such as listStyle, and listStyleType

listStyleType koreanHanjaInformal
lao : Value { provides | lao : Supported }

The lao value used by properties such as listStyle, and listStyleType

listStyleType lao
lowerAlpha : Value { provides | lowerAlpha : Supported }

The lower-alpha value used by properties such as listStyle, and listStyleType

listStyleType lowerAlpha
lowerArmenian : Value { provides | lowerArmenian : Supported }

The lower-armenian value used by properties such as listStyle, and listStyleType

listStyleType lowerArmenian
lowerGreek : Value { provides | lowerGreek : Supported }

The lower-greek value used by properties such as listStyle, and listStyleType

listStyleType lowerGreek
lowerLatin : Value { provides | lowerLatin : Supported }

The lower-latin value used by properties such as listStyle, and listStyleType

listStyleType lowerLatin
lowerRoman : Value { provides | lowerRoman : Supported }

The lower-roman value used by properties such as listStyle, and listStyleType

listStyleType lowerRoman
malayalam : Value { provides | malayalam : Supported }

The malayalam value used by properties such as listStyle, and listStyleType

listStyleType malayalam
monogolian : Value { provides | monogolian : Supported }

The monogolian value used by properties such as listStyle, and listStyleType

listStyleType monogolian
myanmar : Value { provides | myanmar : Supported }

The myanmar value used by properties such as listStyle, and listStyleType

listStyleType myanmar
oriya : Value { provides | oriya : Supported }

The oriya value used by properties such as listStyle, and listStyleType

listStyleType oriya
persian : Value { provides | persian : Supported }

The persian value used by properties such as listStyle, and listStyleType

listStyleType persian
simpChineseFormal : Value { provides | simpChineseFormal : Supported }

The simp-chinese-formal value used by properties such as listStyle, and listStyleType

listStyleType simpChineseFormal
simpChineseInformal : Value { provides | simpChineseInformal : Supported }

The simp-chinese-informal value used by properties such as listStyle, and listStyleType

listStyleType simpChineseInformal
tamil : Value { provides | tamil : Supported }

The tamil value used by properties such as listStyle, and listStyleType

listStyleType tamil
telugu : Value { provides | telugu : Supported }

The telugu value used by properties such as listStyle, and listStyleType

listStyleType telugu
thai : Value { provides | thai : Supported }

The thai value used by properties such as listStyle, and listStyleType

listStyleType thai
tibetan : Value { provides | tibetan : Supported }

The tibetan value used by properties such as listStyle, and listStyleType

listStyleType tibetan
tradChineseFormal : Value { provides | tradChineseFormal : Supported }

The trad-chinese-formal value used by properties such as listStyle, and listStyleType

listStyleType tradChineseFormal
tradChineseInformal : Value { provides | tradChineseInformal : Supported }

The trad-chinese-informal value used by properties such as listStyle, and listStyleType

listStyleType tradChineseInformal
upperAlpha : Value { provides | upperAlpha : Supported }

The upper-alpha value used by properties such as listStyle, and listStyleType

listStyleType upperAlpha
upperArmenian : Value { provides | upperArmenian : Supported }

The upper-armenian value used by properties such as listStyle, and listStyleType

listStyleType upperArmenian
upperLatin : Value { provides | upperLatin : Supported }

The upper-latin value used by properties such as listStyle, and listStyleType

listStyleType upperLatin
upperRoman : Value { provides | upperRoman : Supported }

The upper-roman value used by properties such as listStyle, and listStyleType

listStyleType upperRoman

Columns

BaseValue
(LengthSupported
{ auto : Supported
, num : Supported
}
)
-> Style

Sets columns

columns (px 300)


columns (num 2)


columns2 (px 300) (num 2)
Value (LengthSupported { auto : Supported })
-> Value
{ auto : Supported
, num : Supported
}
-> Style

Sets columns

columns (px 300)


columns (num 2)


columns2 (px 300) (num 2)
columnWidth : BaseValue (LengthSupported { auto : Supported }) -> Style

Sets column-width

columnWidth auto


columnWidth (px 200)
BaseValue
{ auto : Supported
, int : Supported
}
-> Style

Sets column-count

columnCount auto


columnCount (num 3)
BaseValue
{ auto : Supported
, balance : Supported
, balanceAll : Supported
}
-> Style

Sets column-fill

columnFill auto


columnFill balance


columnFill balanceAll
balance : Value { provides | balance : Supported }

A balance value used in properties such as columnFill

columnFill balance
balanceAll : Value { provides | balanceAll : Supported }

A balance-all value used in properties such as columnFill

columnFill balanceAll
BaseValue
{ none : Supported
, all_ : Supported
}
-> Style

Sets column-span

columnSpan all_


columnSpan none
columnRule : BaseValue LineWidth -> Style

Sets column-rule. This is a shorthand for the columnRuleWidth, columnRuleStyle, and columnRuleColor properties.

columnRule thin


columnRule2 thin solid


columnRule3 thin solid (hex "#000000")
columnRule2 : Value LineWidth -> Value LineStyle -> Style

Sets column-rule. This is a shorthand for the columnRuleWidth, columnRuleStyle, and columnRuleColor properties.

columnRule thin


columnRule2 thin solid


columnRule3 thin solid (hex "#000000")
columnRule3 : Value LineWidth -> Value LineStyle -> Value Color -> Style

Sets column-rule. This is a shorthand for the columnRuleWidth, columnRuleStyle, and columnRuleColor properties.

columnRule thin


columnRule2 thin solid


columnRule3 thin solid (hex "#000000")
columnRuleWidth : BaseValue LineWidth -> Style

Sets column-rule-width

columnRuleWidth thin


columnRuleWidth (px 2)
columnRuleStyle : BaseValue LineStyle -> Style

Sets column-rule-style

columnRuleStyle solid


columnRuleStyle dotted


columnRuleStyle dashed
columnRuleColor : BaseValue Color -> Style

Sets column-rule-color

columnRuleColor (rgb 0 0 0)


columnRuleColor (hex "#fff")

Tables

BaseValue
{ collapse : Supported
, separate : Supported
}
-> Style

Sets border-collapse.

borderCollapse collapse


borderCollapse separate
collapse : Value { provides | collapse : Supported }

A collapse value for the border-collapse and visibility property.

borderCollapse collapse


visibility collapse
separate : Value { provides | separate : Supported }

A separate value for the border-separate property.

borderCollapse separate
borderSpacing : BaseValue Length -> Style

Sets border-spacing.

borderSpacing zero


borderSpacing (px 5)
borderSpacing2 : Value Length -> Value Length -> Style

Sets border-spacing, defining horizontal and vertical spacing separately.

borderSpacing2 (cm 1) (em 2)
BaseValue
{ top_ : Supported
, bottom_ : Supported
, blockStart : Supported
, blockEnd : Supported
, inlineStart : Supported
, inlineEnd : Supported
}
-> Style

Sets caption-side.

captionSide top_


captionSide bottom_


captionSide blockStart


captionSide inlineEnd
BaseValue
{ show : Supported
, hide : Supported
}
-> Style

Sets empty-cells.

emptyCells show


emptyCells hide
show : Value { provides | show : Supported }

A show value for the empty-cells property.

emptyCells show
hide : Value { provides | hide : Supported }

A hide value for the empty-cells property.

emptyCells hide
BaseValue
{ auto : Supported
, fixed : Supported
}
-> Style

Sets table-layout.

tableLayout auto


tableLayout fixed

Content fragmentation

BaseValue
{ auto : Supported
, avoid : Supported
, avoidPage : Supported
, page : Supported
, left_ : Supported
, right_ : Supported
, avoidColumn : Supported
, column : Supported
}
-> Style

Sets break-before.

breakBefore auto
BaseValue
{ auto : Supported
, avoid : Supported
, avoidPage : Supported
, page : Supported
, left_ : Supported
, right_ : Supported
, avoidColumn : Supported
, column : Supported
}
-> Style

Sets break-after.

breakAfter auto
BaseValue
{ auto : Supported
, avoid : Supported
, avoidPage : Supported
, avoidColumn : Supported
}
-> Style

Sets break-inside

breakInside auto


breakInside avoid


breakInside avoidPage


breakInside avoidColumn
avoid : Value { provides | avoid : Supported }

Sets avoid value for usage with breakAfter, breakBefore and breakInside.

breakBefore avoid


breakAfter avoid


breakInside avoid
avoidPage : Value { provides | avoidPage : Supported }

Sets avoid-page value for usage with breakAfter, breakBefore and breakInside.

breakBefore avoidPage


breakAfter avoidPage


breakInside avoidPage
avoidColumn : Value { provides | avoidColumn : Supported }

Sets avoid-column value for usage with breakAfter, breakBefore and breakInside.

breakBefore avoidColumn


breakAfter avoidColumn


breakInside avoidColumn
page : Value { provides | page : Supported }

Sets page value for usage with breakAfter and breakBefore.

breakBefore page


breakAfter page
BaseValue
{ auto : Supported
, always : Supported
, avoid : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

Sets page-break-before

This property has been depreciated and replaced with breakBefore, but is still included for backwards compatibility.

pageBreakBefore auto


pageBreakBefore always


pageBreakBefore avoid


pageBreakBefore left_


pageBreakBefore right_
BaseValue
{ auto : Supported
, always : Supported
, avoid : Supported
, left_ : Supported
, right_ : Supported
}
-> Style

Sets page-break-after

This property has been depreciated and replaced with breakAfter, but is still included for backwards compatibility.

pageBreakAfter auto


pageBreakAfter always


pageBreakAfter avoid


pageBreakAfter left_


pageBreakAfter right_
BaseValue
{ auto : Supported
, avoid : Supported
}
-> Style

Sets page-break-inside

pageBreakInside auto


pageBreakInside avoid
orphans : BaseValue { int : Supported } -> Style

Sets orphans Note: This function accepts only positive integers.

orphans (int 2)
widows : BaseValue { int : Supported } -> Style

Sets widows Note: This function accepts only positive integers.

widows (int 2)
BaseValue
{ slice : Supported
, clone : Supported
}
-> Style

Sets box-decoration-break

boxDecorationBreak slice


boxDecorationBreak clone

Arranging inline/block stuff

BaseValue
{ none : Supported
, left_ : Supported
, right_ : Supported
, inlineStart : Supported
, inlineEnd : Supported
}
-> Style

Sets float.

float none


float left_


float right_


float inlineStart
BaseValue
{ none : Supported
, left_ : Supported
, right_ : Supported
, both : Supported
, inlineStart : Supported
, inlineEnd : Supported
}
-> Style

Sets clear property.

clear none


clear both


clear left_


clear right_


clear inlineStart


clear inlineEnd
BaseValue
(LengthSupported
{ baseline : Supported
, sub : Supported
, super : Supported
, textTop : Supported
, textBottom : Supported
, middle : Supported
, top_ : Supported
, bottom_ : Supported
, pct : Supported
}
)
-> Style

Sets vertical-align.

verticalAlign textBottom


verticalAlign (em 1)
textTop : Value { provides | textTop : Supported }

A textTop value for the vertical-align property.

verticalAlign textTop
textBottom : Value { provides | textBottom : Supported }

A textBottom value for the vertical-align property.

verticalAlign textBottom
middle : Value { provides | middle : Supported }

A middle value for the vertical-align property.

verticalAlign middle

Replaced elements

BaseValue
{ fill_ : Supported
, contain_ : Supported
, cover : Supported
, none : Supported
, scaleDown : Supported
}
-> Style

Sets object-fit

objectFit fill_


objectFit contain_


objectFit cover


objectFit scaleDown


objectFit none
scaleDown : Value { provides | scaleDown : Supported }

Sets scale-down value for usage with objectFit.

objectFit scaleDown
BaseValue
(LengthSupported
{ left_ : Supported
, right_ : Supported
, top_ : Supported
, bottom_ : Supported
, center : Supported
}
)
-> Style

Sets object-position.

objectPosition left_


objectPosition (px 45)

objectPosition sets the horizontal direction. If you need the vertical direction instead, use objectPosition2 like this:

objectPosition zero (px 45)

If you need to set the offsets from the right or bottom, use objectPosition4 like this:

objectPosition4 right_ (px 20) bottom_ (pct 25)
(LengthSupported
{ left_ : Supported
, right_ : Supported
, center : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ top_ : Supported
, bottom_ : Supported
, center : Supported
, pct : Supported
}
)
-> Style

Sets object-position.

objectPosition2 left_ top_


objectPosition2 (px 45) (pct 50)

objectPosition2 sets both the horizontal and vertical directions (in that order, same as CSS.) If you need only the horizontal, you can use objectPosition instead:

objectPosition left_

If you need to set the offsets from the right or bottom, use objectPosition4 like this:

objectPosition4 right_ (px 20) bottom_ (pct 25)
{ left_ : Supported
, right_ : Supported
}
-> Value (LengthSupported { pct : Supported })
-> Value
{ top_ : Supported
, bottom_ : Supported
}
-> Value (LengthSupported { pct : Supported })
-> Style

Sets object-position.

objectPosition4 right_ (px 20) bottom_ (pct 30)

The four-argument form of object position alternates sides and offets. So the example above would position the object image 20px from the right, and 30% from the bottom.

See also objectPosition for horizontal alignment and objectPosition2 for horizontal (from left) and vertical (from top) alignment.


Pointer and touch

Pointer events

BaseValue
{ auto : Supported
, none : Supported
, visiblePainted : Supported
, visibleFill : Supported
, visibleStroke : Supported
, visible : Supported
, painted : Supported
, fill_ : Supported
, stroke : Supported
, all_ : Supported
}
-> Style

Sets pointer-events

pointerEvents none


pointerEvents auto
visiblePainted : Value { provides | visiblePainted : Supported }

The visiblePainted value used by pointerEvents.

pointerEvents visiblePainted
visibleFill : Value { provides | visibleFill : Supported }

The visibleFill value used by pointerEvents.

pointerEvents visibleFill
visibleStroke : Value { provides | visibleStroke : Supported }

The visibleStroke value used by pointerEvents.

pointerEvents visibleStroke
painted : Value { provides | painted : Supported }

The painted value used by pointerEvents.

pointerEvents painted

Touch action

BaseValue
{ auto : Supported
, none : Supported
, panX : Supported
, panY : Supported
, pinchZoom : Supported
, manipulation : Supported
}
-> Style

The touch-action property.

touchAction auto


touchAction panY


touchAction pinchZoom
panX : Value { provides | panX : Supported }

The pan-x value used by touch-action.

touchAction panX
panY : Value { provides | panY : Supported }

The pan-y value used by touch-action.

touchAction panY
pinchZoom : Value { provides | pinchZoom : Supported }

The pinch-zoom value used by touch-action.

touchAction pinchZoom
manipulation : Value { provides | manipulation : Supported }

The manipulation value used by touch-action.

touchAction manipulation

Scrollbar customisation

scrollbarColor : BaseValue (ColorSupported { auto : Supported }) -> Style

Sets the scrollbar-color property.

scrollbarColor auto


scrollbarColor (hex "f35d93")
BaseValue
{ auto : Supported
, thin : Supported
, none : Supported
}
-> Style

Sets the scrollbar-width property.

scrollbarWidth auto


scrollbarWidth thin
BaseValue
{ auto : Supported
, stable : Supported
}
-> Style

The scrollbar-gutter property.

This 1-argument variant can accept global values and some keywords.

scrollbarGutter auto


scrollbarGutter inherit


scrollbarGutter2 stable bothEdges
Value { stable : Supported }
-> Value { bothEdges : Supported }
-> Style

The scrollbar-gutter property.

This 2-argument variant can only accept the keywords stable and bothEdges.

scrollbarGutter auto


scrollbarGutter inherit


scrollbarGutter2 stable bothEdges
stable : Value { provides | stable : Supported }

The stable value used by scrollbarGutter.

scrollbarGutter stable
bothEdges : Value { provides | bothEdges : Supported }

The both-edges value used by scrollbarGutter.

scrollbarGutter2 stable bothEdges

Scrolling behavior

BaseValue
{ auto : Supported
, smooth : Supported
}
-> Style

Sets scroll-behavior

scrollBehavior auto


scrollBehavior smooth
smooth : Value { provides | smooth : Supported }

Sets smooth value for usage with scrollBehavior.

scrollBehavior smooth
BaseValue
{ auto : Supported
, contain_ : Supported
, none : Supported
}
-> Style

Sets the overscroll-behavior property.

This property is a shorthand for setting both overscroll-behavior-x and overscroll-behavior-y.

overscrollBehavior auto -- sets both X and Y to auto


overscrollBehavior2 auto contain -- X = auto, Y = contain.
{ auto : Supported
, contain_ : Supported
, none : Supported
}
-> Value
{ auto : Supported
, contain_ : Supported
, none : Supported
}
-> Style

Sets the overscroll-behavior property.

This property is a shorthand for setting both overscroll-behavior-x and overscroll-behavior-y.

overscrollBehavior2 auto contain_ -- X = auto, Y = contain.
BaseValue
{ auto : Supported
, contain_ : Supported
, none : Supported
}
-> Style

Sets the overscroll-behavior-x property.

overscrollBehaviorX auto


overscrollBehaviorX contain_
BaseValue
{ auto : Supported
, contain_ : Supported
, none : Supported
}
-> Style

Sets the overscroll-behavior-y property.

overscrollBehaviorY auto


overscrollBehaviorY contain_
BaseValue
{ auto : Supported
, contain_ : Supported
, none : Supported
}
-> Style

Sets the overscroll-behavior-block property.

overscrollBehaviorBlock auto


overscrollBehaviorBlock contain_
BaseValue
{ auto : Supported
, contain_ : Supported
, none : Supported
}
-> Style

Sets the overscroll-behavior-inline property.

overscrollBehaviorInline auto


overscrollBehaviorInline contain_

Scroll snapping

BaseValue
{ none : Supported
, x : Supported
, y : Supported
, block : Supported
, inline : Supported
, both : Supported
}
-> Style

Sets scroll-snap-type

scrollSnapType none
{ x : Supported
, y : Supported
, block : Supported
, inline : Supported
, both : Supported
}
-> Value
{ mandatory : Supported
, proximity : Supported
}
-> Style

Sets scroll-snap-type

scrollSnapType2 x mandatory


scrollSnapType2 both proximity
BaseValue
{ none : Supported
, start : Supported
, center : Supported
, end : Supported
}
-> Style

Sets scroll-snap-align

scrollSnapAlign none


scrollSnapAlign start


scrollSnapAlign center


scrollSnapAlign end
BaseValue
{ normal : Supported
, always : Supported
}
-> Style

Sets scroll-snap-stop

scrollSnapStop normal


scrollSnapStop always
mandatory : Value { provides | mandatory : Supported }

Sets mandatory value for usage with scrollSnapType2.

scrollSnapType2 x mandatory
proximity : Value { provides | proximity : Supported }

Sets proximity value for usage with scrollSnapType2.

scrollSnapType2 x proximity

Margin

scrollMargin : BaseValue Length -> Style

Sets scroll-margin property. The scrollMargin property is a shorthand property for setting scroll-margin-top, scroll-margin-right, scroll-margin-bottom, and scroll-margin-left in a single declaration.

If there is only one argument value, it applies to all sides. If there are two values, the top and bottom margins are set to the first value and the right and left margins are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values they apply to the top, right, bottom, and left, respectively.

scrollMargin (em 4) -- set all margins to 4em


scrollMargin2 (em 4) (px 2) -- top & bottom = 4em, right & left = 2px


scrollMargin3 (em 4) (px 2) (pt 5) -- top = 4em, right = 2px, bottom = 5pt, left = 2px


scrollMargin4 (em 4) (px 2) (pt 5) (px 3) -- top = 4em, right = 2px, bottom = 5pt, left = 3px
scrollMargin2 : Value Length -> Value Length -> Style

Sets scroll-margin property. The scrollMargin2 property is a shorthand property for setting scroll-margin-top, scroll-margin-right, scroll-margin-bottom, and scroll-margin-left in a single declaration.

The top and bottom margins are set to the first value and the right and left margins are set to the second.

scrollMargin2 (em 4) (px 2) -- top & bottom = 4em, right & left = 2px
scrollMargin3 : Value Length -> Value Length -> Value Length -> Style

Sets scroll-margin property. The scrollMargin3 property is a shorthand property for setting scroll-margin-top, scroll-margin-right, scroll-margin-bottom, and scroll-margin-left in a single declaration.

The top margin is set to the first value, the left and right are set to the second, and the bottom is set to the third.

scrollMargin3 (em 4) (px 2) (pt 5) -- top = 4em, right = 2px, bottom = 5pt, left = 2px
scrollMargin4 : Value Length -> Value Length -> Value Length -> Value Length -> Style

Sets scroll-margin property. The scrollMargin4 property is a shorthand property for setting scroll-margin-top, scroll-margin-right, scroll-margin-bottom, and scroll-margin-left in a single declaration.

The four values apply to the top, right, bottom, and left margins.

scrollMargin4 (em 4) (px 2) (pt 5) (px 3) -- top = 4em, right = 2px, bottom = 5pt, left = 3px
scrollMarginTop : BaseValue Length -> Style

Sets scroll-margin-top property.

scrollMarginTop (px 4)
scrollMarginLeft : BaseValue Length -> Style

Sets scroll-margin-left property.

scrollMarginLeft (px 4)
scrollMarginRight : BaseValue Length -> Style

Sets scroll-margin-right property.

scrollMarginRight (px 4)
scrollMarginBottom : BaseValue Length -> Style

Sets scroll-margin-bottom property.

scrollMarginBottom (px 4)
scrollMarginBlock : BaseValue Length -> Style

Sets scroll-margin-block property. The scrollMarginBlock property is a shorthand property for setting scroll-margin-block-start and scroll-margin-block-end in a single declaration.

If there is only one argument value, it applies to both sides. If there are two values, the block start margin is set to the first value and the block end margin is set to the second.

scrollMarginBlock (em 4) -- set both block margins to 4em


scrollMarginBlock2 (em 4) (px 2) -- block start = 4em, block end = 2px
scrollMarginBlock2 : Value Length -> Value Length -> Style

Sets scroll-margin-block property. The scrollMarginBlock2 property is a shorthand property for setting scroll-margin-block-start and scroll-margin-block-end in a single declaration.

The block start margin is set to the first value and the block end margin is set to the second.

scrollMarginBlock2 (em 4) (px 2) -- block start = 4em, block end = 2px
scrollMarginInline : BaseValue Length -> Style

Sets scroll-margin-inline property. The scrollMarginInline property is a shorthand property for setting scroll-margin-inline-start and scroll-margin-inline-end in a single declaration.

If there is only one argument value, it applies to both sides. If there are two values, the inline start margin is set to the first value and the inline end margin is set to the second.

scrollMarginInline (em 4) -- set both inline margins to 4em


scrollMarginInline2 (em 4) (px 2) -- inline start = 4em, inline end = 2px
scrollMarginInline2 : Value Length -> Value Length -> Style

Sets scroll-margin-inline property. The scrollMarginInline2 property is a shorthand property for setting scroll-margin-inline-start and scroll-margin-inline-end in a single declaration.

The inline start margin is set to the first value and the inline end margin is set to the second.

scrollMarginInline2 (em 4) (px 2) -- inline start = 4em, inline end = 2px
scrollMarginBlockStart : BaseValue Length -> Style

Sets scroll-margin-block-start property.

scrollMarginBlockStart (px 4)
scrollMarginBlockEnd : BaseValue Length -> Style

Sets scroll-margin-block-end property.

scrollMarginBlockEnd (px 4)
scrollMarginInlineStart : BaseValue Length -> Style

Sets scroll-margin-inline-start property.

scrollMarginInlineStart (px 4)
scrollMarginInlineEnd : BaseValue Length -> Style

Sets scroll-margin-inline-end property.

scrollMarginInlineEnd (px 4)

Padding

BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding property. The scrollPadding property is a shorthand property for setting scroll-padding-top, scroll-padding-right, scroll-padding-bottom, and scroll-padding-left in a single declaration.

If there is only one argument value, it applies to all sides. If there are two values, the top and bottom paddings are set to the first value and the right and left paddings are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values they apply to the top, right, bottom, and left, respectively.

scrollPadding (em 4) -- set all paddings to 4em


scrollPadding2 (em 4) (px 2) -- top & bottom = 4em, right & left = 2px


scrollPadding3 (em 4) (px 2) (pct 5) -- top = 4em, right = 2px, bottom = 5%, left = 2px


scrollPadding4 (em 4) (px 2) (pct 5) (px 3) -- top = 4em, right = 2px, bottom = 5%, left = 3px
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding property. The scrollPadding2 property is a shorthand property for setting scroll-padding-top, scroll-padding-right, scroll-padding-bottom, and scroll-padding-left in a single declaration.

The top and bottom margins are set to the first value and the right and left margins are set to the second.

scrollPadding2 (em 4) (px 2) -- top & bottom = 4em, right & left = 2px
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding property. The scrollPadding3 property is a shorthand property for setting scroll-padding-top, scroll-padding-right, scroll-padding-bottom, and scroll-padding-left in a single declaration.

The top padding is set to the first value, the left and right are set to the second, and the bottom is set to the third.

scrollPadding3 (em 4) (px 2) (pct 5) -- top = 4em, right = 2px, bottom = 5%, left = 2px
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding property. The scrollPadding4 property is a shorthand property for setting scroll-padding-top, scroll-padding-right, scroll-padding-bottom, and scroll-padding-left in a single declaration.

The four values apply to the top, right, bottom, and left paddings.

scrollPadding4 (em 4) (px 2) (pct 5) (px 3) -- top = 4em, right = 2px, bottom = 5%, left = 3px
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-top property.

scrollPaddingTop (px 4)
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-left property.

scrollPaddingLeft (px 4)
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-right property.

scrollPaddingRight (px 4)
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-bottom property.

scrollPaddingBottom (px 4)
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-block property. The scroll-padding-block property is a shorthand property for setting scroll-padding-block-start and scroll-padding-block-end in a single declaration.

If there is only one argument value, it applies to both sides. If there are two values, the block start padding is set to the first value and the block end padding is set to the second.

scrollPaddingBlock (em 4) -- set both block paddings to 4em


scrollPaddingBlock2 (em 4) (px 2) -- block start = 4em, block end = 2px
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-block property. The scroll-padding-block property is a shorthand property for setting scroll-padding-block-start and scroll-padding-block-end in a single declaration.

The block start padding is set to the first value and the block end padding is set to the second.

scrollPaddingBlock2 (em 4) (px 2) -- block start = 4em, block end = 2px
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-inline property. The scroll-padding-inline property is a shorthand property for setting scroll-padding-inline-start and scroll-padding-inline-end in a single declaration.

If there is only one argument value, it applies to both sides. If there are two values, the inline start padding is set to the first value and the inline end padding is set to the second.

scrollPaddingInline (em 4) -- set both inline paddings to 4em


scrollPaddingInline2 (em 4) (px 2) -- inline start = 4em, inline end = 2px
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-inline property. The scroll-padding-inline property is a shorthand property for setting scroll-padding-inline-start and scroll-padding-inline-end in a single declaration.

The inline start padding is set to the first value and the inline end padding is set to the second.

scrollPaddingInline2 (em 4) (px 2) -- inline start = 4em, inline end = 2px
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-block-start property.

scrollPaddingBlockStart (px 4)
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-block-end property.

scrollPaddingBlockEnd (px 4)
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-inline-start property.

scrollPaddingInlineStart (px 4)
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
}
)
-> Style

Sets scroll-padding-inline-end property.

scrollPaddingInlineEnd (px 4)

Cursors

type alias CursorKeyword =
{ pointer : Supported
, auto : Supported
, default_ : Supported
, none : Supported
, contextMenu : Supported
, help : Supported
, progress : Supported
, wait : Supported
, cell : Supported
, crosshair : Supported
, text : Supported
, verticalText : Supported
, alias : Supported
, copy : Supported
, move : Supported
, noDrop : Supported
, notAllowed : Supported
, allScroll : Supported
, colResize : Supported
, rowResize : Supported
, nResize : Supported
, eResize : Supported
, sResize : Supported
, wResize : Supported
, neResize : Supported
, nwResize : Supported
, seResize : Supported
, swResize : Supported
, ewResize : Supported
, nsResize : Supported
, neswResize : Supported
, nwseResize : Supported
, zoomIn : Supported
, zoomOut : Supported
, grab : Supported
, grabbing : Supported
}

A type alias used for the various cursor properties

cursor : BaseValue CursorKeyword -> Style

The cursor property.

cursor notAllowed
cursor2 : Value { url : Supported } -> Value CursorKeyword -> Style

The cursor property.

cursor2 (url "https://example.com") move
Value { url : Supported }
-> Value
{ num : Supported
, zero : Supported
, default_ : Supported
}
-> Value
{ num : Supported
, zero : Supported
}
-> Value CursorKeyword
-> Style

The cursor property.

cursor4 (url "https://example.com") (num 34) zero move

Cursor values

text is also a supported value for cursor.

pointer : Value { provides | pointer : Supported }

The pointer value for the cursor property.

default_ : Value { provides | default_ : Supported }

The default value for the cursor property.

This value is called default_ instead of default because default is already a pseudo-class function.

contextMenu : Value { provides | contextMenu : Supported }

The context-menu value for the cursor property.

help : Value { provides | help : Supported }

The help value for the cursor property.

progress : Value { provides | progress : Supported }

The progress value for the cursor property.

wait : Value { provides | wait : Supported }

The wait value for the cursor property.

cell : Value { provides | cell : Supported }

The cell value for the cursor property.

crosshair : Value { provides | crosshair : Supported }

The crosshair value for the cursor property.

verticalText : Value { provides | verticalText : Supported }

The vertical-text value for the cursor property.

alias : Value { provides | alias : Supported }

The alias value for the cursor property.

copy : Value { provides | copy : Supported }

The copy value for the cursor property.

move : Value { provides | move : Supported }

The move value for the cursor property.

noDrop : Value { provides | noDrop : Supported }

The no-drop value for the cursor property.

notAllowed : Value { provides | notAllowed : Supported }

The notAllowed value for the cursor property.

allScroll : Value { provides | allScroll : Supported }

The all-scroll value for the cursor property.

colResize : Value { provides | colResize : Supported }

The col-resize value for the cursor property.

rowResize : Value { provides | rowResize : Supported }

The row-resize value for the cursor property.

nResize : Value { provides | nResize : Supported }

The n-resize value for the cursor property.

eResize : Value { provides | eResize : Supported }

The e-resize value for the cursor property.

sResize : Value { provides | sResize : Supported }

The s-resize value for the cursor property.

wResize : Value { provides | wResize : Supported }

The w-resize value for the cursor property.

neResize : Value { provides | neResize : Supported }

The ne-resize value for the cursor property.

nwResize : Value { provides | nwResize : Supported }

The nw-resize value for the cursor property.

seResize : Value { provides | seResize : Supported }

The se-resize value for the cursor property.

swResize : Value { provides | swResize : Supported }

The sw-resize value for the cursor property.

ewResize : Value { provides | ewResize : Supported }

The ew-resize value for the cursor property.

nsResize : Value { provides | nsResize : Supported }

The ns-resize value for the cursor property.

neswResize : Value { provides | neswResize : Supported }

The nesw-resize value for the cursor property.

nwseResize : Value { provides | nwseResize : Supported }

The nwse-resize value for the cursor property.

zoomIn : Value { provides | zoomIn : Supported }

The zoom-in value for the cursor property.

zoomOut : Value { provides | zoomOut : Supported }

The zoom-out value for the cursor property.

grab : Value { provides | grab : Supported }

The grab value for the cursor property.

grabbing : Value { provides | grabbing : Supported }

The grabbing value for the cursor property.

Caret color

BaseValue
(ColorSupported
{ auto : Supported
, transparent : Supported
}
)
-> Style

Sets caret-color

caretColor (hex "#60b5cc")


caretColor (rgb 96 181 204)


caretColor (rgba 96 181 204 0.5)

Gradients

Value { colorStop : Supported }
-> Value { colorStop : Supported }
-> List (Value { colorStop : Supported })
-> Value { provides | linearGradient : Supported }

Produces [linear-gradient()](https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient()) values used by properties such as backgroundImage, and listStyleImage

linearGradient (stop red) (stop blue) []


linearGradient (stop red) (stop blue) [ stop green ]
(AngleSupported
{ toBottom : Supported
, toBottomLeft : Supported
, toBottomRight : Supported
, toLeft : Supported
, toRight : Supported
, toTop : Supported
, toTopLeft : Supported
, toTopRight : Supported
}
)
-> Value { colorStop : Supported }
-> Value { colorStop : Supported }
-> List (Value { colorStop : Supported })
-> Value { provides | linearGradient : Supported }

Produces [linear-gradient()](https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient()) values used by properties such as backgroundImage, and listStyleImage

linearGradient2 toTop (stop red) (stop blue) []


linearGradient2 toTop (stop red) (stop blue) [ stop green ]
stop : Value Color -> Value { provides | colorStop : Supported }

Provides a stop for a gradient.

linearGradient toTop (stop red) (stop blue) []

See also stop2 for controlling stop positioning.

Value Color
-> Value (LengthSupported { pct : Supported })
-> Value { provides | colorStop : Supported }

Provides a stop for a gradient.

linearGradient toTop (stop2 red (px 20)) (stop blue) []

See also stop if you don't need to control the stop position.

Value Color
-> Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value { provides | colorStop : Supported }

Provides a stop for a gradient.

linearGradient (stop3 (hex "111") zero (pt 1)) (stop3 (hex "6454") (pt 2) (pct 45))
toBottom : Value { provides | toBottom : Supported }

Provides the to bottom side angle for gradients.

linearGradient toBottom (stop red) (stop blue) []

If you want your gradient to go to a corner, use toBottomLeft or toBottomRight:

linearGradient toBottomLeft (stop red) (stop blue) []


linearGradient toBottomRight (stop red) (stop blue) []
toBottomLeft : Value { provides | toBottomLeft : Supported }

Provides the to bottom left corner angle for gradients.

linearGradient toBottomLeft (stop red) (stop blue) []

If you want your gradient to go to a side, use toBottom or toLeft instead:

linearGradient toBottom (stop red) (stop blue) []


linearGradient toLeft (stop red) (stop blue) []
toBottomRight : Value { provides | toBottomRight : Supported }

Provides the to bottom right corner angle for gradients.

linearGradient toBottomRight (stop red) (stop blue) []

If you want your gradient to go to a side, use toBottom or toRight instead:

linearGradient toBottom (stop red) (stop blue) []


linearGradient toRight (stop red) (stop blue) []
toLeft : Value { provides | toLeft : Supported }

Provides the to left side angle for gradients.

linearGradient toLeft (stop red) (stop blue) []

If you want your gradient to go to a corner, use toTopLeft or toBottomLeft:

linearGradient toTopLeft (stop red) (stop blue) []


linearGradient toBottomLeft (stop red) (stop blue) []
toRight : Value { provides | toRight : Supported }

Provides the to right side angle for gradients.

linearGradient toRight (stop red) (stop blue) []

If you want your gradient to go to a corner, use toTopRight or toBottomRight:

linearGradient toTopRight (stop red) (stop blue) []


linearGradient toBottomRight (stop red) (stop blue) []
toTop : Value { provides | toTop : Supported }

Provides the to top side angle for gradients.

linearGradient toTop (stop red) (stop blue) []

If you want your gradient to go to a corner, use toTopLeft or toTopRight:

linearGradient toTopLeft (stop red) (stop blue) []


linearGradient toTopRight (stop red) (stop blue) []
toTopLeft : Value { provides | toTopLeft : Supported }

Provides the to top left corner angle for gradients.

linearGradient toTopLeft (stop red) (stop blue) []

If you want your gradient to go to a side, use toTop or toLeft instead:

linearGradient toTop (stop red) (stop blue) []


linearGradient toLeft (stop red) (stop blue) []
toTopRight : Value { provides | toTopRight : Supported }

Provides the to top right corner angle for gradients.

linearGradient toTopRight (stop red) (stop blue) []

If you want your gradient to go to a side, use toTop or toRight instead:

linearGradient toTop (stop red) (stop blue) []


linearGradient toRight (stop red) (stop blue) []

Shadows

type alias BoxShadowConfig =
{ offsetX : Value (LengthSupported { pct : Supported })
, offsetY : Value (LengthSupported { pct : Supported })
, blurRadius :
Maybe (Value (LengthSupported { pct : Supported }))
, spreadRadius :
Maybe (Value (LengthSupported { pct : Supported }))
, color : Maybe (Value Color)
, inset : Bool
}

Configuration for boxShadow.

boxShadow : BaseValue { none : Supported } -> Style

The box-shadow property.

boxShadow initial


boxShadow none

For defining shadows look at boxShadowsMany.

boxShadowMany : List BoxShadowConfig -> Style

Sets box-shadow.

If you give an empty list, the value will be none. This is to make it impossible for it to have no values in the output.

boxShadowMany [] -- "box-shadow: none"


-- "box-shadow: 3px 5px #aabbcc"
button
    [ css
        [ boxShadowMany
            [ { defaultBoxShadow
                | offsetX = px 3
                , offsetY = px 5
                , color = Just (hex "#aabbcc")
              }
            ]
        ]
    ]
    [ text "Zap!" ]
defaultBoxShadow : BoxShadowConfig

Default boxShadow configuration.

It is equivalent to the following CSS:

box-shadow: 0 0;
type alias TextShadowConfig =
{ offsetX : Value (LengthSupported { pct : Supported })
, offsetY : Value (LengthSupported { pct : Supported })
, blurRadius :
Maybe (Value (LengthSupported { pct : Supported }))
, color : Maybe (Value Color)
}

Configuration for textShadow.

textShadow : BaseValue { none : Supported } -> Style

The text-shadow property.

boxShadow initial


boxShadow none

This 1-argument variant is for single keyword values only. For defining shadows look at textShadowMany.

textShadowMany : List TextShadowConfig -> Style

Sets text-shadow.

This multi-argument variant is for defining shadows only. For single keyword values, look at textShadow.

textShadowMany [] -- "text-shadow: unset"


-- "text-shadow: 3px 5px #aabbcc"
span
    [ css
        [ textShadow
            [ { defaultTextShadow
                | offsetX = px 3
                , offsetY = px 5
                , color = Just (hex "#aabbcc")
              }
            ]
        ]
    ]
    [ text "Zap!" ]
defaultTextShadow : TextShadowConfig

Default textShadow configuration.

It is equivalent to the following CSS:

text-shadow: 0 0;

Transformation

type alias TransformFunction =
TransformFunctionSupported {}

A type alias used to accept a transform-function.

type alias TransformFunctionSupported supported =
{ supported
| matrix : Supported
, matrix3d : Supported
, translate : Supported
, translate2 : Supported
, translateX : Supported
, translateY : Supported
, translateZ : Supported
, translate3d : Supported
, scale_ : Supported
, scale2_ : Supported
, scaleX : Supported
, scaleY : Supported
, scaleZ : Supported
, scale3d : Supported
, skew : Supported
, skew2 : Supported
, skewX : Supported
, skewY : Supported
, rotate_ : Supported
, rotateX : Supported
, rotateY : Supported
, rotateZ : Supported
, rotate3d : Supported
, perspective_ : Supported
}

A type alias used to accept a transform-function among other values.

BaseValue (TransformFunctionSupported { none : Supported })
-> Style

The transform property.

transform <| matrix 1.0 2.0 3.0 4.0 5.0 6.0
transform <| matrix3d 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
transform <| translate (px 12)
transform <| translate2 (px 12) (pct 50)
transform <| translateX (em 2)
transform <| translateY (inch 3)
transform <| translateZ (px 2)
transform <| translate3d (px 12) (pct 50) (em 3)
transform <| scale_ 2
transform <| scale2_ 2 0.5
transform <| scaleX 2
transform <| scaleY 0.5
transform <| scaleZ 0.3
transform <| scale3d 2.5 1.2 0.3
transform <| skew (deg 20)
transform <| skew2 (deg 30)
transform <| skewX (deg 30)
transform <| skewY (rad 1.07)
transform <| rotate_ (turn 0.5)
transform <| rotateX (deg 10)
transform <| rotateY (deg 10)
transform <| rotateZ (deg 10)
transform <| rotate3d 1 2.0 3.0 (deg 10)
transform <| perspective_ (px 17)
transformMany : List (Value TransformFunction) -> Style

Sets transform with a series of transform-functions.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

transformMany [ translate (px 12), scale_ 2, skew (deg 20) ]


transformMany [] -- transform: unset;
BaseValue
(LengthSupported
{ top_ : Supported
, center : Supported
, bottom_ : Supported
, left_ : Supported
, right_ : Supported
, pct : Supported
}
)
-> Style

Sets transform-origin.

This is the 1-argument variant, which lets you set certain keywords and single lengths or percentages.

transformOrigin top_


transformOrigin center


transformOrigin bottom


transformOrigin (px 30)


transformOrigin (pct 50)


transformOrigin2 left_ top_


transformOrigin2 right_ center 


transformOrigin2 right_ bottom_


transformOrigin2 (pct 50) (pct 50)


transformOrigin3 (pct 10) (px 2) (px 10)


transformOrigin3 left_ (px 5) (px -4)


transformOrigin3 right_ bottom_ (rem 2)
(LengthSupported
{ left_ : Supported
, right_ : Supported
, center : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ top_ : Supported
, bottom_ : Supported
, center : Supported
, pct : Supported
}
)
-> Style

Sets transform-origin.

This 2-argument variant lets you set x and y offsets in a single declaration.

transformOrigin2 left_ top_


transformOrigin2 right_ center 


transformOrigin2 right_ bottom_


transformOrigin2 (pct 50) (pct 50)
(LengthSupported
{ left_ : Supported
, right_ : Supported
, center : Supported
, pct : Supported
}
)
-> Value
(LengthSupported
{ top_ : Supported
, bottom_ : Supported
, center : Supported
, pct : Supported
}
)
-> Value Length
-> Style

Sets transform-origin.

This 3-argument variant lets you set x, y and z offsets in a single declaration.

transformOrigin3 (pct 10) (px 2) (px 10)


transformOrigin3 left_ (px 5) (px -4)


transformOrigin3 right_ bottom_ (rem 2)
BaseValue
{ contentBox : Supported
, borderBox : Supported
, fillBox : Supported
, strokeBox : Supported
, viewBox : Supported
}
-> Style

Sets the transform-box property.

transformBox contentBox


transformBox fillBox
BaseValue
{ flat : Supported
, preserve3d : Supported
}
-> Style

Sets the transform-style property.

transformStyle flat


transformStyle inherit
flat : Value { provides | flat : Supported }

The flat value used in the transformStyle property.

transformStyle flat
preserve3d : Value { provides | preserve3d : Supported }

The preserve-3d value used in the transformStyle property.

transformStyle preserve3d

Matrix transformation

Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Value { provides | matrix : Supported }

Sets matrix value for usage with transform. The first four numeric values describe the linear transformation. The last two numeric values describe the translation to apply.

    transform (matrix 1 2 -1 1 80 80)
Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Float
-> Value { provides | matrix3d : Supported }

Sets matrix3d value for usage with transform. Every fourth number describes the translation to apply. All other describe the linear tranformation.

    transform (matrix3d 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1)

Scaling (resizing)

BaseValue
{ num : Supported
, none : Supported
}
-> Style

The scale property.

This one-argument version lets you set a global value, none or a num that will scale the element by both X and Y axes (equivalent to scale_).

scale none


scale (num 3)


scale2 (num 1) (num 3)


scale3 (num 1) (num 3) (num 4)
scale2 : Value { num : Supported } -> Value { num : Supported } -> Style

The scale property.

This two-argument version lets you specify scaling in X and Y axes (equivalent to scale2_).

scale2 (num 1) (num 3)
Value { num : Supported }
-> Value { num : Supported }
-> Value { num : Supported }
-> Style

The scale property.

This three-argument version lets you specify scaling in X, Y and Z axes (equivalent to scale3d).

scale3 (num 1) (num 3) (num 4)
scale_ : Float -> Value { provides | scale_ : Supported }

Sets scale value for usage with transform.

transform (scale_ 0.7)

This is called scale_ instead of scale because scale is already a property function.

scale2_ : Float -> Float -> Value { provides | scale2_ : Supported }

Sets scale value for usage with transform.

transform (scale2_ 0.7 0.7)

This is called scale2_ instead of scale2 because scale2 is already a property function.

scaleX : Float -> Value { provides | scaleX : Supported }

Sets scaleX value for usage with transform.

transform (scaleX 0.7)
scaleY : Float -> Value { provides | scaleY : Supported }

Sets scaleY value for usage with transform.

transform (scaleY 0.7)
scaleZ : Float -> Value { provides | scaleZ : Supported }

Sets scaleZ value for usage with transform.

transform (scaleZ 0.7)
scale3d : Float -> Float -> Float -> Value { provides | scale3d : Supported }

Sets scale3d value for usage with transform.

transform (scale3d 2 0.7 0.2)

Rotation

rotate : BaseValue (AngleSupported { none : Supported }) -> Style

The rotate property.

This one-argument version lets you set a global variable, none, or angle.

rotate none


rotate inherit


rotate (deg 60)


rotate2 x (deg 50)


rotate2 y (deg 100)


rotate4 1 1 1 (deg 90)
{ x : Supported
, y : Supported
, z : Supported
}
-> Value Angle
-> Style

The rotate property.

This 2-argument version lets you set an axis, then an angle value.

rotate2 x (deg 50)


rotate2 y (deg 100)
rotate4 : Float -> Float -> Float -> Value Angle -> Style

The rotate property.

This 4-argument version lets you set a 3D vector, than an angle value.

rotate4 1 1 1 (deg 90)
rotate_ : Value Angle -> Value { provides | rotate_ : Supported }

Sets rotate value for usage with transform.

transform (rotate_ (deg 30))

This is called rotate_ instead of rotate because rotate is already a property function.

rotateX : Value Angle -> Value { provides | rotateX : Supported }

Sets rotateX value for usage with transform.

transform (rotateX (deg 30))
rotateY : Value Angle -> Value { provides | rotateY : Supported }

Sets rotateY value for usage with transform.

transform (rotateY (deg 30))
rotateZ : Value Angle -> Value { provides | rotateZ : Supported }

Sets rotateZ value for usage with transform.

transform (rotateZ (deg 30))
Float
-> Float
-> Float
-> Value Angle
-> Value { provides | rotate3d : Supported }

Sets rotate3d value for usage with transform.

transform (rotate3d 0 1 0 (deg 30))

Skewing (distortion)

skew : Value Angle -> Value { provides | skew : Supported }

Sets skew value for usage with transform.

transform (skew (deg 30))
Value Angle
-> Value Angle
-> Value { provides | skew2 : Supported }

Sets skew value for usage with transform.

transform (skew2 (deg 30) (deg 10))
skewX : Value Angle -> Value { provides | skewX : Supported }

Sets skewX value for usage with transform.

transform (skewX (deg 30))
skewY : Value Angle -> Value { provides | skewY : Supported }

Sets skewY value for usage with transform.

transform (skewY (deg 30))

Translation (moving)

Value (LengthSupported { pct : Supported })
-> Value { provides | translate : Supported }

Sets translate value for usage with transform.

transform (translate (px 10))
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value { provides | translate2 : Supported }

Sets translate value for usage with transform.

transform (translate (px 10) (px 20))
Value (LengthSupported { pct : Supported })
-> Value { provides | translateX : Supported }

Sets translateX value for usage with transform.

transform (translateX (px 10))
Value (LengthSupported { pct : Supported })
-> Value { provides | translateY : Supported }

Sets translateY value for usage with transform.

transform (translateY (px 10))
translateZ : Value Length -> Value { provides | translateZ : Supported }

Sets translateZ value for usage with transform.

transform (translateZ (px 10))
Value (LengthSupported { pct : Supported })
-> Value (LengthSupported { pct : Supported })
-> Value Length
-> Value { provides | translate3d : Supported }

Sets translate3d value for usage with transform.

transform (translate3d (px 12) (pct 50) (em 3))

Perspective

perspective : BaseValue (LengthSupported { none : Supported }) -> Style

The perspective property.

Negative values are not supported and any value smaller than 1px is clamped to 1px.

perspective none


perspective (px 100)


perspective (rem 50)
BaseValue
(LengthSupported
{ pct : Supported
, left_ : Supported
, center : Supported
, right_ : Supported
, top_ : Supported
, bottom_ : Supported
}
)
-> Style

The perspective-origin property.

This one-argument version either supports a global value or the x-position.

perspectiveOrigin inherit


perspectiveOrigin left_


perspectiveOrigin (pct 50)


perspectiveOrigin2 left_ center


perspectiveOrigin2 (rem 50) (pct 20)
(LengthSupported
{ pct : Supported
, left_ : Supported
, center : Supported
, right_ : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, top_ : Supported
, center : Supported
, bottom_ : Supported
}
)
-> Style

The perspective-origin property.

This two-argument version takes an X position and then a Y position.

pperspectiveOrigin2 left_ center


perspectiveOrigin2 (rem 50) (pct 20)
perspective_ : Value Length -> Value { provides | perspective_ : Supported }

Sets perspective value for usage with transform.

transform (perspective_ (px 17))

The value is called perspective_ instead of perspective because perspective is already a property function.

3D Rendering options

BaseValue
{ visible : Supported
, hidden : Supported
}
-> Style

Sets backface-visibility

backfaceVisibility visible


backfaceVisibility hidden

Animation

BaseValue
{ none : Supported
, string : Supported
, customIdent : Supported
}
-> Style

The animation-name property.

animationName (customIdent "pulse") []
List
{ none : Supported
, string : Supported
, customIdent : Supported
}
)
-> Style

The animation-name property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

animationNameMany [customIdent "pulse"]


animationNameMany [] -- animation-name: unset;
animationDuration : BaseValue Time -> Style

The animation-duration property.

animationDuration (s 1)
animationDurationMany : List (Value Time) -> Style

The animation-duration property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

animationDurationMany [ s 1, ms 300, s 4.5 ]


animationDurationMany [] -- animation-duration: unset;
animationTimingFunction : BaseValue EasingFunction -> Style

The animation-timing-function property.

animationTimingFunction linear
animationTimingFunctionMany : List (Value EasingFunction) -> Style

The animation-timing-function property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

animationTimingFunctionMany linear [ cubicBezier 0.42 0 0.38 1, stepEnd ]


animationTimingFunctionMany [] -- animation-timing-function: unset;
BaseValue
{ infinite : Supported
, num : Supported
, zero : Supported
, calc : Supported
}
-> Style

The animation-iteration-count property.

animationIterationCount (num 3.5)


animationIterationCount infinite
List
{ infinite : Supported
, num : Supported
, zero : Supported
, calc : Supported
}
)
-> Style

The animation-iteration-count property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

animationIterationCountMany [num 3.5, infinte, zero ]


animationIterationCountMany [] -- animation-iteration-count: unset;
BaseValue
{ normal : Supported
, reverse : Supported
, alternate : Supported
, alternateReverse : Supported
}
-> Style

The animation-direction property.

animationDirection reverse
List
{ normal : Supported
, reverse : Supported
, alternate : Supported
, alternateReverse : Supported
}
)
-> Style

The animation-direction property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

animationDirectionMany [ reverse, normal, alternate, alternateReverse ]


animationDirectionMany [] -- animation-direction: unset;
BaseValue
{ running : Supported
, paused : Supported
}
-> Style

The animation-play-state property.

animationPlayState running
List
{ running : Supported
, paused : Supported
}
)
-> Style

The animation-play-state property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

animationPlayStateMany [ running, paused ]


animationPlayStateMany [] -- animation-play-state: unset;
animationDelay : BaseValue Time -> Style

The animation-delay property.

animationDelay (s 1)
animationDelayMany : List (Value Time) -> Style

The animation-delay property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

animationDelayMany (s 1) [ ms 300, s 4.5 ]


animationDelayMany [] -- animation-delay: unset;
BaseValue
{ none : Supported
, forwards : Supported
, backwards : Supported
, both : Supported
}
-> Style

The animation-fill-mode property.

animationFillMode forwards
List
{ none : Supported
, forwards : Supported
, backwards : Supported
, both : Supported
}
)
-> Style

The animation-fill-mode property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

animationFillModeMany [ forwards, none, both, backwards ]


animationFillModeMany [] -- animation-fill-mode: unset;
type alias EasingFunction =
EasingFunctionSupported {}

A type alias used to accept an easing-function.

type alias EasingFunctionSupported supported =
{ supported
| linear : Supported
, ease : Supported
, easeIn : Supported
, easeOut : Supported
, easeInOut : Supported
, cubicBezier : Supported
, stepStart : Supported
, stepEnd : Supported
, steps : Supported
}

A type alias used to accept an easing-function among other values.

linear : Value { provides | linear : Supported }

The linear value used for properties such as animationTimingFunction.

animationTimingFunction linear
ease : Value { provides | ease : Supported }

The ease value used for properties such as animationTimingFunction.

animationTimingFunction ease
easeIn : Value { provides | easeIn : Supported }

The ease-in value used for properties such as animationTimingFunction.

animationTimingFunction easeIn
easeOut : Value { provides | easeOut : Supported }

The ease-out value used for properties such as animationTimingFunction.

animationTimingFunction easeOut
easeInOut : Value { provides | easeInOut : Supported }

The ease-in-out value used for properties such as animationTimingFunction.

animationTimingFunction easeInOut
Float
-> Float
-> Float
-> Float
-> Value { provides | cubicBezier : Supported }

Produces the cubic-bezier() value used for properties such as animationTimingFunction

animationTimingFunction (cubicBezier 0.2 0 0.5 1)
stepStart : Value { provides | stepStart : Supported }

The step-start value used for properties such as animationTimingFunction.

animationTimingFunction stepStart
stepEnd : Value { provides | stepEnd : Supported }

The step-end value used for properties such as animationTimingFunction.

animationTimingFunction stepEnd
steps : Int -> Value { provides | steps : Supported }

Produces the steps() value used for properties such as animationTimingFunction.

animationTimingFunction (steps 3)
Int
-> Value
{ jumpStart : Supported
, jumpEnd : Supported
, jumpNone : Supported
, jumpBoth : Supported
, start : Supported
, end : Supported
}
-> Value { provides | steps : Supported }

Produces the steps() value used for properties such as animationTimingFunction.

animationTimingFunction (steps2 3 jumpStart)
jumpStart : Value { provides | jumpStart : Supported }

The jump-start value used for functions like step2

steps2 3 jumpStart
jumpEnd : Value { provides | jumpEnd : Supported }

The jump-end value used for functions like step2

steps2 3 jumpEnd
jumpNone : Value { provides | jumpNone : Supported }

The jump-none value used for functions like step2

steps2 3 jumpNone
jumpBoth : Value { provides | jumpBoth : Supported }

The jump-both value used for functions like step2

steps2 3 jumpBoth
infinite : Value { provides | infinite : Supported }

The infinite value used for functions like animationIterationCount

animationIterationCount infinite
reverse : Value { provides | reverse : Supported }

The reverse value used for functions like animationDirection

animationDirection reverse
alternate : Value { provides | alternate : Supported }

The alternate value used for functions like animationDirection

animationDirection alternate
alternateReverse : Value { provides | alternateReverse : Supported }

The alternate-reverse value used for functions like animationDirection

animationDirection alternateReverse
running : Value { provides | running : Supported }

The running value used for functions like animationPlayState

animationPlayState running
paused : Value { provides | paused : Supported }

The paused value used for functions like animationPlayState

animationPlayState paused
forwards : Value { provides | forwards : Supported }

The forwards value used for functions like animationFillMode

animationFillMode forwards
backwards : Value { provides | backwards : Supported }

The backwards value used for functions like animationFillMode

animationFillMode backwards

Visual stuff

BaseValue
{ num : Supported
, zero : Supported
, calc : Supported
, pct : Supported
}
-> Style

Sets opacity

opacity (num 0.5)


opacity (num 1.0)


opacity zero
BaseValue
{ visible : Supported
, hidden : Supported
, collapse : Supported
}
-> Style

Sets visibility

  visibility visible
  visibility hidden
  visibility collapse
mixBlendMode : BaseValue BlendMode -> Style

Sets mix-blend-mode

mixBlendMode multiply


mixBlendMode saturation
BaseValue
{ auto : Supported
, crispEdges : Supported
, pixelated : Supported
}
-> Style

Sets image-rendering

imageRendering auto


imageRendering crispEdges


imageRendering pixelated
crispEdges : Value { provides | crispEdges : Supported }

Sets crisp-edges value for usage with imageRendering.

imageRendering crispEdges
pixelated : Value { provides | pixelated : Supported }

Sets pixelated value for usage with imageRendering.

imageRendering pixelated
BaseValue
(BasicShapeSupported
{ none : Supported
, url : Supported
, marginBox : Supported
, borderBox : Supported
, paddingBox : Supported
, contentBox : Supported
, fillBox : Supported
, strokeBox : Supported
, viewBox : Supported
}
)
-> Style

The 1-argument variant of the clip-path property.

clipPath marginBox


clipPath inherit


clipPath (circle (pct 2))


clipPath (url "test-img.svg")


clipPath2 marginBox (circleAt2 farthestSide left top)
{ marginBox : Supported
, borderBox : Supported
, paddingBox : Supported
, contentBox : Supported
, fillBox : Supported
, strokeBox : Supported
, viewBox : Supported
}
-> Value BasicShape
-> Style

The 2-argument variant of the clip-path property.

clipPath2 marginBox (circleAt2 farthestSide left top)

Masks

BaseValue
{ luminance : Supported
, alpha : Supported
}
-> Style

Sets the mask-border-mode property.

maskBorderMode inherit


maskBorderMode luminance
BaseValue
{ stretch : Supported
, repeat : Supported
, round_ : Supported
, space : Supported
}
-> Style

Sets the 1-argument variant of the mask-border-repeat property.

maskBorderRepeat stretch


maskBorderRepeat revert


maskBorderRepeat2 stretch repeat
{ stretch : Supported
, repeat : Supported
, round_ : Supported
, space : Supported
}
-> Value
{ stretch : Supported
, repeat : Supported
, round_ : Supported
, space : Supported
}
-> Style

Sets the 2-argument variant of the mask-border-repeat property.

maskBorderRepeat2 stretch repeat
maskBorderOutset : BaseValue (LengthSupported { num : Supported }) -> Style

Sets the 1-argument variant of the mask-border-outset property.

maskBorderOutset revert


maskBorderOutset (num 2.5)


maskBorderOutset (px 30)


--             top+bottom | left+right
maskBorderOutset2 (px 30) (px 10)


--               top | left+right | bottom
maskBorderOutset3 (px 12) (px 16) (px 4)


--                  top | right | bottom | left
maskBorderOutset4 (rem 2) (rem 1) (rem 3) (rem 4)
Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Style

Sets the 2-argument variant of the mask-border-outset property.

--             top+bottom | left+right
maskBorderOutset2 (px 30) (px 10)
Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Style

Sets the 3-argument variant of the mask-border-outset property.

--               top | left+right | bottom
maskBorderOutset3 (px 12) (px 16) (px 4)
Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Value (LengthSupported { num : Supported })
-> Style

Sets the 4-argument variant of the mask-border-outset property.

--                  top | right | bottom | left
maskBorderOutset4 (rem 2) (rem 1) (rem 3) (rem 4)
BaseValue
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Style

Sets the 1-argument variant of the mask-border-slice property.

maskBorderSlice initial


maskBorderSlice (num 2.5)


maskBorderSlice (rem 3)


--           top+bottom | left+right
maskBorderSlice2 (num 30) (pct 10)


--              top | left+right | bottom
maskBorderSlice3 (px 12) (num 2) fill_


--                 top | right | bottom | left
maskBorderSlice4 (rem 2) (rem 1) fill_ (rem 4)
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Value
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Style

Sets the 2-argument variant of the mask-border-slice property.

--           top+bottom | left+right
maskBorderSlice2 (num 30) (pct 10)
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Value
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Value
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Style

Sets the 3-argument variant of the mask-border-slice property.

--              top | left+right | bottom
maskBorderSlice3 (px 12) (num 2) fill_
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Value
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Value
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Value
{ num : Supported
, pct : Supported
, fill_ : Supported
}
-> Style

Sets the 4-argument variant of the mask-border-slice property.

--                 top | right | bottom | left
maskBorderSlice4 (rem 2) (rem 1) fill_ (rem 4)
BaseValue
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Style

Sets the 1-argument variant of the mask-border-width property.

maskBorderWidth initial


maskBorderWidth auto


maskBorderWidth (rem 3)


--           top+bottom | left+right
maskBorderWidth2 (num 30) (pct 10)


--              top | left+right | bottom
maskBorderWidth3 (px 12) auto (px 20)


--                 top | right | bottom | left
maskBorderWidth4 (rem 2) (rem 1) auto (rem 4)
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Style

Sets the 2-argument variant of the mask-border-width property.

--           top+bottom | left+right
maskBorderWidth2 (num 30) (pct 10)
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Style

Sets the 3-argument variant of the mask-border-width property.

--              top | left+right | bottom
maskBorderWidth3 (px 12) auto (px 20)
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Value
(LengthSupported
{ auto : Supported
, pct : Supported
, num : Supported
}
)
-> Style

Sets the 4-argument variant of the mask-border-width property.

--                 top | right | bottom | left
maskBorderWidth4 (rem 2) (rem 1) auto (rem 4)
BaseValue
{ contentBox : Supported
, paddingBox : Supported
, borderBox : Supported
, marginBox : Supported
, fillBox : Supported
, strokeBox : Supported
, viewBox : Supported
, noClip : Supported
}
-> Style

The 1-argument variant of the mask-clip property.

This does not support non-standard keyword values such as border.

maskClip contentBox


maskClip revert


maskClipMany [contentBox, marginBox, noClip]
List
{ contentBox : Supported
, paddingBox : Supported
, borderBox : Supported
, marginBox : Supported
, fillBox : Supported
, strokeBox : Supported
, viewBox : Supported
, noClip : Supported
}
)
-> Style

The multi-argument variant of the mask-clip property.

This does not support non-standard keyword values such as border.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

maskClipMany [contentBox, marginBox, noClip]


maskClipMany [] -- mask-clip: unset;
BaseValue
{ add : Supported
, subtract : Supported
, intersect : Supported
, exclude : Supported
}
-> Style

The mask-composite property.

maskComposite add


maskComposite revert
BaseValue
{ alpha : Supported
, luminance : Supported
, matchSource : Supported
}
-> Style

The 1-argument variant of the mask-mode property.

maskMode inherit


maskMode alpha


maskModeMany [alpha, luminance, alpha, matchSource]
List
{ alpha : Supported
, luminance : Supported
, matchSource : Supported
}
)
-> Style

The multi-argument variant of the mask-mode property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

maskModeMany [alpha, luminance, alpha, matchSource]


maskModeMany [] -- mask-mode: unset;
BaseValue
{ contentBox : Supported
, paddingBox : Supported
, borderBox : Supported
, marginBox : Supported
}
-> Style

The 1-argument variant of the mask-origin property.

maskOrigin inherit


maskOrigin contentBox


maskOriginMany [paddingBox, borderBox]
List
{ contentBox : Supported
, paddingBox : Supported
, borderBox : Supported
, marginBox : Supported
}
)
-> Style

The multi-argument variant of the mask-origin property.

If you give an empty list, the value will be unset. This is to make it impossible for it to have no values in the output.

maskOriginMany [paddingBox, borderBox]


maskOriginMany [] -- mask-origin: unset;
BaseValue
{ top_ : Supported
, bottom_ : Supported
, left_ : Supported
, right_ : Supported
, center : Supported
}
-> Style

The 1-argument variant of the mask-position property.

maskPosition top_


maskPosition inherit
BaseValue
{ repeat : Supported
, repeatX : Supported
, repeatY : Supported
, space : Supported
, round_ : Supported
, noRepeat : Supported
}
-> Style

The 1-argument variant of the mask-repeat property.

maskRepeat revert


maskRepeat repeatX


maskRepeat Css.round


maskRepeat2 repeat space
{ repeat : Supported
, space : Supported
, round_ : Supported
, noRepeat : Supported
}
-> Value
{ repeat : Supported
, space : Supported
, round_ : Supported
, noRepeat : Supported
}
-> Style

The 2-argument variant of the mask-repeat property.

maskRepeat2 repeat space
BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
, cover : Supported
, contain_ : Supported
}
)
-> Style

The 1-argument variant of the mask-size property.

maskSize auto


maskSize (pct 20)


maskSize (rem 200)


maskSize2 auto (pct 10)
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

The 2-argument variant of the mask-size property.

maskSize auto


maskSize (pct 20)


maskSize (rem 200)


maskSize2 auto (pct 10)
BaseValue
{ luminance : Supported
, alpha : Supported
}
-> Style

Sets the mask-type property.

maskType inherit


maskType luminance
noClip : Value { provides | noClip : Supported }

Sets no-clip value for usage with maskClip.

maskClip noClip
add : Value { provides | add : Supported }

Sets add value for usage with maskComposite.

maskComposite add
subtract : Value { provides | subtract : Supported }

Sets subtract value for usage with maskComposite.

maskComposite subtract
intersect : Value { provides | intersect : Supported }

Sets intersect value for usage with maskComposite.

maskComposite intersect
exclude : Value { provides | exclude : Supported }

Sets exclude value for usage with maskComposite.

maskComposite exclude
alpha : Value { provides | alpha : Supported }

Sets alpha value for usage with maskMode, maskType and maskBorderMode.

maskMode alpha


maskType alpha


maskBorderMode alpha
luminance : Value { provides | luminance : Supported }

Sets luminance value for usage with maskMode, maskType and maskBorderMode.

maskMode luminance


maskType luminance


maskBorderMode luminance
matchSource : Value { provides | matchSource : Supported }

Sets match-source value for usage with maskMode.

maskMode matchSource

Filters

BaseValue
(FilterFunctionSupported
{ url : Supported
, none : Supported
}
)
-> Style

The filter property.

This single-argument version lets you use global value keywords, as well as none, URLs to SVG filters and single filter functions.

If you want to stack filter functions, use filterMany.

filter <| blur (px 6)


filter <| grayscale (pct 60)


filter <| url "thing.svg#filter1"


filter none


filter inherit


filterMany [] -- unset


filterMany [ invert (pct 70), sepia(pct 50) ]
List (Value (FilterFunctionSupported { url : Supported }))
-> Style

The filter property.

This multi-argument version lets you stack multiple filter functions and URLs to SVG filters. An empty list will create an unset value.

filterMany [] -- unset


filterMany [ invert (pct 70), sepia(pct 50) ]
BaseValue
(FilterFunctionSupported
{ url : Supported
, none : Supported
}
)
-> Style

The backdrop-filter property.

This single-argument version lets you use global value keywords, as well as none, URLs to SVG filters and single filter functions.

If you want to stack filter functions, use backdropFilterMany.

backdropFilter <| blur (px 6)


backdropFilter <| grayscale (pct 60)


backdropFilter <| url "thing.svg#filter1"


backdropFilter none


backdropFilter inherit


backdropFilterMany [] -- unset


backdropFilterMany [ invert (pct 70), sepia(pct 50) ]
List (Value (FilterFunctionSupported { url : Supported }))
-> Style

The backdrop-filter property.

This multi-argument version lets you stack multiple filter functions and URLs to SVG filters. An empty list will create an unset value.

backdropFilterMany [] -- unset


backdropFilterMany [ invert (pct 70), sepia(pct 50) ]

Rendering

BaseValue
{ normal : Supported
, stroke : Supported
, markers : Supported
}
-> Style

The paint-order property.

This one-argument version indicates which parts of text and shape graphics are painted first, followed by the other two in their relative default order.

paintOrder normal -- normal paint order.


paintOrder2 fill_ stroke -- fill, stroke, then markers.


paintOrder3 markers stroke fill_ -- markers, stroke, then fill.
{ fill_ : Supported
, stroke : Supported
, markers : Supported
}
-> Value
{ fill_ : Supported
, stroke : Supported
, markers : Supported
}
-> Style

The paint-order property.

This two-argument version indicates which parts of text and shape graphics are painted first, followed by the other remaining one.

paintOrder2 fill_ stroke -- fill, stroke, then markers.
{ fill_ : Supported
, stroke : Supported
, markers : Supported
}
-> Value
{ fill_ : Supported
, stroke : Supported
, markers : Supported
}
-> Value
{ fill_ : Supported
, stroke : Supported
, markers : Supported
}
-> Style

The paint-order property.

This three-argument version explicitly indicates in which order should all the parts of text and shape graphics be painted.

paintOrder3 markers stroke fill_ -- markers, stroke, then fill.
markers : Value { provides | markers : Supported }

Provides the markers value for paintOrder.

paintOrder markers

Using a printer

bleed : BaseValue (LengthSupported { auto : Supported }) -> Style

Sets bleed

bleed auto


bleed (pt 10)

SVG attributes that can be used as CSS presentation properties.

fill : BaseValue (ColorSupported { url : Supported }) -> Style

Sets fill Note: fill also accepts the patterns of SVG shapes that are defined inside of a defs element.

fill (hex "#60b5cc")


fill (rgb 96 181 204)


fill (rgba 96 181 204 0.5)


fill (url "#pattern")
BaseValue
(LengthSupported
{ num : Supported
, pct : Supported
}
)
-> Style

Sets stroke-dasharray

strokeDasharray (num 2)


strokeDasharray (num 2.5)


strokeDasharray (em 2)


strokeDasharray (pct 15)
BaseValue
{ zero : Supported
, calc : Supported
, num : Supported
, pct : Supported
}
-> Style

Sets stroke-dashoffset

strokeDashoffset zero


strokeDashoffset (num 100)


strokeDashoffset (pct 25)
BaseValue
(LengthSupported
{ num : Supported
, pct : Supported
}
)
-> Style

Sets stroke-width

strokeWidth zero


strokeWidth (px 2)


strokeWidth (em 2)


strokeWidth (num 2)


strokeWidth (num 2.5)


strokeWidth (pct 15)
BaseValue
{ center : Supported
, inset_ : Supported
, outset : Supported
}
-> Style

Sets stroke-align

Note: This function accepts inset_ rather than inset because inset is already a property function.

  strokeAlign center
  strokeAlign inset_
  strokeAlign outset
strokeColor : BaseValue Color -> Style

Sets stroke-color

strokeColor (rgb 0 100 44)


strokeColor (hex "#FF9E2C")
BaseValue
{ url : Supported
, none : Supported
}
-> Style

Sets stroke-image

strokeImage (url "#svg-pattern")


strokeImage (url "http://www.example.com/chicken.jpg")
strokeMiterlimit : BaseValue { num : Supported } -> Style

Sets stroke-miterlimit

strokeMiterlimit (num 4)
strokeOpacity : BaseValue { num : Supported } -> Style

Sets stroke-opacity

strokeOpacity (num 0.5)
BaseValue
(LengthSupported
{ pct : Supported
, left_ : Supported
, right_ : Supported
, center : Supported
}
)
-> Style

Sets stroke-position.

strokePosition left_


strokePosition (px 45)

strokePosition sets the horizontal direction. If you need the vertical direction instead, use strokePosition2 like this:

strokePosition zero (px 45)

If you need to set the offsets from the right or bottom, use strokePosition4 like this:

strokePosition4 right_ (px 20) bottom_ (pct 25)
(LengthSupported
{ pct : Supported
, left_ : Supported
, right_ : Supported
, center : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, top_ : Supported
, bottom_ : Supported
, center : Supported
}
)
-> Style

Sets stroke-position.

strokePosition2 left_ top_


strokePosition2 (px 45) (pct 50)

strokePosition2 sets both the horizontal and vertical directions (in that order, same as CSS.) If you need only the horizontal, you can use strokePosition instead:

strokePosition left_

If you need to set the offsets from the right or bottom, use strokePosition4 like this:

strokePosition4 right_ (px 20) bottom_ (pct 25)
{ left_ : Supported
, right_ : Supported
}
-> Value (LengthSupported { pct : Supported })
-> Value
{ top_ : Supported
, bottom_ : Supported
}
-> Value (LengthSupported { pct : Supported })
-> Style

Sets stroke-position.

strokePosition4 right_ (px 20) bottom_ (pct 30)

The four-argument form of stroke-position alternates sides and offets. So the example above would position the stroke-image 20px from the right, and 30% from the bottom.

See also strokePosition for horizontal alignment and strokePosition2 for horizontal (from left) and vertical (from top) alignment.

BaseValue
{ repeat : Supported
, repeatX : Supported
, repeatY : Supported
, space : Supported
, round_ : Supported
, noRepeat : Supported
}
-> Style

Sets stroke-repeat

strokeRepeat repeat


strokeRepeat repeatX

If you need to set horizontal and vertical direction separately, see strokeRepeat2

{ repeat : Supported
, space : Supported
, round_ : Supported
, noRepeat : Supported
}
-> Value
{ repeat : Supported
, space : Supported
, round_ : Supported
, noRepeat : Supported
}
-> Style

Sets stroke-repeat along the horizontal axis, then the vertical axis.

strokeRepeat2 repeat space


strokeRepeat2 space round

If you only need to set one value for both, see strokeRepeat instead.

BaseValue
(LengthSupported
{ pct : Supported
, auto : Supported
, cover : Supported
}
)
-> Style

Sets stroke-size.

strokeSize cover


strokeSize (px 400)

If you give a length value, it will be used for the width. The height will be set proportional to the size of the stroke-image. If you need to set both width and height explicitly, use strokeImage2 instead.

(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Value
(LengthSupported
{ pct : Supported
, auto : Supported
}
)
-> Style

Sets stroke-size.

strokeSize2 (px 300) (px 100)


strokeSize2 auto (px 400)

If you only want to set the width, use strokeImage instead.

BaseValue
(LengthSupported
{ none : Supported
, pct : Supported
, auto : Supported
, cover : Supported
}
)
-> Style

Sets stroke-dash-corner.

strokeDashCorner none


strokeDashCorner (px 10)


strokeDashCorner (em 5)
BaseValue
{ butt : Supported
, square : Supported
, round_ : Supported
}
-> Style

Sets stroke-linecap

strokeLinecap butt


strokeLinecap square


strokeLinecap round
butt : Value { provides | butt : Supported }

A butt value for the strokeLinecap property.

strokeLinecap butt
square : Value { provides | square : Supported }

The square value used by properties such as strokeLinecap, listStyle, and listStyleType.

strokeLinecap square


listStyleType square
BaseValue
{ boundingBox : Supported
, slice : Supported
, clone : Supported
}
-> Style

Sets stroke-break

  strokeBreak boundingBox
  strokeBreak slice
  strokeBreak clone
boundingBox : Value { provides | boundingBox : Supported }

A boundingBox value for the strokeBreak property.

  strokeBreak boundingBox
slice : Value { provides | slice : Supported }

A slice value for the strokeBreak and boxDecorationBreak properties.

  strokeBreak slice


  boxDecorationbreak clone
clone : Value { provides | clone : Supported }

A clone value for the strokeBreak and boxDecorationBreak properties.

  strokeBreak clone


  boxDecorationBreak clone
BaseValue
{ matchParent : Supported
, fillBox : Supported
, strokeBox : Supported
, contentBox : Supported
, paddingBox : Supported
, borderBox : Supported
}
-> Style

Sets stroke-origin

strokeOrign matchParent


strokeOrign fillBox


strokeOrign strokeBox


strokeOrign contentBox


strokeOrign paddingBox


strokeOrign borderBox
BaseValue
{ crop : Supported
, arcs : Supported
, miter : Supported
}
-> Style

Sets stroke-linejoin.

strokeLinejoin crop


strokeLinejoin arcs


strokeLinejoin miter

Note: if you only want to specifiy the rendering of the cap of a corner you need to use strokeLinejoin2 and set it's first value to miter like so: strokeLinejoin2 miter bevel.

{ crop : Supported
, arcs : Supported
, miter : Supported
}
-> Value
{ bevel : Supported
, round_ : Supported
, fallback : Supported
}
-> Style

Sets stroke-linejoin.

strokeLinejoin crop bevel


strokeLinejoin arcs round


strokeLinejoin miter fallback
crop : Value { provides | crop : Supported }

Sets crop value for usage with strokeLinejoin.

strokeLinejoin crop
arcs : Value { provides | arcs : Supported }

Sets arcs value for usage with strokeLinejoin.

strokeLinejoin arcs
miter : Value { provides | miter : Supported }

Sets miter value for usage with strokeLinejoin.

strokeLinejoin miter
bevel : Value { provides | bevel : Supported }

Sets bevel value for usage with strokeLinejoin.

strokeLinejoin miter bevel
BaseValue
{ none : Supported
, stretch : Supported
, compress : Supported
, dashes : Supported
, gaps : Supported
}
-> Style

Sets stroke-dash-justify.

  strokeDashJustify none
  strokeDashJustify stretch
  strokeDashJustify compress
  strokeDashJustify dashes
  strokeDashJustify gaps
compress : Value { provides | compress : Supported }

Sets compress value for usage with strokeDashJustify.

  strokeDashJustify compress
dashes : Value { provides | dashes : Supported }

Sets dashes value for usage with strokeDashJustify.

  strokeDashJustify dashes
gaps : Value { provides | gaps : Supported }

Sets gaps value for usage with strokeDashJustify.

  strokeDashJustify gaps

WebKit stuff that's standardised for legacy support

BaseValue
{ none : Supported
, zero : Supported
, int : Supported
}
-> Style

Sets lineClamp

lineClamp none


lineClamp zero


lineClamp (int 3)