Svelte/5/Is Where Scoping

/icons/calendar.svg

Last update

Sep 10, 2024

This codemod updates CSS handling in your project:

  • Transforms Tailwind @apply directives and CSS selectors by adding :global() inside :is(...) and :where(...) selectors.
  • Applies changes to CSS within <style> tags in Svelte files.
  • Ensures global scope is properly applied to Tailwind utilities and complex selectors.

Before

main {
@apply bg-blue-100 dark:bg-blue-900;
}

After

main :global {
@apply bg-blue-100 dark:bg-blue-900
}

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now