I know webflow uses shopify's liquid system for its code. Pretty much, I have a theme system for Lit.cat where articles reference another database of articles to get their themes. I've only customized the css of existing WordPress themes, I have no idea how it'd go to create your own element reference system.
Yeah, now you're beyond me. I can make the formatting go. I can make weirdly spaced poems display weirdly spaced rightly on the page if you let me fiddle and swear insomniacally enough. CSS is past me. At least for now. At least I have the confidence I could learn enough to hack a little at it, if push came to shove, but it'd have to come to that for me to learn any first.
Fun easter egg: I've been formatting poetry on lit.cat as h2 headings as a duct tape and popicles solution to text lines being spaced far apart from each other. In my head this means that all the poetry is screaming at Google but all I think its doing is confusing people who read with screen readers.