Comments (4)
Idea from #190 (comment): Concat labels
I figured the cleanest way to do this would be a utility plugin-type thing to allow classnames like label:btn, which my hash fn would then look for to generate out something like btn::[css hash]. For handling the apply, my hash fn would also look for the :: (or whatever separator I use) and concat any newly found labels on. So if I was adding on a set of styles that include label:ghost to the generated-from-apply btn::[hash], I'd concat them into something like btn-ghost::[new(?) hash].
from twind.
Implemented in twind v1.
- inline apply: styles are generated in order they are declared
@(underline font-bold)
->@(underline,font-bold)
Link@(underline font-bold)
->Link#12345
- inline shortcut: style are generated as defined by twind — same as if they where used alone
~(underline font-bold)
->~(underline,font-bold)
Link~(underline font-bold)
->Link#abcdef
Please give it a try. Here are some links to get you started:
- The v1 branch
- Reference until the website is ready
- Examples — the CDN example could be a good start
Closing this for now. Feel free to re-open.
from twind.
Hi @sastan I'm trying to add a custom prefix like we can here https://tailwindcss.com/docs/configuration#prefix
Is this possible in twind? I'm injecting my component into an existing site and getting style leakage that I hope can be prevented with this prefix
from twind.
Hi @sastan I'm trying to add a custom prefix like we can here https://tailwindcss.com/docs/configuration#prefix Is this possible in twind? I'm injecting my component into an existing site and getting style leakage that I hope can be prevented with this prefix
@HowieG , were you able to get this working? If yes, please do share the method. My use-case is also similar. Thank you.
from twind.
Related Issues (20)
- missing data HOT 1
- How to use tailwindcss plugins? HOT 3
- Is there a way to make tailwind-scrollbar plugin to work with twind? HOT 3
- [Bug]: keyframes added with injectGlobal only contain the last keyframe HOT 2
- [Bug]: Classes added with injectGlobal can't reference each other with @apply HOT 2
- [Bug]: Classes added with injectGlobal can't be used with variants HOT 2
- [Feature]: allow peer dep of typescript v5 HOT 2
- [Bug]: max-w-{number} does not work
- defineConfig / setup mixed up[Docs]:
- Template literals like className={tw`bg-green-${c}`}
- How to style host and slot elements with Lit HOT 2
- [Docs]: twind.dev is out of date and still seems active HOT 1
- [Feature]: support vars in square brackts
- [Bug]: How to extend theme in Tailwind v3.4 HOT 2
- Browser version doesn't work (non-ES module version) HOT 7
- Applying classes on Lit element CSS block HOT 1
- [Bug]: withTwind doesn't play nicely with Light DOM Lit elements
- [Bug]: Lit & Dark Mode not usable with "class" mode HOT 1
- [Bug]: Update typescript version to 5.x.x HOT 1
- Use original CDN link
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 twind.