Corner contains everything about corner radius (also called border radius in CSS).
{ topLeft : Maybe ( Elegant.Helpers.Shared.SizeUnit
, Elegant.Helpers.Shared.SizeUnit )
, topRight : Maybe ( Elegant.Helpers.Shared.SizeUnit
, Elegant.Helpers.Shared.SizeUnit )
, bottomRight : Maybe ( Elegant.Helpers.Shared.SizeUnit
, Elegant.Helpers.Shared.SizeUnit )
, bottomLeft : Maybe ( Elegant.Helpers.Shared.SizeUnit
, Elegant.Helpers.Shared.SizeUnit )
}
The Corner
record contains everything about corner radius (also called border radius in CSS).
You probably won't use it as is, but instead using Elegant.corner
which automatically generate an empty Corner
record. You
can then use modifiers. I.E.
Elegant.corner
[ Corner.circular Corner.all (px 30) ]
Represents the possible selected corner(s).
It can be Top, TopRight, Right, BottomRight, Bottom, BottomLeft, Left, TopLeft or All.
They are created by top
, topRight
, right
, bottomRight
, bottom
, bottomLeft
,
left
, topLeft
or all
.
default : Corner
Generate an empty Corner
record, with every field equal to Nothing.
You are free to use it as you wish, but it is instanciated automatically by Elegant.corner
.
circular : CornerSet -> Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier Corner
Set the corner(s) to be round (the two angles are the same).
elliptic : CornerSet -> Elegant.Helpers.Shared.SizeUnit -> Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier Corner
Set the corner(s) to be elliptic, i.e. you can specify two different values for the corner(s).
top : CornerSet
Select the two top corners.
topRight : CornerSet
Select the top-right corner.
right : CornerSet
Select the two right corners.
bottomRight : CornerSet
Select the bottom-right corner.
bottom : CornerSet
Select the two bottom corners.
bottomLeft : CornerSet
Select the bottom-left corner.
left : CornerSet
Select the two left corners.
topLeft : CornerSet
Select the top-left corner.
all : CornerSet
Select the four corners.
cornerToCouples : Corner -> List ( String, String )
Compiles a Corner
record to the corresponding CSS tuples.
Compiles only parts which are defined, ignoring Nothing
fields.