Closed hayleigh-dot-dev closed 12 months ago
As a convenience it is possible to supply more than one class attribute and have the runtime concatenate them.
class
html.aside( [ attribute.style([#("align-self", "start")]), attribute.class("relative sticky top-0 hidden px-4 pb-10 h-screen"), attribute.class("lg:block lg:col-span-2"), attribute.class("xl:col-span-2"),
For things like tailwind in particular this is a quite nice QOL feature, but when statically rendering a lustre element to a string or string builder these classes render individually such that the above element is emitted as
<aside style="align-self: start" class="relative sticky top-0 hidden px-4 pb-10 h-screen" class="lg:block lg:col-span-2" class="xl:col-span-2" >
This ultimately means only the first class attribute is considered by the browser.
It'd also be handy if both the runtime and static rendering combined multiple style attributes as well.
style
As a convenience it is possible to supply more than one
class
attribute and have the runtime concatenate them.For things like tailwind in particular this is a quite nice QOL feature, but when statically rendering a lustre element to a string or string builder these classes render individually such that the above element is emitted as
This ultimately means only the first class attribute is considered by the browser.