Elegant.Border

Border contains everything about borders rendering.

Types


type alias Border =

{ color : Maybe.Maybe Color.Color, thickness : Maybe.Maybe Elegant.Helpers.Shared.SizeUnit, style : Maybe.Maybe Elegant.Border.BorderStyle }

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

Elegant.border
    [ Border.solid
    , Border.color Color.blue
    ]


type BorderStyle

[]

Represents the possible styles of the border. It can be Solid or Dashed. They are created by solid and dashed.


Default border


default : Elegant.Border.Border

Generate an empty Border record, with every field equal to Nothing. You are free to use it as you wish, but it is instanciated automatically by Elegant.border.


Border modifiers

Appearance


thickness : Elegant.Helpers.Shared.SizeUnit -> Modifiers.Modifier Elegant.Border.Border

Set the thickness of the border.



none : Modifiers.Modifier Elegant.Border.Border

Set the border to none.



solid : Modifiers.Modifier Elegant.Border.Border

Set the border as solid.



dashed : Modifiers.Modifier Elegant.Border.Border

Set the border as dashed.



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

Set the color of the border.


Sides


top : Modifiers.Modifiers Elegant.Border.Border -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Border.Border)

Accepts a list of border modifiers, and modify the top side of the border.



bottom : Modifiers.Modifiers Elegant.Border.Border -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Border.Border)

Accepts a list of border modifiers, and modify the bottom side of the border.



left : Modifiers.Modifiers Elegant.Border.Border -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Border.Border)

Accepts a list of border modifiers, and modify the left side of the border.



right : Modifiers.Modifiers Elegant.Border.Border -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Border.Border)

Accepts a list of border modifiers, and modify the right side of the border.



horizontal : Modifiers.Modifiers Elegant.Border.Border -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Border.Border)

Accepts a list of border modifiers, and modify both the top and the bottom side of the border.



vertical : Modifiers.Modifiers Elegant.Border.Border -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Border.Border)

Accepts a list of border modifiers, and modify both the right and left side of the border.



all : Modifiers.Modifiers Elegant.Border.Border -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Border.Border)

Accepts a list of border modifiers, and modify the four sides of the border.


Compilation


borderToCouples : Elegant.Surrounded.Surrounded Elegant.Border.Border -> List.List ( String.String, String.String )

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


Sugar


full : Color.Color -> Modifiers.Modifier (Elegant.Surrounded.Surrounded Elegant.Border.Border)

Accepts a color modifier