xmlet / HtmlApiFaster

HtmlApiFaster is an alternative to HtmlApi, which uses XsdAsmFaster instead of XsdAsm in order to increase performance.
MIT License
7 stars 1 forks source link

Optional css class argument of elements below body #6

Open benjamin-dreux opened 2 weeks ago

benjamin-dreux commented 2 weeks ago

After Distinct case for css classes, I understand that my proposition doesn't quite fit with this project. And I respect this desire to protect what is a important idea of this project.

Still I feel that attrClass is too long for something that probably the most used html attribute.

So, what I propose for all element that are only make sens bellow body is to add an argument that would only be a short and for calling attrClass

    .div("first-class second-class")
    .__()

Which doesn't mean that the current form should be retired.

.div()
   .attrClass("first-class second-class)
.__()

I think both should add content to the same attribute So with the following

.div("first-class")
    .attrClass("second-class")
.__()

should produce the following output

<div class="first-class second-class"></div>

In the hope to help enhance this already pretty nice project