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 working with the fb module, which requires adding a class of "fb_canvas-resizable", I discovered that the Sky theme does not respect the classes added in the page preprocess function, but instead forces _ to -.
function sky_render_attributes($attributes) {
//...
$output = ' '. str_replace('_', '-', implode(' ', $items));
//...
}
This seems a bit odd to me. If I add a class, I do not expect the theme to change it on me.
Comments
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedTough one to change now without potentially breaking BC. This is actually pretty normal for Drupal and is almost a defacto CSS standard to use only hyphens. Honestly I am not tempted to change this mainly because of backward compatibility. Perhaps the fb module (I assume fb stands for facebook?) should adopt normal Drupal coding standards?