Luca Lusso Modernizing Drupal 10 Theme Development ((full)) -

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.

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.

He replaced it with a modern, lean setup. He wrote a custom theme.libraries.yml that imported a single ES6 entry point: luca lusso modernizing drupal 10 theme development

He opened his terminal and ran the familiar commands:

He’d been called in as a freelance front-end architect. The client, a fast-growing tech magazine, complained that their site felt “sluggish” and that their designers were “fighting the theme.” Luca had seen this before. The previous developer had simply ported a Drupal 7 theme forward, layering patch upon patch. The styles.css file was 8,000 lines of spaghetti. The JavaScript was a jQuery meatball. And the template files ( html.twig , page.html.twig ) were littered with deprecated variables. Luca Lusso stared at the screen, the glow

<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:

He updated his Drupal Slack status: “Modernizing Drupal themes, one component at a time. #SDC #Drupal10 #NoMoreSpaghettiCSS” But beneath the hood, it was a time capsule from 2015

“This isn’t a theme,” Luca muttered, sipping his espresso. “This is a historical artifact.”

Naar boven