Displaying Custom CSS on a page?
beardedgit
Registered Users Posts: 854 Major grins
I've a mind to create a reference page on my site to show what Custom CSS I'm using.
I know that I can create a page, add a text-block to it and then copy/paste my Custom CSS into that text-block, but that's a static solution - every time I edit my CSS I'd have to edit the text-block content.
I was wondering if there's a way to make such a reference page dynamic so that it always "pulls" and displays a real-time version of my Custom CSS. Is this something that I could do with a HTML block, or would it be impossible due to the Javascript prohibition?
I know that I can create a page, add a text-block to it and then copy/paste my Custom CSS into that text-block, but that's a static solution - every time I edit my CSS I'd have to edit the text-block content.
I was wondering if there's a way to make such a reference page dynamic so that it always "pulls" and displays a real-time version of my Custom CSS. Is this something that I could do with a HTML block, or would it be impossible due to the Javascript prohibition?
Yippee ki-yay, footer-muckers!
0
Comments
blocks, entire site, all folders, all galleries, just this page, etc. So even manually coping it would be a task.
JavaScript can not be used in NewSmug.
My Website index | My Blog
But hey, we like a challenge, don't we?
Please know in most cases, you can add one CSS block if you want to your entire site page and then address your changes by using specific classes and ids. This would be just like your Legacy site with this setup. This would allow you to contain all these details in one location. Now if you are making a page specific change you may need to add a css block there, however, if you are using a unique class or id, you can address this elsewhere, link on your entire site area again. You will likely want to use an html block instead of a text block for flexibility.
There is no way to pull css and html details into a page dynamically.
Thanks -Scott
Thanks for that, I might give it a shot
99% sure that you're right, and 100% sure that existing CSS details are pulled in when opening a CSS block to edit it, so perhaps there's a way of exploiting the content of the div which contains class="CodeMirror cm-s-ambiance.