Luca Lusso Modernizing Drupal 10 Theme Development 👑 🎉

Luca Lusso stared at the screen, the glow of three monitors reflecting off his espresso cup. Before him lay a Drupal 10 theme. On the surface, it worked. But beneath the hood, it was a time capsule from 2015.

% include 'components/card' with title: label, image: content.field_image only % Clean. Reusable. Predictable.

Luca knew the heart of modern Drupal theming wasn’t just about Twig templates—it was about component-driven design . He closed the monolithic styles.css file. No one should write global CSS in 2026. luca lusso modernizing drupal 10 theme development

Monday morning, the editors logged in. The admin UI was untouched. But the front end? It felt like a new website. The designers could now edit a single .css file inside a component folder without fear of breaking the header. The developers thanked him for removing jQuery.

He showed the client a preview. The carousel that used to stutter on scroll now ran at 120fps. The CLS (Cumulative Layout Shift) score went from 0.45 to 0.02. Luca Lusso stared at the screen, the glow

On Sunday night, Luca ran the final build. He used Drupal 10’s new auto-setup CLI to spin up a test environment, ran phpunit on his custom theme settings, and pushed the changes.

<div class="node node--type-article node--view-mode-teaser"> <h2> label </h2> <div class="content"> content </div> </div> Luca shook his head. Too much logic. Too many global classes. He rewrote it: But beneath the hood, it was a time capsule from 2015

global-scripts: js: dist/scripts/index.js: preprocess: true, minified: true dependencies: - core/drupal - core/once No more $(document).ready() . He used the new once() library to prevent rebinding and wrote vanilla JavaScript: