Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By rteijeiro on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
As part of an initiative to clean up the markup in core, the following changes have been made.
Changes for Stark's page.html.twig and maintenance-page.html.twig (issue)
Changes include:
- Menu attributes removed from Stark and added to Bartik's bartik.theme.
- #id's removed if they are useless.
- CSS follows the Layout rules in CSS architecture (for Drupal 8) - Separate Concerns
- maintenance-page.html.twig has been converted to HTML5 and follows the same structure as page.html.twig.
<div role="main">
got the appropriate tag<main role="main">
- Messages wrapper
<div>
removed as it's not necessary. - Clearfix removed from the markup for
<main>
and added via CSS tomain:after
to make sure we don't force that solution into the core markup. - Removed styling of
<li>
as it's not necessary. - Removed wrapper
<div>
and<p>
around site-name link.
Changes in html.html.twig (issue)
Changes include:
- Removed region based class names in the
<body>
tag by default. Region classes in the<body>
tag can be added via preprocess function in a theme's .theme file. Stark now has a stark.theme file adding in the class names for a quick 3 column layout. - The "skiplink" wrapper
<div>
is removed from core and added in for Bartik. - Removed all the sidebar info from the body classes by default. The sidebar classes are added to Seven, Bartik, and Stark via preprocess functions. The classes were kept in Stark to maintain its layout but themes built from scratch will not have these body classes added by default, so the default markup is no longer designed to build a 3 column layout.
Styling changes
Code samples for new styling can be found at:
#2011578: Markup for Stark's page.html.twig + maintenance-page.html.twig
#1982256: Clean up html.html.twig markup
#1980004: [meta] Creating Dream Markup
Impacts:
Themers