So any content which is put inside Custom CSS area in the Advanced Block Options is placed directly above the actual block on front-end via <style> tags.
Maybe I can get some more information about this approach and why it is done that way.
It is not a solution I explicitly like, but at least I might undertsand it better then.
Maybe it is required to offer the really helpful .blockclass and #blockid selectors?
Combining all the custom styles in a single <style> tag inside the <head> would make more sense to me.
Also there could be an option to save these styles as a separate file.css which would only load on the corresponding page(s) instead.
I was wondering when someone was going to bring this up, it has been there in the back of my head for a while
This might be the right time to get it out of the body, since <style> should not be in there anyway.
If I were to be honest, the approach to insert inside the body was simply easy and simple to do. But definitely not recommended, so we’ll be changing that!
Greetings @Louis I’m wondering the reason why the styles added via the GUI get output in their own stylesheet per each page (brilliant!); but the styles handwritten via the custom css panel in “Advanced” get output in the <head>. Why not bundle them all together? Not a big deal at all; I’m just curious; and, caching is also affected. Thank you!
The custom css allows for dynamic replacement which is why we store it separately and push it to the <head> instead of having it with the generated stylesheet.
For custom blocks, there is also the question of conditions that apply and whether we render the custom css or not.
While we could move this to a stylesheet, I wonder if the dynamic nature of the custom css panel would not defeat caching?
Thank you for the reply. I’m admittedly in over my head on this topic; I was just curious, and your answer helped me to understand the proper use case for the feature; so I appreciate that.
An unrelated question: Does Cwicly offer any filters whereby we can pass instructions to, say, all Cwicly Queries? The reason why I’m asking is, I have dozens of different woo product Queries set up, and only after the fact now desire to exclude “out of stock” items from those Queries. Thanks again sir.