carbon-design-system / carbon

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

[Question]: Is there a way to override the default breakpoints of carbon located within the @carbon/grid/scss/config file? #17092

Closed victorwhy closed 1 month ago

victorwhy commented 2 months ago

Question for Carbon

I looked around in the issues and discussions and didn't really find the right thing here, but if we use the carbon grid system, how would we override the default breakpoints? would we be doing something like this to override the css?

@use '/node_modules/@carbon/grid/scss/config' with (
  $grid-breakpoints: ( 
...

which... isn't working for me! wondering if anyone else has done this, or if there's something easy im totally missing (which could absolutely be teh case)

Code of Conduct

victorwhy commented 1 month ago

FYI this was a problem of grabbing the right files. ended up importing the three files this way:

@use '../../../node_modules/@carbon/styles/scss/_config' with (
  $grid-breakpoints: (
     ...
  )
);
@use '../../../node_modules/@carbon/styles/scss/_breakpoint';
@use '../../../node_modules/@carbon/styles/scss/grid/css-grid';

and everything flowed through!