-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CSS module script/CSS modules #5944
Comments
Related: #5928 |
I accidentally made a duplicate issue but here's more relevant info: Stage 3: https://github.com/tc39/proposal-import-assertions // styles.css
div {
color: red;
} // index.js
import styles from './styles.css' assert { type: "css" };
document.adoptedStyleSheets = [styles];
const success = getComputedStyle(document.querySelector('div')).color === 'rgb(255, 0, 0)' // index.html
<script type="module" src="./index.js"></script>
<div>YOLO</div> |
Chrome 123 added support for import attributes. Chrome already supported CSS module scripts but used a now deprecated syntax. Now that CSS module scripts work with the up-to-date syntax it seems like a good time to add this data to caniuse. All browsers have indicated that they will support this feature eventually. |
The text was updated successfully, but these errors were encountered: