question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UI shell option for no padding on content

See original GitHub issue

2rem padding was introduced on bx--content in 10.3.0.

image

If you’re using grid in UI shell, bx--grid sets the outermost 2rem padding.

image

UI shell should have an option to not add padding to bx--content to give the application full control over its layout. Or, default to no padding and have an option (class) to add padding.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mattrosnocommented, Mar 23, 2021

Hi @FabianPiconeDev - thanks for your comment. I agree that this override should not be required by everyone who uses the Content component with the grid.

We are currently evaluating CSS Grid as part of our 2021 release. See https://github.com/carbon-design-system/carbon/issues/7538

CC @joshblack @tay1orjones can we make sure to look at the Content component to make sure it plays nicely with our updated grid, so we can then remove this override used in the tutorial?

0reactions
fabpicocommented, Mar 22, 2021

I ran in to the same issue, there is even a comment linked to this issue in the official Carbon React tutorial’s index.scss.

/// Padding was introduced in 10.3.0, needs an option to let grid set the viewport gutter
/// @link https://github.com/carbon-design-system/carbon/issues/3010
.bx--content {
  padding: 0;
}

Even if i use bx--grid--narrow, the additional left padding is still there. IMO the problem is more on the combined usage of the Content component and the Carbon Grid classes, not the UI Shell (which only consists in Header, Left-/Right Panel as far i can see).

I see it can be compensated:

Each column has horizontal padding (aka a gutter) that defines the space between them. You can negate this padding at the row level with negative margins, allowing the content within your columns to be aligned along the left side.

But for me this is a workaround, not an option.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove padding between stackable grids in Semantic UI
I: Semantic UI Way. You can modify the SUI theming variables for this purpose. Here's how: Modify definitons/collections/grid.less
Read more >
Step 13: Margins and Paddings - Documentation - SAPUI5 SDK
We have to set the width of the panel to auto since the margin would otherwise be added to the default width of...
Read more >
Increase padding in gnome terminal - Ask Ubuntu
Padding as in: I want space between the window border and where the text input/output is displayed.
Read more >
2.5 I do not understand how padding behaves - Codecademy
Remember, the padding is the space between your border and your innermost layer: the actual content. But there's no actual content in our...
Read more >
NET MAUI Shell flyout - Microsoft Learn
The navigation experience provided by .NET Multi-platform App UI (.NET MAUI) Shell is based on flyouts and tabs. A flyout is the optional...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found