Comments (4)
Odd, do other variants get preserved? i.e hover:
etc.
I'd need some more info to help out
from tailwindcss-dir.
Actually this is more odd than I thought when I build locally the tailwindcss-dir rules are in the css but when deploying (on Vercel) it's not there 😭
And to answer your question, yes the other variants are preserved.
from tailwindcss-dir.
Ok finally I'm able to reproduce locally.
I was not running the build with the NODE_ENV to prod that's why I didn't have the same output than on Vercel 😑
So definitely this is a purgecss issue (when I disable it, the ltr and rtl rules works on the built version).
So I tried to add some whitelist patterns in tailwind.conf
like below but with no success.
Do you think there is a way to make tailwind-dir compatible with purgecss ?
module.exports = {
purge: {
content: ["./src/**/*.svelte"],
options: {
whitelistPattern: ["/svelte-/", "/ltr/", "/rtl/"],
},
},
theme: {
extend: {
colors: {
green: {
default: "#9cce63",
dark: "#799a53",
},
brown: "#b69b83",
},
},
},
plugins: [
require("tailwindcss-dir")(),
require("@neojp/tailwindcss-line-clamp-utilities"),
require("@tailwindcss/custom-forms"),
],
variants: {
backgroundColor: ["responsive", "hover", "focus", "active"],
margin: ["responsive", "direction"],
padding: ["responsive", "direction"],
lineClamp: ["responsive"],
boxShadow: ["focus-within"],
},
};
from tailwindcss-dir.
Finally I came across this issue providing the answer 🥳
It would be interesting to add a note in the doc for this I think.
from tailwindcss-dir.
Related Issues (17)
- It doesn't work unless adding a backslash HOT 3
- Error: Couldn’t find Tailwind screen: ltr HOT 4
- versioning question HOT 7
- rtl: and ltr: doesn't work HOT 5
- How to use a specific direction as varient? HOT 9
- Use `margin-inline` instead HOT 1
- Use dir with :last and :first variants HOT 2
- How can I set border to rtl and ltr direction ? HOT 4
- is this library no longer maintained ? HOT 1
- How to use direction together with responsive variants? HOT 1
- it is not work :( HOT 8
- Support right and left ? HOT 4
- on adding direction to inset HOT 7
- Windicss Typography plugin and tailwindcss-dir HOT 3
- not working when used via @apply in style file
- I couldn't use it HOT 3
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 tailwindcss-dir.