replace _ to - in class name

CommentFileSizeAuthor
#3 commentV2.patch6.79 KBaspilicious
comment.patch4.13 KBdroplet
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dman’s picture

nice touch.
I wonder how many themes this will hurt...

Status: Needs review » Needs work

The last submitted patch, comment.patch, failed testing.

aspilicious’s picture

Status: Needs work » Needs review
FileSize
6.79 KB

Let me try this....

aspilicious’s picture

:)...

I grepped so I guess I have them all ;)!
Someone else can rtbc

droplet’s picture

Status: Needs review » Reviewed & tested by the community
Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

effulgentsia’s picture

I just noticed this and #765044: No underscore in CSS class name. Is there a link to an issue that decided that this is the way to go (using css class names as array keys)? Doesn't this violate our naming convention? Why don't we fix theme_links() to call drupal_html_class() on the array key before using it as a CSS class? If the reason is performance, it's why we have #680022: template_preprocess() is too slow in generating valid CSS class name which has been waiting in the queue a long time.

effulgentsia’s picture

Never mind. I see that theme_links() has used each link's array key as a CSS class name since Drupal 5. My preference would be to change the array keys to follow Drupal machine id convention (e.g., underscore rather than hyphen), and call drupal_html_class() from within theme_links(), but at this point, that's D8 material. Given that D5-D7 use the array key as a direct CSS class, #3 was the correct solution.

Status: Fixed » Closed (fixed)

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