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.
When theme_debug is enabled, the generated CSS file contains invalid CSS (due to the inserted HTML comments <!-- -->
produced by theme_debug altering the code produced by all template files.
Example content found in /sites/default/files/css/menu_icons.css
<!-- THEME DEBUG -->
<!-- CALL: theme('menu_icons_css_item') -->
<!-- BEGIN OUTPUT from 'sites/all/modules/contrib/menu_icons/menu_icons_css_item.tpl.php' -->
a.menu-1557, ul.links li.menu-1557 a {
background-image: url(/sites/default/files/styles/my_image_style/public/menu_icons/menu_icon_1557.png);
padding-left:310px;
background-repeat: no-repeat;
background-position: left;
height: 30px;
}
<!-- END OUTPUT from 'sites/all/modules/contrib/menu_icons/menu_icons_css_item.tpl.php' -->
I'm not entirely sure if there is a way to fix this.
Comments
Comment #2
kennethos CreditAttribution: kennethos at Randstad Digital commentedhttps://www.drupal.org/node/2507515