GithubHelp home page GithubHelp logo

Comments (5)

 avatar commented on May 20, 2024 1

Hi, I can't figure out how to use @apply in my scss files. Is it still possible? All I have at the moment is a theme app with a static/css/dist/styles.css file (which seems to be the talwind default theme). How can I use @tailwind directives (in order to use @apply)? Which file should I edit (I can't find any scss file in the default created app)?

Edit: I figured out just now there is a file in static_rsc/src/styles.css

from django-tailwind.

timonweb avatar timonweb commented on May 20, 2024

Hey, thank you for letting me know the package helps. Well, basically, you don't need to do anything special, just edit the styles.scss files and your stuff there. Alternatively, you can import any scss file into styles.scss to keep things clean.

from django-tailwind.

monk-85 avatar monk-85 commented on May 20, 2024

OK, thank you for the fast reply!

And are you then using PurgeCSS at the end to avoid a 1mb CSS file? If so, what's the easiest way to set this up in the "Django-Tailwind-Stack"?

Sorry, I feel bad for asking all these newbie questions, must sound lazy. Just a bit brain-fried from setting everything up. Going from Bootstrap to Tailwind seems to be quite the jump for a beginner.

from django-tailwind.

timonweb avatar timonweb commented on May 20, 2024

no prob. No it doesn't spit 1mb css file. It's 300kb non-gzipped if you have the default config. We don't use PurgeCSS here as it's an optional thing that could be installed by a user. You need to figure this part out by yourself, I've never used PurgeCSS, maybe in the future I'll add support for it.

from django-tailwind.

monk-85 avatar monk-85 commented on May 20, 2024

OK thanks, I'll save figuring PurgeCSS out for another day, hah.

Regarding the file size - when I run "python manage.py tailwind build", I get a /static/css/styles.min.css file which is 825kb (Windows machine). Hmm.

from django-tailwind.

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.