-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(Grid): enable zero span columns #5052
feat(Grid): enable zero span columns #5052
Conversation
Deploy preview for the-carbon-components ready! Built with commit e7f03b1 https://deploy-preview-5052--the-carbon-components.netlify.com |
Deploy preview for carbon-elements ready! Built with commit e7f03b1 |
Deploy preview for carbon-components-react failed. Built with commit e7f03b1 https://app.netlify.com/sites/carbon-components-react/deploys/5e262b5158e14f000ae152ea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks basically good, wanted to see what @joshblack thinks. Great to have some clarification of for
loop starting -1
(Is it some kind of Sass trick?). Thanks @zachhardesty7!
@asudoh Honestly, I wrote this quite a while ago as a feature of the (upcoming) React Grid components. I have no idea why I put |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thank you for doing this!
Adds functionality requested in (#2435) with more convenient syntax.
Since Grid components may often have their classes added programatically, enabling the use of span "0" simplifies the code and improves readability. From an English language syntax perspective, content "spanning 0 columns" makes sense in a similar way as content with a "width of 0." Additionally, several other major libraries support this notation.
Changelog
New
.bx--col-0
that setsdisplay: none
on a given columnTesting / Reviewing
The example docs now include a demonstration of the class in action!