Originally posted as a GitHub issue:

This is just a suggestion for something that I've found extremely useful.

In my own private fork of Mezzanine I've added an 'extra_css' field to 
RichTextPage and Form so that new CSS can be injected via the admin panel. 
This has proven to be very valuable as it makes it much easier for admins 
to do minor CSS tweaks to a new page (color changes for headers, image 
margins, etc) without requiring a custom template to be rolled and deployed.

Is there any interest in adding this to Mezzanine? The changes are pretty 
minor, just an extra field on the models and a change to the templates to 
include an extra style section if the extra CSS exists and inject it (after 
escaping).

I know there is RICHTEXT_ALLOWED_STYLES to allow inline styles, but for any 
page with a decent amount of content (FAQ page, About Us page, etc) this is 
a painful and fragile way to apply CSS. It also doesn't allow tweaking 
elements in the template itself (like button color on a Form).

And stephenmcd's response:

I just don't think it belongs on the model - it's a template level thing 
> that can already be customised per model/instance (via custom templates).
>
 

Probably better to post this to the mailing list though.


To continue the discussion, in which way is this a template level thing? 
Are you saying the custom CSS should be directly included in a custom 
template for the model/instance?

The point of adding it to the model is so it can be customized via the 
admin, and not require a developer and site push to change some CSS. 
Shouldn't require developer access to tweak some CSS on a new RichTextPage 
being added to the site, unless I'm missing an easy way to add custom 
templates from the admin?

Anyone else have thoughts?

- David

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to