-
- 17 Posts
The flexibility of TVs and output filters made me very interested in placing my CSS in a Resource rather than as a regular .CSS-file.
Are there any drawbacks of doing so? Will it put additional strain on the server, increase loading times or similar?
Thanks,
Nils
-
- 380 Posts
Why would you want to do this?
You can edit the .css file if it's an asset through the manager.
-
- 17 Posts
cipa,
Why is that the best solution? Are there performance issues with having your entire CSS as a Resource?
-
- 1,624 Posts
It's more about the caching of the CSS by the browsers.
I think in Revo you can setup file headers for resources that will emulate a real file so browsers will cache the css file and not request it on a different page. I'm not sure what your setup is, but if your css changes from page to page than I will definitely have a generic style.css file(as file) and add the custom CSS in the header or as a modx resource
Does it make sense?
-
- 17 Posts
I don't necessarily want to change it per page - the primary reason would be to simplify the design process so that I can change similar CSS values by changing a TV rather than "search + replace".
Being able to change background images through TVs would be nice, though. So I take it your suggestion would be to leave most CSS in a regular document and include the styles I want to edit through TVs in my document headers?
[ed. note: nilskaspersson last edited this post 11 years, 11 months ago.]