You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tailwind on different pages will generate different problems when we don't use shadowDom. Therefore styles should be generated as a separate file. Like here:
import { createRoot } from 'react-dom/client';
import Main from './Main';
const container = document.createElement('div')
const rootEl = document.createElement('div')
const styleEl = document.createElement('link')
const shadowDOM = container.attachShadow?.({ mode: 'open' }) || container
styleEl.setAttribute('rel', 'stylesheet')
styleEl.setAttribute('href', chrome.runtime.getURL('contentStyle.css'))
shadowDOM.appendChild(styleEl)
shadowDOM.appendChild(rootEl)
document.body.appendChild(container)
const root = createRoot(container); // createRoot(container!) if you use TypeScript
root.render(<Main/>);
css modules in content scripts do not work.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: