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

Why tailwind css doesn't work on my sveltekit project with vite?

$
0
0

I have a svelte kit project that has installed tailwind css, but the tailwind css doesn't work.

The tailwind css classes doesn't affect the text i have, here my code in ./src/routes/+page.svelte:

<h1 class="text-3xl font-bold underline">Hello world!</h1>

The output should show a text with 30px font size, bold and have line under the text, but it shows this:

Output in localhost

Project structre

Here is my tailwind css config, note that the project is with typescript:

import type { Config } from 'tailwindcss';export default {    content: ['./index.html', './src/**/*.{svelte,js,ts,jsx,tsx}'],    theme: {        extend: {}    },    plugins: []} satisfies Config;

postcss.config.js:

export default {  plugins: {    tailwindcss: {},    autoprefixer: {},  },}

Note

If you want the code of a file, say in the comments


Viewing all articles
Browse latest Browse all 1541

Trending Articles



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