resolves #173 - Within a paragraph you can now nest arbitrarily deep els and paragraphs if needed. Additionally, rows within a paragraph have a default alignment of baseline.

This commit is contained in:
Elm UI Automation 2020-05-16 12:27:31 -04:00
parent 9972ddbe7d
commit 9b74bcc5a2

View File

@ -10,6 +10,7 @@ type Class
type Rule
= Prop String String
| Child String (List Rule)
| AllChildren String (List Rule)
| Supports ( String, String ) (List ( String, String ))
| Descriptor String (List Rule)
| Adjacent String (List Rule)
@ -560,6 +561,15 @@ renderRules (Intermediate parent) rulesToRender =
:: rendered.others
}
AllChildren child childRules ->
{ rendered
| others =
renderRules
(emptyIntermediate (parent.selector ++ " " ++ child) "")
childRules
:: rendered.others
}
Descriptor descriptor descriptorRules ->
{ rendered
| others =
@ -1601,7 +1611,16 @@ baseSheet =
[ Prop "display" "inline"
, Prop "white-space" "normal"
]
, Child (dot classes.single)
, AllChildren (dot classes.paragraph)
[ Prop "display" "inline"
, Descriptor "::after"
[ Prop "content" "none"
]
, Descriptor "::before"
[ Prop "content" "none"
]
]
, AllChildren (dot classes.single)
[ Prop "display" "inline"
, Prop "white-space" "normal"
, Descriptor (dot classes.inFront)
@ -1626,16 +1645,26 @@ baseSheet =
[ Prop "display" "inline"
, Prop "white-space" "normal"
]
-- , Child (dot classes.single)
-- [ Prop "display" "inline"
-- , Child (dot classes.text)
-- [ Prop "display" "inline"
-- , Prop "white-space" "normal"
-- ]
-- ]
]
, Child (dot classes.row)
[ Prop "display" "inline-flex"
, Prop "align-items" "baseline"
, Child (dot classes.single)
[ Child (dot classes.text)
[ Prop "display" "inline-block"
, Child (dot classes.text)
[ Prop "display" "inline"
, Prop "white-space" "normal"
]
]
]
, Child (dot classes.row)
[ Prop "display" "inline-flex"
]
, Child (dot classes.column)
[ Prop "display" "inline-flex"
]