I just tried to add a bottom-margin to the form generated by biff/form only to realize that apparently biff https://github.com/jacobobryant/biff/blob/1a1eccf8d65bf0e26adb0aab3e51c4cd4f81e138/src/com/biffweb/impl/rum.clj#L84. Is there any reason for this? I'm not able to override it, not by giving a class to the form, nor by setting [:style :margin] in opts.
it's been a while since I did that so I don't necessarily remember what my thought process was at the time, but in general I think it's an antipattern to put spacing on the outside of reusable UI components since the spacing needs are often context-dependent. you could always do something like [:div.mb-4 (biff/form ...)] or (biff/form ...) [:div.h-4]. or copy and paste the biff/form source into your own project and remove the bit that sets margin to 0.
Thanks. I opted to go ahead with the latter option. I did try the former, with an enclosing div... but because for html-structure-specific reasons, I prefer to have the margin with the form. UPDATE: maybe to explain a bit more, the form is actually .hidden by default, and only shown when necessary. When the form pops up is when it makes sense to have that spacing.