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
The title component forces top-margin and bottom-margin by default, not sure why, but it is also difficult/impossible to override as it uses !important
Default:
[[rc/title
:level :level2
:label "My Title"]
If I use :parts :wrapper to set top bottom margin, it is ignored.
If I use :style {:margin-bottom "0px" :margin-top "0px"} only the top takes.
I find 9/10 I give up on using title because the defaults don't suit the container and the overrides are as much effort as using normal rc/label and restyle with larger font etc.
The text was updated successfully, but these errors were encountered:
I've been looking into the issue with title margins and I think I found solution that might work well. Idea is to move margin control from the span element to the wrapper component and make margins optional by default.
Updated default margins to "0":
:or {margin-top "0" margin-bottom "0"}
Moved margin styles to the wrapper component:
wrapper-style (merge
(get-in parts [:wrapper:style])
{:margin-top margin-top
:margin-bottom margin-bottom})
This gives us three flexible ways to control margins:
What do you think? Is this the kind of flexibility we're looking for? Let me know if you'd like to see more examples or if you have any suggestions for improvement. Cheers
The title component forces
top-margin
andbottom-margin
by default, not sure why, but it is also difficult/impossible to override as it uses!important
Default:
If I use
:parts
:wrapper to set top bottom margin, it is ignored.If I use
:style {:margin-bottom "0px" :margin-top "0px"}
only the top takes.I find 9/10 I give up on using
title
because the defaults don't suit the container and the overrides are as much effort as using normal rc/label and restyle with larger font etc.The text was updated successfully, but these errors were encountered: