Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind classes are not exported to global.css #252

Open
AgarwalPragy opened this issue Jul 6, 2021 · 1 comment
Open

Tailwind classes are not exported to global.css #252

AgarwalPragy opened this issue Jul 6, 2021 · 1 comment

Comments

@AgarwalPragy
Copy link

Issue: Not all the required tailwind classes are exported to public/global.css, which leads to unstyled components

Steps to reproduce:

  1. Initialize project from official svelte template
    npx degit sveltejs/template svelte-app
    cd svelte-app
    node scripts/setupTypescript.js
  2. Install smelte
    npm i smelte
  3. Add the Smelte Rollup plugin (after svelte but before css).
  4. Include material icons in your template (public/index.html)
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
  5. Update src/App.svelte to the following
    <script lang="ts">
        import "smelte/src/tailwind.css";
    </script>
    
    <main>
        <div class="bg-red-200">This isn't working</div>
        <div class="bg-blue-200">This works!</div>
        <div class="bg-green-200">This isn't working either</div>
    </main>
  6. run the project & goto localhost:5000/
    npm run dev

Result:
image

Expected:
The 3 divs should have a background color of red, blue and green respectively.

@wktdev
Copy link

wktdev commented Jan 7, 2022

Is there a solution for this? I am having the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants