Hi!
I am still having issues with this. Here’s what I am trying to accomplish:
This is for a website of poetry. Poetry is difficult to work with on a website due to its often-odd formatting, on a per-poem basis. In most cases, websites encapsulate the poem in <pre> tags, and add s to move things over. Really ugly, especially in mobile.
So my approach: I defined a custom post type ‘poem’. In it I am including the poem as the main content, using an html block. I have a custom field poem_css which is to contain the needed css to apply to the rendered poem html.
In Cornerstone, I have a single layout ‘Poem’ which includes a text field for the poem content, and in its Element CSS I have {{ post.meta({"key":"poem_css"}) }} to bring in the CSS. My problem here is that the CSS doesn’t appear to be pulled in and applied. The same CSS works if I add it to a regular CSS sheet, but I love the idea of encapsulating it in the post.
(Currently I have the same post.meta in the text field as well to see it rendering.)
This is different from your example in that the entire CSS payload is coming from the custom post field rather than CSS atoms. Not sure if that’s the problem, or something else.
I have one poem defined with this approach, here: https://davidd937.sg-host.com/poem/a-night-in-alaska/
The format should look like it is currently rendered here: https://thebluebirdword.com/a-night-in-alaska-by-ellen-skilton/
Thoughts?
I will attach creds.
-Dave