elm-athlete / athlete / Elegant.Outline

Outline contains everything about outline rendering.

Types


type alias Outline =
{ color : Maybe Color
, thickness : Maybe Elegant.Helpers.Shared.SizeUnit
, style : Maybe OutlineStyle 
}

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

Elegant.outline
    [ Outline.solid
    , Elegant.color Color.blue
    ]


type OutlineStyle

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

Default border

default : Outline

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

Border modifiers

Appearance

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

Set the thickness of the outline.

none : Modifiers.Modifier Outline

Set the outline to none.

solid : Modifiers.Modifier Outline

Set the outline as solid.

dashed : Modifiers.Modifier Outline

Set the outline as dashed.

Compilation

outlineToCouples : Outline -> List ( String, String )

Compiles an Outline record to the corresponding CSS list of tuples. Compiles only styles which are defined, ignoring Nothing fields.