Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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

Started by Kamil 5 years ago · 2 replies · 696 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 complanar, 6 days ago
6 140 18 hours ago
Support · by Rick Beebe, 6 days ago
2 100 3 days ago
Support · by blu3prince, 3 days ago
0 52 3 days ago
Support · by alex, 4 days ago
2 93 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago