-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial margins #6116
base: main
Are you sure you want to change the base?
Partial margins #6116
Conversation
Great work, @teunbrand I think it might be helpful for users, if this was named with a margin prefix? This would organise the two functions, so that auto-complete would allow users to easily use the normal one - or switch to the partial one. So |
Thanks David, I like this suggestion :) |
Thanks for considering my FR. Looking forward to seeing this implemented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are here, maybe add a margin_auto()
that behaves like CSS, ie. r
and b
inherits from t
, and l
inherits from r
I like this idea |
This PR aims to fix #6115.
Briefly it allows NA-units in
margin()
that get back-filled from parent elements. The functionpart_margin()
is amargin()
wrapper that by default hasNA
-units.A demonstration. Note no margins except bottom:
Note natural margins are preserved, except bottom:
Created on 2024-09-19 with reprex v2.1.1