Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Global CSS in sveltekit + vite

$
0
0

I installed a library from my work that consists of fonts and css files. It was originaly made for Angular, but i need to use it inside my SvelteKit project.

Despite looking for few hours, i cannot find a consistent and nice way to use the css classes inside my components.

Here the Angular tuto from the documentation:

// angular.json{"projects": {"build": {      ..."assets":[        ...        {          // copy icons and font to the asset folder"glob": "**/*","input": "./node_modules/@ardian/design-token/assets","output": "/assets/"        }      ],"styles":[        // provide the style.css        // If you wish to override css variables, this style must be placed before"node_modules/@ardian/design-token/style.css",        ...        // This to style are optional, they are here if you want         // to use the adn grid system (see Basic / Grid for more details= "node_modules/@ardian/design-token/grid.css","node_modules/@ardian/design-token/container-grid.css",        ...      ]    }  }}

Here is the package.json of the library:

{"name": "@company/design-token","version": "0.3.8","./package.json": {"default": "./package.json"    },"main": "./company-design-token.umd.js","module": "./company-design-token.es.js","exports": {".": {"import": "./company-design-token.es.js","require": "./company-design-token.umd.js"        }    }}

Please if someone knows how to do it, I would be very thankful.

Thanks for your time,Arthur.


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>