If you use tailwind as a styling/design-system engine for your app, you may have defined custom colors, spacings or other custom "design tokens".
Sometimes you may need to access values of this custom config file in JS/TS files or in Svelte files (<script>
part).
This is often the case if you do some advanced front-end rendering using canvas, svg, d3 or webGL, etc. Or if you want to perform calculations or interpolation on theses values.
TLDR;
- Prerequisite: a working SvelteKit+tailwindcss project