A friend of mine had an issue with a Drupal theme page, where he couldn’t change the HTML structure to fit his needs with the indented chapter styling. He got it fixed initially by using CSS selectors that increased in size for each chapter, a method that “worked”, but was not very efficient.

The “working” solution

A better solution

I found a better solution, by manipulating the DOM with jQuery:

See the Pen How to inject proper paper styling to document by Alexander Vassbotn Røyne-Helgesen (@phun-ky) on CodePen.