Giter Site home page Giter Site logo

Comments (6)

jeffreyvr avatar jeffreyvr commented on July 19, 2024

I think that Adam means he just removed @import "tailwindcss/base";, not all imports. If you leave the others in, you will get the effect as seen in the video.

Quick example: https://youtu.be/vBhyv-9va5s

Ps. If you wan't it to pick up on Tailwind classes inside JS-files to (in your gif you are changing app.js), you would have to add it to the purge list in tailwind.config.js. But you might have already known that :-)

from tailpress.

dgwyer avatar dgwyer commented on July 19, 2024

Yes, that's true for the JS files but in the GIF above I'm editing a PHP file too and those classes aren't being compiled for some reason as in your video. Not sure why.

from tailpress.

jeffreyvr avatar jeffreyvr commented on July 19, 2024

Just to be sure, do you have these two not commented out?:

@import "tailwindcss/components";
@import "tailwindcss/utilities";

from tailpress.

dgwyer avatar dgwyer commented on July 19, 2024

Yes, I did comment those out. I just added them back in and it works now when modifying PHP and JS. I didn't realise this was a requirement though.

Going back to Adam's video, at the time I linked to there are no styles at all in his build.css until he starts adding in classes to the HTML file. Whereas TailPress adds in all the base, components, and utility classes by default which you can then add to when editing PHP, and JS.

If this is the way TailwindCSS JIT works how do you think Adam has an empty build file until he starts adding classes to HTML files?

from tailpress.

jeffreyvr avatar jeffreyvr commented on July 19, 2024

That's because the templates files are watched and all utility classes that occur in them are added to the app.css file.

If you, as a test, only watch for one file (say index.html) you'll see the effect as seen in the video of Adam. Quick example: https://www.youtube.com/watch?v=IXoWlSp2Ja0

from tailpress.

dgwyer avatar dgwyer commented on July 19, 2024

Got it. Thanks for clarifying.

from tailpress.

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.