Elegant.Padding

Padding contains everything about paddings rendering.

Types


type alias Padding =

Elegant.Helpers.Shared.SizeUnit

The Padding record contains everything about one padding side. You probably won't use it as is, but instead using Elegant.padding which automatically generate an empty Padding record. You can then use modifiers. I.E.

Elegant.padding
    [ Padding.top <| Padding.width (px 30)
    , Padding.vertical <| Padding.width (px 40)
    ]

Default padding


default : Elegant.Padding.Padding

Generate an empty Padding record, equal to 0 px. You are free to use it as you wish, but it is instanciated automatically by Elegant.padding.


Padding selectors


top : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Padding.Padding)

Accepts a padding modifier, and modify the top side of the padding.



right : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Padding.Padding)

Accepts a padding modifier, and modify the right side of the padding.



bottom : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Padding.Padding)

Accepts a padding modifier, and modify the bottom side of the padding.



left : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Padding.Padding)

Accepts a padding modifier, and modify the left side of the padding.



horizontal : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Padding.Padding)

Accepts a padding modifier, and modify both the top and the bottom side of the padding.



vertical : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Padding.Padding)

Accepts a padding modifier, and modify both the right and left side of the padding.



all : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Padding.Padding)

Accepts a padding modifier, and modify the four sides of the padding.


Compilation


paddingToCouples : Elegant.Surrounded.Surrounded Elegant.Padding.Padding -> List.List ( String.String, String.String )

Compiles a Surrounded Padding record to the corresponding CSS list of tuples. Compiles only styles which are defined, ignoring Nothing fields.