How do I remove the paragraph parent wrapper?
In a standard Drupal install, the wrapper has the "field__item" class. In Bootstrap it has no attributes (see image). In both cases the unique paragraph attributes aren't on the same DOM level, making it impossible to use sibling CSS selectors.
For example, I can't do something like:
.paragraph {
margin-top: 50px;
margin-bottom: 50px;
}
.paragraph.paragraph--type--red-background + .paragraph.paragraph--type--red-background {
margin-top: 0;
}
I'm guessing the solution is in twig, but I'm new to it and have spent the entire day searching for answers and experimenting with templates. Can somebody please point me in the right direction? I would think this would be the desired behaviour. Or is it a core limitation? Thanks in advance.
Comments
Comment #2
markdcClarifying title and description.
Comment #3
markdcComment #4
berdirHave a look at https://www.drupal.org/docs/8/theming/twig/debugging-twig-templates on how to enable twig debug, that will tell you which template it is using, then you can add a template that doesn't add a wrapper if you don't want one.
Comment #6
markdcThe issue seems to be with Entity Reference Revisions. See #2986140: Field lacks standard CSS classes and div wrapper