fix(card header): Make card header flex by default (#1253)#1254
Merged
elnelson575 merged 50 commits intomainfrom Nov 13, 2025
Merged
fix(card header): Make card header flex by default (#1253)#1254elnelson575 merged 50 commits intomainfrom
elnelson575 merged 50 commits intomainfrom
Conversation
Member
|
bslib/inst/bslib-scss/spacer.scss Lines 22 to 32 in 07552c8 |
gadenbuie
reviewed
Nov 6, 2025
gadenbuie
reviewed
Nov 6, 2025
gadenbuie
reviewed
Nov 6, 2025
gadenbuie
reviewed
Nov 6, 2025
gadenbuie
approved these changes
Nov 6, 2025
Member
gadenbuie
left a comment
There was a problem hiding this comment.
All good to merge once the last couple details are handled
Merged
Co-authored-by: Garrick Aden-Buie <[email protected]>
gadenbuie
reviewed
Nov 7, 2025
gadenbuie
reviewed
Nov 7, 2025
Co-authored-by: Garrick Aden-Buie <[email protected]>
Co-authored-by: Garrick Aden-Buie <[email protected]>
gadenbuie
reviewed
Nov 7, 2025
gadenbuie
reviewed
Nov 12, 2025
Co-authored-by: Garrick Aden-Buie <[email protected]>
gadenbuie
reviewed
Nov 12, 2025
gadenbuie
previously approved these changes
Nov 12, 2025
Member
gadenbuie
left a comment
There was a problem hiding this comment.
Looks good, one more thing to track down to see if we can simplify before merging!
gadenbuie
reviewed
Nov 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes card headers flex by default, with equivalent settings to
.hstack.This makes it much easier to organize complex inputs in headers with vanilla formatting or using other spacing utils to control how the items are spaced within the header.
We are not adding this to footers because it seems like footers are more likely to be longer blocks of text, like figure captions, footnotes, etc.
Minor breakage is possible for people currently expecting vertically stacked inputs in headers, however based on a quick survey of publicly available code on GitHub, this seems to be a very, very small population.
An example with a few inputs in a header:
An example with
ms-autopushing the second part of the header to the far right:Interactions with Nav implementations &
nav_spacerUpdates to the
card_headerscss were made in order to implement the following behaviors:If a card uses a nav implementation like
navset_card_tab, everything will behave normally, including spacers.`nav_spacer` will also work correctly in a `card_header`, even if no other nav items are present:
If there is both a nav container with a `nav_spacer` and other flex items in the card header, the nav will use the spacer but leave room for the remaining items: