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

Better (symmetric) padding for sidebar main area #839

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Oct 17, 2023

Closes #838

This PR makes some small tweaks to layout_sidebar()'s main content padding when the sidebar is collapsed. Specifically:

  • On desktop, increases right padding (of the main content area) to match the left padding
  • On mobile, increases top padding (of the main content area) and decreases left padding (to match the right padding)

Here's a minimal example to visualize the difference:

page_sidebar(sidebar = sidebar("Sidebar", open = FALSE), card("A card"))

Before (desktop)

image

After (desktop)

image

Before (mobile)

image

After (mobile)

image

@cpsievert cpsievert requested a review from gadenbuie October 17, 2023 20:33
Copy link
Member

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I like the mobile layout and I was pleasantly surprised by the desktop layout version.

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.

[docs] Update screenshots of sidebar in dashboard pages
2 participants