plasmo with shadcn ui components, style of shadcn ui component not work in content script ui

tailwind css config likes below, and I also replace :root to :host by related post searched: export const getStyle = () => { const style = document.createElement("style"); style.textContent = cssText.replaceAll(':root', ':host'); return style; } module.exports = { darkMode: ["class"], prefix: "plasmo-", content: [ './pages//*.{ts,tsx}', './components//.{ts,tsx}', './app/**/.{ts,tsx}', './src/*/.{ts,tsx}', ], theme: { container: { center: true, padding: "2rem", screens: { "2xl": "1400px", }, }, extend: { colors: { border: "hsl(var(--border))", input: "hsl(var(--input))", ring: "hsl(var(--ring))", ......}
No description
No description
6 Replies
lab
lab•13mo ago
There's a multiple tailwind example where it shows how you can inject tailwind into CSUI <- you will need to do this otherwise it won't get injected properly
Fiatt
Fiatt•11mo ago
Just what I was looking for, thanks!
YAGPDB.xyz
YAGPDB.xyz•11mo ago
Gave +1 Rep to @louis (current: #1 - 164)
Arcane
Arcane•11mo ago
@Fiatt has reached level 4. GG!
nithur
nithur•9mo ago
Hi, can't we do it with the with-tailwindcss example? what's the difference between the two?
lab
lab•8mo ago
If you're trying to inject CSUI , it won't work properly without targetted injection
Want results from more Discord servers?
Add your server