New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
outsource note styles to css #9
Comments
But these variables can be configured on the fly from the back-panel configuration. Some are embebed in the style attribute of the element, and others are adding or removing css classes, for example the "3d" style, the textshadow, etc. Do you have any idea about it? |
Basically you should not define CSS in the plugin. Instead, just add CSS classes to an element. That allows designers to style notes with pure CSS, they just need to know what class will be added to what element. Take this project as an example. It highlights keywords. Now in your way this plugin would just offer to change e.g. the color with an option. But this will mix up styling and scripting, which is bad. Also it makes it harder to maintain and integration can be difficult. On top, as I already said, when designers want to add CSS that your plugin doesn't provide, they would have to adjust the plugin. This is why this project simply allows to pass a class name. Then styling is a completely separate thing and nothing is mixed together. The plugin should allow users to define there own CSS for the look and feel of notes. This includes options like |
For me, this is the most fundamental issue. Customers expect a feature to look like their StyleGuide and styling a note with the current implementation seems to be expensive and cumbersome, functions and styles should be splitted (JS, CSS) as long as possible. |
Sorry, I was working to outsource the note style to a css class. Still much work to be done, but when you can, If you take a look at this branch and tell me if I'm in the right direction. https://github.com/txusko/PostItAll/tree/Outsource-note-styles-to-css |
@txusko Thank you for your work! I've seen there's a great progress. Unfortunately I'm currently not able to review the things due to lack of time. |
Don't worry @julmot I'll continue working and try to do my best. 👍 |
Branch d6a7a82 merged & new version published. |
The documentation shows how to style a note:
However, this seems to be not really modern. If you want to style your note you will come to a point, where things like that aren't enough (e.g. you could need a box-shadow).
The way a note looks should be defined in a CSS class instead of a JS configuration.
The text was updated successfully, but these errors were encountered: