Hello. Is there a possibility to assign the offset-box for other module type then features? On the page I'm working on I would like to distinguish two text modules which are placed one after another, and it would be nice if the second one would have different background like the features module with offset-box class assigned.
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Support
@goraht, If you set frontmatter variable class in text.md, the value of class will be appended to the classes of module 'text'.
See /user/themes/quark/templates/modular/text.html.twig:line4
TWIG
<section class="section modular-text {{ page.header.class}} bg-gray">
You can then add the required background color for each class to css.
By the way, class offset-box isn't really helpful, because the css defined for it only works for selector .modular-features.offset-box .frame-box
last edited 12/09/21 by pamtbaau
Thank you for your reply. It helped a little - it motivated me to dig deeper into it's twig template and I did all necessary changes in it (and some changes in css were also necessary). Now it looks like I wanted.
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 3 | 66 | 48 minutes ago | ||
| 2 | 72 | 22 hours ago | ||
| 1 | 40 | 22 hours ago | ||
| 2 | 76 | 6 days ago | ||
| 2 | 70 | 6 days ago |