Hi Jerry,
simpleSolutions.dk wrote:It works and what a wonderfull view only one stylesheet file for all plugins.
I'm glad you like it.

I forgot to mention a minor (?) issue: when inspecting the styling in the developer tools of a browser, the place of the definition doesn't point to the original file, so it might be harder to find and change the styles in the file. So if the combining of the plugin stylesheets will be implemented, it might be a good idea to allow to switch it off temporarily (another config option

).
simpleSolutions.dk wrote:I have no idea if it will be possible to parse urls from config.php into styesheet when joining stylesheets, but it will make the stylesheets a bit more flexible. Something like background-imege: url(cf_plugin[x][y]); and cf_plugin[x][y] contains an url.
Parsing the stylesheets for config options and replacing them with the actual values should be no problem. But I'm not sure, if it's reasonable to do so. Consider your example: if the user edits the stylesheet, it might be simpler to insert the URL directly, instead of changing it in the plugin config. If a plugin wants to give the user the possibility to change this in the configuration, it could output the config option as inline style:
- Code: Select all
$o .= '<div id="plugin_div" style="background-image: url(' . $plugin_cf['plugin']['option'] . ')">';
A user can still override this style in the stylesheet:
- Code: Select all
#plugin_div {background-image: url(./path/to/image) !important}
What do others think about the config options in the stylesheet?
Christoph