Here is the problem: Suppose I have :
- a CSS with formatting rules defined both in a "blog-item" class and in the "p" element.
- A blog post with three paragraphs and a standard item.html.twig template with these lines:
------------<div class="blog-item"> {{ page.content }} </div> -----------------
Now Grav will (correctly) produce the following HTML:
--------------- <div class="blog-item"> <p>Lorem ipsum dolor sit amet, ....</p> <p>Lorem ipsum dolor sit amet, ....</p> <p>Lorem ipsum dolor sit amet, ....</p> </div> ---------------
which will not apply my blog-item rules, as they will be overridden by the more specific "p" rules. I think I need the template to produce HTML as:
--------------- <div > <p class="blog-item">Lorem ipsum dolor sit amet, ....</p> <p class="blog-item">Lorem ipsum dolor sit amet, ....</p> <p class="blog-item">Lorem ipsum dolor sit amet, ....</p> </div> ---------------
Question: what's the Twig/Grav magic that will allow me to do that?