Skip to content
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

Don't always add margin-top to headers #396

Merged
merged 12 commits into from
Apr 5, 2023
Merged

Conversation

cpsievert
Copy link
Collaborator

Closes #375

@cpsievert cpsievert changed the title Don't add margin-top on .popover-header or .accordion-header Don't always add margin-top to headers Oct 26, 2021
@cpsievert cpsievert mentioned this pull request Jan 3, 2023
4 tasks
@cpsievert cpsievert assigned cpsievert and gadenbuie and unassigned cpsievert Mar 20, 2023
@gadenbuie
Copy link
Member

I updated the SCSS rules to apply to .section.levelX and section.levelX so that they apply in both html4 and html5 settings with Bootstrap 5. (To see this, set pandoc_args = c("--to", "html5").)

Also, it's worth noting that when section_divs = FALSE (with version = 5), our styles won't apply and the resulting headings won't have top margin since Bootstrap's default styles will apply. In general, I think this is the right way to go: most prose settings will benefit from the additional top margin, without interfering with the use of headings in other places.

@gadenbuie gadenbuie assigned cpsievert and unassigned gadenbuie Mar 27, 2023
@cpsievert
Copy link
Collaborator Author

NOTE TO SELF:

  • Before merging, review CSS that we've written to work around this issue (e.g., cards and accordions) and remove unnecessary workarounds
  • Document the breaking change, and for users of shiny::titlePanel(), recommend using (tagAppendAttributes(x, class = "mt-3", .selector = "h2")

@cpsievert cpsievert merged commit ab51bca into main Apr 5, 2023
@cpsievert cpsievert deleted the accordion-margin-top branch April 5, 2023 23:32
gadenbuie added a commit to rstudio/shinycoreci that referenced this pull request Apr 19, 2023
Margin top was removed from headers in rstudio/bslib#396

Margin bottom was removed from cards in rstudio/bslib#542
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Additional margin-top applied to popovers and accordions
2 participants