Carbon: Is grid-columns-16 experimental?

Created on 13 Aug 2019  ยท  5Comments  ยท  Source: carbon-design-system/carbon

What package(s) are you using?

  • "@carbon/grid": "^10.4.0"
  • "carbon-components": "^10.3.1"
  • "carbon-components-react": "^7.4.1"
  • "carbon-icons": "^7.0.7"

Summary

I'm using the carbon grid system in a React App, following the instructions from the Carbon Website here: https://www.carbondesignsystem.com/tutorial/react-step-2#install-grid

To my CSS, I've added:

$feature-flags: (
  grid-columns-16: true
);
@import 'carbon-components/scss/globals/scss/styles.scss';

This works fine in the browser. However, I do see the following warning in the terminal upon building:

WARNING: Usage of non-default feature flags was found: grid-columns-16. Feature/code under non-default feature flags are either experimental, deprecated, or support for edge cases. They are subject to change any time. Use them at your own risk.

Is it true that grid-column-16 is experimental? I ask because this will eventually be used in production code. If so, is there a current best practice approach to using a 16 column grid with Carbon? Thanks in advance.

question โ“

Most helpful comment

Hi @mstudio! ๐Ÿ‘‹ I believe this is just an issue with our underlying feature flag code. As you noted, the intent is that eventually we will move to 16 columns in our next major release. You can 100% use grid-columns-16, the only thing that will change is that eventually the feature flag will be on by default and you won't have to do anything ๐Ÿ˜„

Hope this helps!

All 5 comments

Hi @mstudio! ๐Ÿ‘‹ I believe this is just an issue with our underlying feature flag code. As you noted, the intent is that eventually we will move to 16 columns in our next major release. You can 100% use grid-columns-16, the only thing that will change is that eventually the feature flag will be on by default and you won't have to do anything ๐Ÿ˜„

Hope this helps!

Perfect! Thanks for clarifying

Hi @joshblack I'm a little unclear if this change to 16-column default was completed and published.

As of tag v10.11.3, @carbon/grid seems to default to 16-col:
https://github.com/carbon-design-system/carbon/blob/cb6a46a84c26819c470ee0ddd38acf324c95c097/packages/grid/scss/grid.scss#L10

but carbon-components still requires 16-col feature flag and defaults to 12-col:
https://github.com/carbon-design-system/carbon/blob/cb6a46a84c26819c470ee0ddd38acf324c95c097/packages/components/src/globals/grid/_grid.scss#L14-L16

Is this intended behavior?

Hey @scottopherson! ๐Ÿ‘‹ For folks using carbon-components directly, we set things to 12 columns by default to help with folks migrating from v9 to v10. The grid package itself was added in v10 which is why it's enabled with 16 by default ๐Ÿ‘

@joshblack ah I see now, thanks for the clarification!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PatrickDuncan picture PatrickDuncan  ยท  3Comments

ConradSchmidt picture ConradSchmidt  ยท  3Comments

jhpedemonte picture jhpedemonte  ยท  3Comments

antonmc picture antonmc  ยท  3Comments

JordanWSmith15 picture JordanWSmith15  ยท  3Comments