Inject tailwindcss into iFrame for design-system #4010
Unanswered
gregorvoinov
asked this question in
Help
Replies: 1 comment
-
Have updated to the new version 2.1 with Jit and now with But is this the best way to get all style to the iframe? First generate the file and then import with the raw-loader? Or is there a more webpack way, where I can link directly to the taiwindcss classes that I have used from my iframe? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm building a tool for creating design systems for my projects.
I have a vuejs component where I render a dynamic component inside an iFrame, but I don't know how to load my tailwindcss file in it....
this is the code
At the moment I am creating an extra css file where I add all the styles I need by hand. This works, but is a lot of work.
How can I get the tailwindcss with my theme from the project into the iFrame?
What also would help would be a cli command where I get all used classes in my project. I only found a command where I get all classes
npx tailwindcss build src/assets/css/tailwind.css -o dist/assets/css/index.css
but this file is 3.3MB and kills my browser when loading.When I build my project I was also searching for some css file, but this is inside some js files. so I can't use this.
I'm a UX/UI designer, so maybe this approach is completely wrong and real developers know better :) The reason for using iFrames is to get breakpoints work with the witdh of the container where the component lives.
I'm using "tailwindcss": "^2.0.3", and "vue": "^2.6.12".
Beta Was this translation helpful? Give feedback.
All reactions