elm-athlete/athlete/6.0.1

NOTE: the latest version is 7.0.0

Elegant.Corner

Corner contains everything about corner radius (also called border radius in CSS).

Types

type alias Corner =
{ topLeft : Maybe ( SizeUnit, SizeUnit )
, topRight : Maybe ( SizeUnit, SizeUnit )
, bottomRight : Maybe ( SizeUnit, SizeUnit )
, bottomLeft : Maybe ( SizeUnit, 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 radius

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.

Corner radius style

circular : CornerSet -> SizeUnit -> Modifier Corner

Set the corner(s) to be round (the two angles are the same).

elliptic : CornerSet -> SizeUnit -> SizeUnit -> Modifier Corner

Set the corner(s) to be elliptic, i.e. you can specify two different values for the corner(s).

Corner radius selector

Select the two top corners.

Select the top-right corner.

Select the bottom-right corner.

Select the two bottom corners.

Select the bottom-left corner.

Select the two left corners.

Select the top-left corner.

Select the four corners.

Compilation

cornerToCouples : Corner -> List ( String, String )

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