Custom Drupal 10 Theming with CSS and Twig: A Practical Case Study
In a recent blog post, Hui Jing Chen reflects on the continued relevance of writing traditional CSS in standalone files, especially in the context of a custom Drupal 10 project. She describes a multilingual site implementation where she styled a language switcher and navigation header using only CSS and Twig templating. Hui Jing walks through how she customized templates like page.html.twig
, region.html.twig
, and menu--main.html.twig
to add CSS classes and reduce unnecessary markup. Flexbox was used for layout, along with media queries to ensure responsive behaviour. JavaScript was added minimally to manage a mobile menu toggle. She emphasizes that Drupal, still used by about 1.2% of known CMS-powered websites, remains a practical and flexible platform for developers. The post highlights how foundational CSS knowledge and direct theming still have a place in modern web development, particularly within the Drupal ecosystem.