Added settings controlpanel with custom css field#68
Conversation
|
Yes, it works exactly the same. It would probably actually be better to expose the custom css in the theming controlpanel, instead of having a new field, but I don't know how to get that data. Probably the Theming controlpanel should be made available in volto with just the custom css field, but again I don't know how :D |
|
@pnicolli Correct me if I'm wrong, but the action should be added as a content extender, then be extracted from there. Otherwise, in SSR the CSS won't be there, then a FUOC would happen. I know, because we've been experimenting with this as well. In fact, not with full arbitrary CSS, but with specific properties (eg. colors, fonts, etc), that we injected as CSS properties in the body itself as an inline style. For the arbitrary CSS use case I'd also have a code editor (the one in HTML block would be great), and a formatter in the control panel widget. |
|
@pnicolli I love the idea! Cannot comment on how to best pull it off but that feature would bring even more power to TTW editors like me. A killer feature, for sure 👍 |

The frontend had a custom-css handler when we submitted the code, that is now creating errors in the browser because the corresponding backend service is missing. This PR solves the issue by adding the needed controlpanel and service, which I believe can be beneficial in the future.
The idea is to add a Plone.org Settings controlpanel, that has a Custom CSS field, used to add custom css to the site whenever needed in order to possibly make it faster to have custom styles or fixes.
Let me know if you like the idea, if anything is missing/wrong in the implementation (my backend-fu is not so good) and if you like the idea I will also produce an upgrade step for this.