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 sun on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Description:
Previously, many themes used a reset.css
to ensure a consistent styling across browsers.
Drupal 8 ships with the normalize.css library, which can be leveraged by all themes.
Drupal 7
mytheme.info
:
stylesheets[screen][] = reset.css
Drupal 8
-
Remove the line from your
.info.yml
file. - Add this to your
template.php
instead:
/** * Implements hook_preprocess_HOOK() for html.tpl.php. */ function mytheme_preprocess_html(&$variables) { // Add normalize.css as first loaded CSS file to all HTML pages. drupal_add_library('system', 'normalize'); }
Impacts:
Themers