Hello,
I need to understand what cssSweet is for.
If someone use it, could you please explain me in simple words how it works.
Thanks!
-
☆ A M B ☆
- 24,524 Posts
It's a way to use a chunk to edit a specified .css file.
The chunk uses placeholders and custom output modifiers. The plugin re-writes the .css file when the Site->Clear Cache menu item is used to clear the cache.
-
☆ A M B ☆
- 24,524 Posts
No. Use ClientConfig, and settings tags: [[++text_blue]]
-
☆ A M B ☆
- 24,524 Posts
I have modified it to use resources in a specified context, and to work with OnDocFormSave instead of the site_refresh event. The chunk just has a pdoResources snippet call to gather up all the CSS resource content for the plugin to process as usual.
With this modification, you can assign a template to these resources and use TVs.
I'll be demonstrating this RO.IDEs-based system at the MODX Weekend in a few more days.
well in fact i cannot use setting tags in this case.
i use getresource to make a list of ressources. i want to be able to assign a specific color to a div, ressource by ressource.
that is probably what you have done?
-
☆ A M B ☆
- 24,524 Posts
The cssSweet plugin only writes to a .css file. What you want to do cannot be done from an external .css file.
You can use a TV to set classnames in the div, then style those classnames in your .css file.
<div class="[[+tv.divClass]]">
-
☆ A M B ☆
- 24,524 Posts
That's what the mashup of RO.IDEs and CssSweet is all about. It simplifies the management of your CSS, putting the actual CSS code in a context with CSS-type resources, and automatically writing a compressed .css file from their contents. Organize the resources any way you like.
The trick is in the chunk, the output of which is compressed and written to your .css file by the plugin. I use pdoResources, you can use getResources if you prefer.
[[pdoResources?
&context=`stylesheet`
&parents=`0`
&includeContent=`1`
&tpl=`@CODE [[+content]]`
]]