You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, thanks for making this library! I'm enjoying it so far :)
Just curious - I've spotted two place where perhaps curly braces can be implicitly assumed, rather than requiring the user to add clutter with them. These two situations are:
Elements without bodies
For example, when handling CSS links:
html! {
html {
head {
link rel="stylesheet" href="/static/resident-smiler.css" {}
}
}
}
I feel like, in this case, the {} shouldn't be needed at the end of the link line? Maybe there's a shortcut I'm missing :)
When elements only have [a single line of] text as their child
link rel="stylesheet" href="/static/resident-smiler.css";
In fact, with the {}, Maud will render <link></link> which probably isn't what you want.
Docs-wise, this ismentioned but it's buried in the middle of the section. Maybe if the note on void elements is split into its own section, it'll be harder to miss?
When elements only have [a single line of] text as their child
Yep, this was how it worked originally! But there were strange edge cases and I ended up removing it (#137). I've gotten feedback on this a few times since -- not just you -- but I haven't figured out a good replacement design that addresses the issues noted in that PR.
BTW, it's great that you're enjoying the library! Please loop me in with any other thoughts you might have 🙂
Hey, thanks for making this library! I'm enjoying it so far :)
Just curious - I've spotted two place where perhaps curly braces can be implicitly assumed, rather than requiring the user to add clutter with them. These two situations are:
Elements without bodies
For example, when handling CSS links:
I feel like, in this case, the
{}
shouldn't be needed at the end of thelink
line? Maybe there's a shortcut I'm missing :)When elements only have [a single line of] text as their child
For example:
Versus:
I'm not sure that these are do-able due to parser limitations, but let me know!
Thanks again for the cool declarative HTML library :)
The text was updated successfully, but these errors were encountered: