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.

Carbon Grid class bx--col doesn't include top or bottom padding

See original GitHub issue

What package(s) are you using?

  • [ x] carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you’re having.

Our team wraps the Carbon Grid classes into a component and I’ve noticed what I think is an inconsistency between the code and the documentation.

The documentation (links and screenshots below) states that there’s a standard 16px padding on Items (that’s how I read it, which may be incorrect). When I look at the bx--col class, I only see padding on the left and right.

Is this issue related to a specific component?

This issue is related to the Grid classes. Specifically bx--col.

What did you expect to happen? What happened instead? What would you like to see changed?

I expected a standard padding to be applied on all sides of elements tagged with the bx--col class instead of just the left and right.

What browser are you working in?

Chrome

What version of the Carbon Design System are you using?

10.5.1

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

I work within IBM on the IBM Marketplace.

Steps to reproduce the issue

  1. Create a simple Grid and with a Row and Columns. I have a link below.

  2. https://codesandbox.io/embed/carbon-components-getting-started-u9dmm

Additional information

Screen Shot 2019-08-29 at 9 49 22 AM

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mattalcocommented, Sep 5, 2019

@joshblack Thanks! We’re super excited about the Carbon Grid component and can’t wait to use it.

1reaction
jeanservaascommented, Aug 30, 2019

Weird, you kind of read my mind, I was noticing this discrepancy yesterday. Ideally, I think the answer to your question is yes… the grid code should ship with vertical padding that matches the side padding…

Chiu’s grid guidance examples with padding had both the vertical and the left and the right.

image

Whereas the examples I’ve been creating for grid code tab follow what you’ve done for the grid demo and only have the left and the right shown.

image

But, I do want to make the point, that if people are using the 32px, the 16px or the 2px scenarios on say a dashboard situation, they want to also keep their vertical padding consistent with that choice.

BUT: My question is, if we attach it to the grid package… is that going to be a problem for Mixed use scenarios? I’m trying to think of a case where i might be an issue – let’s talk in person about it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spacing - Carbon Design System
The Carbon spacing scale complements the 2x Grid and typography scale by using multiples of two, four, and eight. It includes both small...
Read more >
CSS grid not affected by padding-bottom - Stack Overflow
Show activity on this post. I'm using CSS grid to position a dynamic number of elements into rows using grid-auto-rows. However the last ......
Read more >
padding-bottom - CSS: Cascading Style Sheets | MDN
The padding-bottom CSS property sets the height of the padding area on the bottom of an element.
Read more >
CSS Grid Gotchas And Stumbling Blocks - Smashing Magazine
However, flexbox doesn't provide a grid system any more than floats do, ... In the example below I have a two-column layout, adding...
Read more >
Spacing - Bootstrap
Bootstrap includes a wide range of shorthand responsive margin and padding ... or padding-top; b - for classes that set margin-bottom or padding-bottom...
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