Default classes not applied when "add default classes" is checked?

Created on 12 March 2018, over 6 years ago
Updated 27 December 2023, 6 months ago

How do you get default classes to apply to the outer wrapper when configuring a field in "expert mode"?

I tried configuring a field in expert mode, checking the "outer wrapper" checkbox, setting "div" as the element, and then checking the "add default classes" checkbox, but the default classes aren't applied.

In D7, the above steps would result in the default classes being applied to the div (or whatever element you selected as the outer wrapper).

πŸ› Bug report
Status

Closed: works as designed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States aasarava

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡§πŸ‡ͺBelgium swentel
    • swentel β†’ committed beafb4ea on 8.x-3.x
      Issue #2952413: Default classes not applied when "add default classes"...
  • Status changed to Closed: works as designed 6 months ago
  • πŸ‡§πŸ‡ͺBelgium swentel

    I had a look what happens in D7. There, the default classes are added in a preprocess function, but in D8, this happens in the template. So when it comes to those, (e.g. field, field-name-{name} etc', these will never be added in our version D8.

    There might be classes that will be added (e.g. wide-content on the outer wrapper on some image styles), but these are added by formatters.

    Added some information on the settings screen of Display Suite where you configure the field template that these classes will not be available, which, in a way, makes sense for the expert template.

Production build 0.69.0 2024