mdgriffith/style-elements/3.4.1

NOTE: this package is not compatible with Elm 0.19.1

Style.Background

Background Image

image : String -> Property class variation
{ src : String
, position : ( Float, Float )
, repeat : Repeat
}
-> Property class variation
repeatX : Repeat
repeatY : Repeat
repeat : Repeat
space : Repeat
round : Repeat
noRepeat : Repeat

Background Gradient

gradient : Float -> List GradientStep -> Property class variation

Here's an example of creating a background gradient:

Background.gradient 0 [ step Color.blue, step Color.green]

The first number of the gradient angle given in radians, where 0 is pointing up.

step : Color -> GradientStep
percent : Float -> Color -> GradientStep
px : Float -> Color -> GradientStep

Directed Gradients

gradientRight : List GradientStep -> Property class variation
gradientLeft : List GradientStep -> Property class variation
gradientUp : List GradientStep -> Property class variation
gradientDown : List GradientStep -> Property class variation
gradientTopRight : List GradientStep -> Property class variation
gradientBottomRight : List GradientStep -> Property class variation
gradientTopLeft : List GradientStep -> Property class variation
gradientBottomLeft : List GradientStep -> Property class variation