NoRedInk/style-elements/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Style.Shadow

Shadows

Easy Presets

These can be used directly as properties.

import Color
import Style exposing (..)
import Style.Shadow as Shadow


style MyStyleWithShadow
    [ Shadow.glow Color.red 5
    ]
simple : Property class variation

A nice preset box shadow.

deep : Property class variation

A nice preset box shadow that's deeper than simple.

glow : Color -> Float -> Property class variation

A simple glow by specifying the color and size.

innerGlow : Color -> Float -> Property class variation
textGlow : Color -> Float -> Property class variation

Advanced Shadows

These are for when you want to specify shadows manually. They're meant to be specified in a shadow stack using Style.shadows:

import Color
import Style exposing (..)
import Style.Shadow as Shadow


style MyStyleWithShadow
    [ Style.shadows
        [ Shadow.inset
            { offset = ( 0, 0 )
            , size = 5
            , blur = 2
            , color = Color.blue
            }
        ]
    ]
box :
{ offset : ( Float, Float )
, size : Float
, blur : Float
, color : Color
}
-> Shadow
{ offset : ( Float, Float )
, blur : Float
, color : Color
}
-> Shadow
{ offset : ( Float, Float )
, size : Float
, blur : Float
, color : Color
}
-> Shadow
{ offset : ( Float, Float )
, blur : Float
, color : Color
}
-> Shadow