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.
Luca closed his laptop, poured one last espresso, and looked out the window. Another legacy system, modernized. Another team, liberated.
% if rows % <div class="view-content"> rows </div> % elseif empty % <div class="view-empty"> empty </div> % endif %
In modern Drupal theming, we attach assets via libraries. We will define a library that depends on Drupal's core behaviors. luca lusso modernizing drupal 10 theme development
DrupalEasy 11m PacktPublishing/Modernizing-Drupal-10-Theme-Development Map design systems made by Storybook components to Drupal structures. Understand and use render arrays and Twig templates. Get fam... GitHub Modernizing Drupal 10 Theme Development: Build fast, responsive ... Table of Contents * Setting Up a Local Environment. * Creating a New Theme and Setting Up a Build Process. * How Drupal Renders an... Amazon.com Modernizing Drupal 10 Theme Development By Luca Lusso Aug 31, 2023 —
/* css/dynamic-loader.css */ .load-more-wrapper text-align: center; margin-top: 2rem;
: Introduced in Drupal 10.1, Single Directory Components are highlighted as a revolutionary way to keep Twig, CSS, and JS together in one folder, drastically simplifying theme maintenance. 2. A Modern Toolchain for Drupal Themes On Sunday night, Luca ran the final build
His mission was clear: modernize it without breaking the live site for more than a weekend.
// 2. Prepare Data const viewId = button.dataset.viewId; const displayId = button.dataset.displayId; const nextPage = button.dataset.page;
The real magic came when he integrated Tailwind’s @layer components with Drupal’s SDC (Single Directory Components). He configured postcss.config.js to scan the components/ folder. Now, unused CSS was purged automatically. Build times dropped from 12 seconds to 0.8 seconds. Another legacy system, modernized
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.
Luca shook his head. Too much logic. Too many global classes. He rewrote it:
| Play | Cover | Release Label |
Track Title Track Authors |
|---|