Margin contains everything about margins rendering.
Either Elegant.Helpers.Shared.SizeUnit Elegant.Helpers.Shared.Auto
The Margin
record contains everything about one margin side.
You probably won't use it as is, but instead using Elegant.margin
which automatically generate an empty Margin
record. You
can then use modifiers. I.E.
Elegant.margin
[ Margin.top <| Margin.width (px 30)
, Margin.vertical Margin.auto
]
default : Margin
Generate an empty Margin
record, equal to auto.
You are free to use it as you wish, but it is instanciated automatically by Elegant.margin
.
auto : Margin -> Margin
Set the margin value to auto.
width : Elegant.Helpers.Shared.SizeUnit -> Margin -> Margin
Set the margin value to the desired value.
top : Modifiers.Modifier Margin -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Margin)
Accepts a margin modifier, and modify the top side of the margin.
right : Modifiers.Modifier Margin -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Margin)
Accepts a margin modifier, and modify the right side of the margin.
bottom : Modifiers.Modifier Margin -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Margin)
Accepts a margin modifier, and modify the bottom side of the margin.
left : Modifiers.Modifier Margin -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Margin)
Accepts a margin modifier, and modify the left side of the margin.
horizontal : Modifiers.Modifier Margin -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Margin)
Accepts a margin modifier, and modify both the top and the bottom side of the margin.
vertical : Modifiers.Modifier Margin -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Margin)
Accepts a margin modifier, and modify both the right and left side of the margin.
all : Modifiers.Modifier Margin -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Margin)
Accepts a margin modifier, and modify the four sides of the margin.
marginToCouples : Elegant.Surrounded.Surrounded Margin -> List ( String, String )
Compiles a Surrounded Margin
record to the corresponding CSS list of tuples.
Compiles only styles which are defined, ignoring Nothing
fields.