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))",
......}
6 Replies
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
Just what I was looking for, thanks!
Gave +1 Rep to @louis (current:
#1
- 164
)@Fiatt has reached level 4. GG!
Hi, can't we do it with the with-tailwindcss example? what's the difference between the two?
If you're trying to inject CSUI , it won't work properly without targetted injection