Rendering HTML with Drupal: Past, Present and Future
Is the job of a Drupal theme to look like a design or to be the design? Is your goal to make pixel perfect replica of a static comp or do you want to design in the browser? Should you edit the CSS or edit the markup?
Drupal makes a lot of assumptions about how these questions are answered.
This presentation will review the mental models used in Drupal theming and proposal a workable path forward. For years, Drupal core has encouraged a mindset of altering and overriding its internal data structures. Developers in the Drupal 6 era created a philosophy called “sustainable theming” that relied heavily on CSS to work best with Core’s tendencies. The rapid acceleration in the wider Front-End community in recent years has brought new underlying assumptions and new ways of thinking. Expectations for how to construct Drupal sites have changed.
The given conditions and implications of four rendering philosophies will be examined:
The Past: “Sustainable Theming” - Accept default Drupal markup as much as possible and use CSS to make the site look like the Photoshop design.
The (past-ish) Present: Chasing "easy" / losing "simple" - Make field formatters, Views plugins and other reusable components in addition to using overrides and preprocessing.
The (future-ish) Present: Making the markup match - Responsive designs are done in static prototypes/style guides; make Drupal print the same design components.
Finally, the phrase "Headless Drupal" will come up at least a dozen times.