@@ -27,41 +27,43 @@ module Element exposing
2727{-|
2828
2929
30−## Basic Elements
30+# Basic Elements
3131
3232@docs Element, none, text, el
3333
3434
35−## Rows and Columns
35+# Rows and Columns
3636
37−Rows and columns are the most common layouts.
37+When we want more than one child on an element, we want to be _specific_ about how they will be layed out.
38+
39+So, the common ways to do that would be `row` and `column`.
3840
3941@docs row, wrappedRow, column
4042
4143
42−## Text Layout
44+# Text Layout
4345
44−Text needs it's own layout primitives.
46+Text layout needs some specific considerations.
4547
4648@docs paragraph, textColumn
4749
4850
49−## Data Table
51+# Data Table
5052
5153@docs Column, table, IndexedColumn, indexedTable
5254
5355
54−## Size
56+# Size
5557
5658@docs Attribute, width, height, Length, px, shrink, fill, fillPortion, maximum, minimum
5759
5860
59−## Debugging
61+# Debugging
6062
6163@docs explain
6264
6365
64−## Padding and Spacing
66+# Padding and Spacing
6567
6668There's no concept of margin in `style-elements`, instead we have padding and spacing.
6769
@@ -79,12 +81,15 @@ Here's what we can expect:
7981
8082
8183
84+**Note** `spacing` set on a `paragraph`, will set the pixel spacing between lines.
85+
86+
8287@docs padding, paddingXY, paddingEach
8388
8489@docs spacing, spacingXY, spaceEvenly
8590
8691
87−## Alignment
92+# Alignment
8893
8994Alignment can be used to align an `Element` within another `Element`.
9095
@@ -313,19 +318,18 @@ toRgb (Internal.Rgba r g b a) =
313318 }
314319
315320
316−{-| The basic building block of your layout. Here we create a
317−
318− import Element
321+{-| The basic building block of your layout.
319322
320− view =
321− Element.el [] (Element.text "Hello!")
323+ howdy : Element msg
324+ howdy =
325+ Element.el [] (Element.text "Howdy!")
322326
323327-}
324328type alias Element msg =
325329 Internal.Element msg
326330
327331
328−{-| Standard attribute which cannot be a decoration.
332+{-| An attribute that can be attached to an `Element`
329333-}
330334type alias Attribute msg =
331335 Internal.Attribute () msg
@@ -534,7 +538,7 @@ forceHover =
534538 Internal.HoverOption Internal.ForceHover
535539
536540
537−{-| Nothing to see here!
541+{-| When you want to render exactly nothing.
538542-}
539543none : Element msg
540544none =
@@ -559,16 +563,15 @@ You can think of an `el` as a `div`, but it can only hae one child.
559563
560564If you want multiple children, you'll need to use something like `row` or `column`
561565
562− import Color exposing (blue, darkBlue)
563− import Element exposing (Element)
566+ import Element exposing (Element, rgb)
564567 import Element.Background as Background
565568 import Element.Border as Border
566569
567570 myElement : Element msg
568571 myElement =
569572 Element.el
570− [ Background.color blue
571− , Border.color darkBlue
573+ [ Background.color (rgb 0 0.5 0)
574+ , Border.color (rgb 0 0.7 0)
572575 ]
573576 (Element.text "You've made a stylish element!")
574577
@@ -585,8 +588,7 @@ el attrs child =
585588 (Internal.Unkeyed [ child ])
586589
587590
588−{-| If you want a row of elements, use `row`!
589−-}
591+{-| -}
590592row : List (Attribute msg) -> List (Element msg) -> Element msg
591593row attrs children =
592594 Internal.element
@@ -618,7 +620,8 @@ column attrs children =
618620 (Internal.Unkeyed children)
619621
620622
621−{-| -}
623+{-| Same as `row`, but will wrap if it takes up too much horizontal space.
624+-}
622625wrappedRow : List (Attribute msg) -> List (Element msg) -> Element msg
623626wrappedRow attrs children =
624627 let
@@ -1004,6 +1007,8 @@ Which will look something like
10041007
10051008
10061009
1010+**Note** `spacing` on a paragraph will set the pixel spacing between lines.
1011+
10071012-}
10081013paragraph : List (Attribute msg) -> List (Element msg) -> Element msg
10091014paragraph attrs children =
@@ -1156,6 +1161,11 @@ newTabLink attrs { url, label } =
11561161
11571162
11581163{-| A link to download a file.
1164+
1165+**Note** If you're using `Browser.application`, then this won't be enough to actually trigger a file download due to how `Browser.Navigation` works.
1166+
1167+[Here's a description of what needs to happen](https://github.com/elm/html/issues/175).
1168+
11591169-}
11601170download :
11611171 List (Attribute msg)