mirror of
https://github.com/mdgriffith/elm-ui.git
synced 2024-11-22 11:52:09 +03:00
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:
parent
9972ddbe7d
commit
9b74bcc5a2
@ -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"
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user