lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.ophir.dev
MIT License
883 stars 64 forks source link

Adds `body_class` for form component #298

Closed matthewlarkin closed 2 months ago

matthewlarkin commented 2 months ago

Hey @lovasoa, what do you think of this tiny form component enhancement?

Allows adding classes to the fieldset element that contains the body of the form. Useful for things like inner padding, border adjustments, etc.

Would love to see something like this in the official component, and I can update the relevant documentation if this looks good to you!

lovasoa commented 2 months ago

Hi!

That would be okay with me, but I'm not completely sure I understand the why.

Is there something preventing the usage of the existing class attribute, and then styling it with

.my_class fieldset {
  /*...*/
}

?

matthewlarkin commented 2 months ago

Ah yes @lovasoa, thank you for helping me not to overthink it! I will remember to just use CSS next time 🤦‍♂️ 😄

Regardless, body_class would help the folks who just want to write SQL statements, if you think it's still worth it to add it.

Thanks as always!