- π©π°Denmark ressa Copenhagen
Adding link in Issue Summary about a single underscore in a class name.
Drupalβs new CSS coding standards recommend a naming convention for classes which requires the use of double-underscores as separators in certain cases. However, Drupal currently processes some classes internally using drupal_clean_css_identifier(), which replaces all underscores with dashes.
Allow double underscores to pass through drupal_clean_css_identifier untouched, if the allow_css_double_underscores variable is enabled. Because many modules rely on the current behavior of this function in order to generate standard dash-separated class names from php strings such as field_name
(and this does not need to change), we should for the time being retain the existing behaviour for single underscores.
π
Overly aggressive transliteration in drupal_clean_css_identifier removes underscores from classes
Closed: duplicate
exists to discuss altering the treatment of single underscores.
Update august 2025: About transforming a single underscore into a dash, see π Views row class filtering underscore to dash on direct input Active .
None.
None.
None.
#1995272: [Meta] Refactor module CSS files inline with our CSS standards β
π
Overly aggressive transliteration in drupal_clean_css_identifier removes underscores from classes
Closed: duplicate
Fixed
7.0 β°οΈ
theme system
Issue related to Drupal on mobile devices.
It affects performance. It is often combined with the Needs profiling tag.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Adding link in Issue Summary about a single underscore in a class name.