-
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
[Grid] Add visibility classes #2435
Comments
Will add p/r today |
We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions. |
As there's been no activity since this issue was marked as stale, we are auto-closing it. |
* docs(Grid): add example of hiding columns * feat(grid): add hiding columns with width 0 Adds functionality requested in (#2435) with more convenient syntax. Originally from PR #4894. * fix(Grid): code impl in wrong location * fix(Grid): update to not allow "-1" span * fix(Grid): revert unintentional scss changes * chore(components): update grid snapshots Co-authored-by: Josh Black <josh@josh.black>
* feat(grid): add hiding columns with width 0 Adds functionality requested in (#2435) with more convenient syntax * docs(grid): add example of hiding columns * docs(grid): fix incorrect `bleed` info and typos * docs(grid): add link to live demo website Change requested here in (#2803) * feat(grid): implement functional React component * chore(grid): add generated files * fix(docs): storybook support load CSF & add sort * docs(Grid): update valid props additionally: - fix oneOf not using array - label default props as undefined - convert col width from str -> num - add range func * docs(Grid): add initial story & style margins * docs(Grid): clean up doc styles & knob controls * docs(Grid): add color knobs, pass thru params * docs(Grid): fix minor fullwidth disp bug * test(Grid): add smoke tests for root el * test(Grid): add basic row and col tests * test(Grid): fix wrappers & update index snapshot * feat(Grid): use layout's breakpoints * chore(Grid): port all tests, add 'as' prop * docs(Grid): include stories from #3892 * feat(Grid): support obj syntax & rm offset props * fix(Grid): add missing @carbon/layout pkg * feat(Grid): rm `noGutter` prop for later PR * chore(Grid): revert storybook to 5.2.1 * chore(Grid): convert to recommended syntax * chore(Grid): inline array gen helper * fix(Grid): update incorrect prop types * chore(Grid): update import format * Revert sass.md * Revert _mixins.scss * Revert App.js * refactor(grid): split out files and update Column * refactor(grid): update test suite for grid components * docs(grid): update story for grid * fix(react): update entrypoint with grid components * fix(grid): convert story offset to prop obj * fix(react): update with missing prop values * chore(project): sync offline mirror Co-authored-by: Josh Black <josh@josh.black>
@joshblack I would like to reactivate this issue, I also would like to have such classes. |
Hi there @FabianPiconeDev! I believe these should be available under the "0 column span" classes. Let me know if I'm misunderstanding or you're looking for something else! 👀 |
@joshblack Ok but, when I have:
I would expect that the element with class
The element is not in a grid (so my request is not exclusively grid related). When the element is not in a grid, I wouldn't want to use grid classes. I see I could make something like:
but this is less readable and implicits a wrapping grid (which is optional), compared to having classes like |
Got it, @FabianPiconeDev! That totally makes sense to me 👍 I'll re-open and we can make sure to guard these declarations with Thanks so much for clarifying, it was super helpful and I appreciate it. |
@fabpico are you thinking of entirely new grid classes ( Since you say you are not using it inside of a grid, perhaps these make even more sense living outside of the grid package, as a utility class inside @joshblack do you have any preferences? I think I am leaning towards adding utility classes to |
POC up in #11786 |
I was thinking about entirely new visibility classes outside of the grid context, but breakpoint aware. Like I am already using such custom classes:
I totally agree. |
From @DusanMilko:
I would like to request carbon team to add visibility classes for breakpoints so you could do:
bx--col-xs-1 bx--col-lg-hidden <- this hides for lg and up, could also add bx--col-lg-only-hidden to hide for that breakpoint only. I can make a pr if you would prefer, let me know
Like foundation has done:
https://foundation.zurb.com/sites/docs/visibility.html
The text was updated successfully, but these errors were encountered: