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.
Hey,
can anybody tell me how I can remove all the css field group div classes?
They are builded in field_group.module at line 509:
$group->classes = array('field-group-' . $group->format_type, str_replace('_', '-', $group->group_name));
I think that's to much:
field-group-format group_memory_card field-group-div group-memory-card memory-card speed-fast effect-none
Would be very cool to remove them via the ui.
Yannick
Comments
Comment #1
loominade CreditAttribution: loominade commentedall classes should only be added if desired by opt-in (like everywhere in drupal, but thats another issue #1485678: create less output by default / opt-in classes and wrappers)
Comment #2
yannickooI could find out how to remove all classes except the custom classes:
Comment #3
Stalski CreditAttribution: Stalski commentedThis is pushed to git, thx for the report.
The fix includes:
- separation of required and optional classes. Required classes are especially for JS to pick in.
- update script to make sure the old and configured extra classes are added into the extra classes.
There are still lots of required classes, especially on the div format type.
Comment #4
yannickooYeah, thanks!
Comment #6
dtarc CreditAttribution: dtarc commentedHow would I get the optional classes to render in the markup?
Comment #7
dtarc CreditAttribution: dtarc commentedI figured out what happened & created an issue regarding features support here #2085225: Featurized Field Groups no longer have classes since marked optional.