CSS & Tailwind
Tailwind CSS v4, cascade layers and public asset paths.
Tailwind CSS v4 is built in through @tailwindcss/vite. You don't need a PostCSS or Tailwind config file. Import Tailwind in css/tailwind.css and you are done.
@import "tailwindcss";
Cascade layers
Tailwind v4 puts its styles into the layers theme, base, components and utilities. The companion module adds a drupal layer and fixes the order in the page <head>:
@layer properties, theme, base, drupal, components, components-custom, utilities;
uebertool_cascade_layer wraps the CSS of Drupal core and modules in @layer drupal. As a result, Tailwind utilities always win over Drupal's styles, without !important. Vue custom elements declare properties, theme, base, drupal, components, utilities in their shadow root.
Drupal only wraps aggregated CSS. In dev, browse the site through Vite instead, e.g. https://uebertool.localhost:5174/uebertool/, with aggregation off (drush theme:dev on). Vite then serves Drupal's CSS files and wraps them in the same layer if uebertool_cascade_layer is enabled. The cascade is the same as in production, and editing a module's CSS updates the page without a reload.
Public assets
Inside url(), @public/… and ~/public/… are resolved by Vite, so the file is bundled and hashed. Everywhere else in CSS the plugin rewrites them to the absolute path of your theme's public folder, e.g. /themes/custom/mytheme/public.