Elegant.Shadow

Shadow contains everything about boxShadow.

Types


type alias Shadow =

{ inset : Basics.Bool, spreadRadius : Elegant.Helpers.Shared.SizeUnit, blurRadius : Elegant.Helpers.Shared.SizeUnit, color : Color.Color, offset : ( Elegant.Helpers.Shared.SizeUnit, Elegant.Helpers.Shared.SizeUnit ) }

The Shadow record contains everything about box shadow. You probably won't use it as is, but instead using Elegant.boxShadow which automatically generate an empty Shadow record. You can then use modifiers. I.E.

Elegant.boxShadow
    [ Shadow.inset True
    , Shadow.spreadRadius (px 30)
    ]

Default box shadow


default : Elegant.Shadow.Shadow

Generate an empty Shadow record, with every field equal to Nothing except inset (to False) and offset (to ( 0, 0 )). You are free to use it as you wish, but it is instanciated automatically by Elegant.boxShadow.


Shadow modifiers


inset : Basics.Bool -> Modifiers.Modifier Elegant.Shadow.Shadow

Set the inset of the Shadow.



blurRadius : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier Elegant.Shadow.Shadow

Set the blurRadius of the Shadow.



spreadRadius : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier Elegant.Shadow.Shadow

Set the spreadRadius of the Shadow.



offset : ( Elegant.Helpers.Shared.SizeUnit, Elegant.Helpers.Shared.SizeUnit ) -> Modifiers.Modifier Elegant.Shadow.Shadow

Set the offset of the Shadow.



standard : Elegant.Helpers.Shared.SizeUnit -> Color.Color -> ( Elegant.Helpers.Shared.SizeUnit, Elegant.Helpers.Shared.SizeUnit ) -> Modifiers.Modifier Elegant.Shadow.Shadow

Defines a standard boxShadow.



plain : ( Elegant.Helpers.Shared.SizeUnit, Elegant.Helpers.Shared.SizeUnit ) -> Color.Color -> Modifiers.Modifier Elegant.Shadow.Shadow

Creates a plain boxShadow.



blurry : Elegant.Helpers.Shared.SizeUnit -> Elegant.Helpers.Shared.SizeUnit -> Color.Color -> Modifiers.Modifier Elegant.Shadow.Shadow

Creates a plain boxShadow.



color : Color.Color -> Modifiers.Modifier Elegant.Shadow.Shadow

Set the inset of the Shadow.


Compilation


boxShadowToCouple : Elegant.Shadow.Shadow -> ( String.String, String.String )

Compiles a Shadow record to the corresponding CSS tuple. Compiles only parts which are defined, ignoring Nothing fields.