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.
replace _ to - in class name
Comment | File | Size | Author |
---|---|---|---|
#3 | commentV2.patch | 6.79 KB | aspilicious |
comment.patch | 4.13 KB | droplet | |
Comments
Comment #1
dman CreditAttribution: dman commentednice touch.
I wonder how many themes this will hurt...
Comment #3
aspilicious CreditAttribution: aspilicious commentedLet me try this....
Comment #4
aspilicious CreditAttribution: aspilicious commented:)...
I grepped so I guess I have them all ;)!
Someone else can rtbc
Comment #5
droplet CreditAttribution: droplet commentedComment #6
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #7
effulgentsia CreditAttribution: effulgentsia commentedI 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.
Comment #8
effulgentsia CreditAttribution: effulgentsia commentedNever 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.