The decision to use Stable or Classy as the base theme:

  • Stable: pristine, clean, semantic markup
  • Classy: a collection of reasonably verbose defaults

If we take a look at the Stark theme directory (/core/themes/stark) we can see that there are no template files at all.

If we compare that to the Stable theme (/core/themes/stable) we see that it ships with several templates. (In fact Stable includes every template available to Drupal core.)

Stable:node.html.twig

You can see there are basic attributes being added to the main page elements, but the overall the markup is quite clean. We can compare this to the implementation provided by the Classy theme (in /core/themes/classy/templates/content/node.html.twig)

Classy:node.html.twig

Here you can see additional classes are added to provide additional semantics for nodes that are promoted, sticky, or unpublished. The markup generated by this template file probably looks quite familiar if you've developed themes in previous versions of Drupal. The classes added by the Classy theme are sane defaults, that help enable simple styling for the majority of theme developers.

results matching ""

    No results matching ""