racket / scribble

Other
199 stars 91 forks source link

Feature request: Wrap a `div` with a class around the HTML for a `part` #353

Closed sschwarzer closed 2 years ago

sschwarzer commented 2 years ago

It would be good to be able to style not only the heading of a part (see also #352), but a part as a whole. That is, the following HTML structure should be created:

<div class="my_class">
  <h3 ...>Section title</h3>
  ...
</div>

This structure would help with situations as described in this ticket, where I want to apply some JavaScript action to a whole subsection.

At the moment there's no way in Scribble to achieve the addition of a div around a part's HTML (see this Racket Discourse thread).

@mflatt suggested the following approach: Add style properties to a section (or subsection etc.). Then, a class in the style properties would mean to create a div with this class around the whole section.