Comments (5)
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.
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.
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.
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.
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)
- Preventing CSS caching
- Setting an item to not visible as the default then visible at any larger breakpoint doesn't work HOT 1
- Responsive Breakpoint Partially Working
- tailwind start not working
- Some classes didnt work
- Does not work with S3 HOT 5
- Changelog file is not updated. HOT 1
- Installation Error with "django-tailwind[reload]" Package HOT 1
- ModuleNotFoundError: No module named 'maintailwind'
- Global base styles HOT 1
- Freeze on tailwind init
- Multi-apps support
- [Solved] How to have the `theme` folder in a nested folder? HOT 1
- Not rebuilding automatically when new classes are added to templates HOT 4
- python manage.py tailwind start with SyntaxError: Unexpected token '.' HOT 2
- "theme" app created in parent dir when initiated in parent dir HOT 2
- FYI How to use with NGINX proxy HOT 1
- python manage.py tailwind start causes "sh: 1: cross-env: Permission denied" message
- Django Tailwind not working on DEBUG = False HOT 1
- Tailwind focus outline classes not working properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-tailwind.