Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

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

Started by Kamil 5 years ago · 2 replies · 796 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
5 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 TomW, 2 weeks ago
8 228 9 hours ago
Support · by alex, 2 months ago
8 667 24 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago