carbon-design-system / carbon

A design system built by IBM
https://www.carbondesignsystem.com
Apache License 2.0
7.85k stars 1.81k forks source link

Is grid-columns-16 experimental? #3727

Closed mstudio closed 5 years ago

mstudio commented 5 years ago

What package(s) are you using?

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.

joshblack commented 5 years ago

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!

mstudio commented 5 years ago

Perfect! Thanks for clarifying

scottopherson commented 4 years ago

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?

joshblack commented 4 years ago

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 👍

scottopherson commented 4 years ago

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