Connect with us

Microsoft

CSS module scripts: `import` stylesheets like JavaScript modules

Microsoft and Google have collaborated to bring support for CSS module scripts to Chromium, and they will be available starting in Microsoft Edge and Chrome version 93. The new CSS module scripts feature can be used to load CSS style sheets with import statements just like JavaScript modules. The imported sheets are constructable stylesheets that…

Published

on

Microsoft and Google have collaborated to bring support for CSS module scripts to Chromium, and they will be available starting in Microsoft Edge and Chrome version 93. The new CSS module scripts feature can be used to load CSS style sheets with import statements just like JavaScript modules. The imported sheets are constructable stylesheets that can be directly applied to documents or shadow roots like this:

import sheet from ‘./styles.css’ assert { type: ‘css’ }; document.adoptedStyleSheets = [sheet]; shadowRoot.adoptedStyleSheets = [sheet];

Loading a stylesheet without needing to create a style or link element can be more convenient and even more performant than other ways of importing and applying CSS from JavaScript.

CSS module scripts will be available starting in Microsoft Edge and Chrome version 93. Read more about the feature over at web.dev: Using CSS Module Scripts to import stylesheets.

Source

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Business

Introducing CoreAI – Platform and Tools

Satya Nadella, Chairman and CEO, shared the below communication with Microsoft employees this morning. As we begin the new year, it’s clear that we’re entering the next innings of this AI platform shift. 2025 will be about model-forward applications that reshape all application categories. More so than any previous platform shift, every layer of the……

Published

on

By

Satya Nadella, Chairman and CEO, shared the below communication with Microsoft employees this morning. As we begin the new year, it’s clear that we’re entering the next innings of this AI platform shift. 2025 will be about model-forward applications that reshape all application categories. More so than any previous platform shift, every layer of the…

Source

Continue Reading

Microsoft

Celebrating Windows 11 PC innovations announced at CES

As we reflect on the incredible innovations showcased at CES 2025, it’s evident that the future of Windows 11 will enable new possibilities and experiences for our customers. Throughout the last year and this week at CES, our partners continue to adv Source

Published

on

By

As we reflect on the incredible innovations showcased at CES 2025, it’s evident that the future of Windows 11 will enable new possibilities and experiences for our customers. Throughout the last year and this week at CES, our partners continue to adv

Source

Continue Reading

Business

The future of retail with Dynamics 365 AI-powered ERP solutions

This year at NRF, we will showcase the latest AI and agent innovations in Dynamics 365 AI-powered ERP and Service solution. Learn more. Source

Published

on

By

This year at NRF, we will showcase the latest AI and agent innovations in Dynamics 365 AI-powered ERP and Service solution. Learn more.

Source

Continue Reading

Trending

Copyright © 2021 Today's Digital.