Using the "Additional CSS Class" Field, I enter a class with UNDERSCORES between words, like : "related_links_callout_link"

This gets rendered as "related-links-callout-link"

See screen shots.

Defined CSS in field.
Rendered CSS in browser.

Anyone have a solution?

CommentFileSizeAuthor
#5 link_css_class_underscore_hyphen-2470377-5.patch810 bytesAnonymous (not verified)
2015-04-13 17-53-55.jpg80.19 KBalphex
2015-04-13 17-52-51.jpg44.17 KBalphex
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alphex’s picture

Issue summary: View changes

(fixing broken URL)

alphex’s picture

Issue summary: View changes
alphex’s picture

Issue summary: View changes
Anonymous’s picture

Status: Active » Closed (works as designed)

This is actually an artifact of the way Drupal 7 core processes css classes with drupal_clean_css_identifier(). See the issue at https://www.drupal.org/node/1109854.

Anonymous’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Closed (works as designed) » Needs review
FileSize
810 bytes

Actually it might be a good idea to alert users to this fact in the field configuration form. Patch attached.

  • jcfiala committed 66792b8 on 7.x-1.x authored by rhclayto
    Issue #2470377 by rhclayto: Adding a class with underscores, the class...
jcfiala’s picture

Status: Needs review » Fixed

Sounds good - I just pushed that up to 7.x-1.x, it should show up in -dev in a day or so.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.