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.
Themer feature request. I would love to be able to add a CSS class to my panel page in the geeral setting tab for my variant. (below is a mockup)
Thanks!
Comment | File | Size | Author |
---|---|---|---|
request.JPG | 30.84 KB | RockSoup |
Comments
Comment #1
Letharion CreditAttribution: Letharion commentedSounds like a useful feature request. I'm adding it to tasks, but putting it in postponed until someone actually starts work on it.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedUnfortunately the layout system does not support injecting classes; this would be a change to the layout API and is therefore a very difficult thing to do. The flexible layout system allows you to specify a class in the layout config, but regular layouts only allow IDs, not classes, unfortunately.
Comment #3
tim.plunkettI opened #1344108: Allow custom layouts to provide a form for CSS classes as a workaround for now.
Comment #4
kle CreditAttribution: kle commentedThemer feature request 2:
I also would like to define classes per panels-region (like in each single pane).
What's about this ?
thiswouldbesooonice
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedIt easy to inject classes into panes; you can do this programattically via template_preprocess_panels_pane and each pane has a css class setting that can be used to inject a class from the UI.
Comment #6
lsolesen CreditAttribution: lsolesen commentedRelated to #1841254: Option for adding a CSS class along with the CSS ID