You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have been using carbon-svelte-components package and I am not sure if I am fully correct on this one, do I need to import individual package like layout, type, etc if I want to properly integrate and use the carbon design system. I wanted to use the spacing variables required to add margin, padding etc. So I added the @carbon/layout package and imported the scss variable via vite config. And I was able to use those variables.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So I have been using carbon-svelte-components package and I am not sure if I am fully correct on this one, do I need to import individual package like layout, type, etc if I want to properly integrate and use the carbon design system. I wanted to use the spacing variables required to add margin, padding etc. So I added the
@carbon/layout
package and imported the scss variable via vite config. And I was able to use those variables.Now I want to able to use the package which can provide the colors, font size etc so should I use include this scss file https://github.com/carbon-design-system/carbon/blob/main/packages/type/scss/_styles.scss
Another question, is what I am doing above redundant? does the carbon-svelte-components provide these scss variables already? If so how can I use it?
Update:
https://github.com/carbon-design-system/carbon-components-svelte#scss, This section is not that helpful, tried adding the scss file in my vite config as follow but I get "Connection Lost" with lot of
unused css selector
warning error on terminal.Steps:
carbon-components
packages.import "carbon-components-svelte/css/all.css";
from the projectBeta Was this translation helpful? Give feedback.
All reactions