carbon-preprocess-svelte icon indicating copy to clipboard operation
carbon-preprocess-svelte copied to clipboard

optimizeCss removes carbon-charts css

Open halindraprakoso opened this issue 2 years ago • 2 comments

Hello, I tried carbon-charts and wondered why it had missing css even though I imported the css file. It turns out that it was caused by optimizeCss(). Nevertheless, I can work around it by importing stylesheet from html head.

halindraprakoso avatar Mar 07 '22 10:03 halindraprakoso

I experience the same issue. Not only does optimizeCss remove carbon-charts styles (in my case the legend), but it also removes the search bar styles of the UI shell and any custom css in custom components unless they are wrapped with a :global() tag.

Using: "@carbon/charts-svelte": "^0.55.1", "carbon-components-svelte": "^0.61.1", "carbon-preprocess-svelte": "^0.6.0", "sass": "^1.49.7", "svelte": "^3.46.4", "svelte-preprocess": "^4.10.2" "postcss": "^8.4.6",

johannesmutter avatar Mar 23 '22 22:03 johannesmutter

I am also having the same issue.

arjunindia avatar Jun 22 '22 12:06 arjunindia