Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Offset-box class for non-features modules in quark theme

Started by Kamil 5 years ago · 2 replies · 567 views
5 years ago

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.

5 years ago

@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
4 years ago

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.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
3 66 48 minutes ago
Support · by Anna, 3 days ago
2 72 22 hours ago
Support · by Justin Young, 23 hours ago
1 40 22 hours ago
Support · by Duc , 1 week ago
2 76 6 days ago
Support · by Colin Hume, 1 week ago
2 70 6 days ago