Giter VIP home page Giter VIP logo

Comments (3)

endigo9740 avatar endigo9740 commented on August 28, 2024 1

@polaroidkidd you're running into one of the notable limitations of Tailwind, you cannot use constructed classes:

https://tailwindcss.com/docs/content-configuration#dynamic-class-names

The best way to understand this is to understand how the Tailwind compiler works:

  1. It scans all files you provide it access to in your Tailwind Config > Context section
  2. It scans these files looking for full CSS utility classes, it cannot "see" partials
  3. Finally it adds any classes it finds to your CSS bundle

In your case the compiler is missing all your classes because they are not able to be read verbatim.

Another thing, we follow Tailwind's recommendation to avoid abstracting utility classes to a component like this. We follow their utility-first approach:

https://tailwindcss.com/docs/utility-first

This means that the classes themselves ARE the abstraction, and the expectation is you will mix and match the utility classes as you implement your interface (buttons, etc).

I'm going to close this out, but if you have any questions about these topics let me know, but please do make sure you read those sections I linked in full. They will provide a lot of help in understanding how this works.

from skeleton.

polaroidkidd avatar polaroidkidd commented on August 28, 2024 1

Oh wow. I had 100% forgotten about that. Thanks for the in-depth response. I was taring my hair out over this one. I really appreciate it.

from skeleton.

polaroidkidd avatar polaroidkidd commented on August 28, 2024

I've added a stackblitz https://stackblitz.com/edit/vitejs-vite-sa3fmn?file=src%2Froutes%2F%2Bpage.svelte

from skeleton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.