-
Notifications
You must be signed in to change notification settings - Fork 107
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
Custom class injections #25
Comments
It would be implemented asap.. Very useful. Thanks |
That's exactly my use case as well and I was going to add that feature next, and possibly (if owner agrees) do a pull request. My idea was to add an option that can add additional cssClasses to different parts of the dialog. For instance the okButton or cancel-button. Something like (on top of my head)
With that solution your use case would also be covered, correct? |
Also a very good idea, highly customisable. But downside with injecting single classes on single elements is to have create single css classes for each / single element. Adding only one custom class on the parent and overriding child elements thru that class is kinda simple imo. Maybe even for theming whole dialog. But I think having chance to both options would be really nice. Btw thank you for the fast response @Godofbrowser :) |
@hjortzen that's equally a very good idea. But would mean too much configuration whereas a single css class can handle this and more. |
You're welcome @elibolonur :) |
@hjortzen I think we should go with the single Would you still be interested in sending a PR for this? cos as aways, PRs are welcome for our little plugin :) |
My use case is probably a little different. Also, we'd like to be able to change the heading size (h6) to something that complies better within our portal (h2 or h3), but that is outside the scope of being able to add css classes to components. But related in a way since our styling is done on h2 and h3 and we do not wish to repeat that styling for this specific dialog. Anyway, I'll start on something regarding the adding of CSS classes and see if I can come up with something. Using filters the DOM wouldn't get too cluttered either. We'll see! |
Potential solution added on this pull request #26 I guess its solving both hjortzen and my issue. Makes styling pretty flexible also :) |
Hi,
Very nice and useful plugin! In the project I am using the plugin, I have the case to call the modal a couple of times to confirm user actions. One of the dialogs is to confirm delete and another one is to save. So to have difference for confirmations I am overriding button colors (red on delete, green on save). The problem in this is that I have to inject different classes for styling (or <style> element inside the dialog initialization). Would you consider adding some custom class name injections in dialog initialization?
For example:
and remove-class will be injected to the div.dg-main-content, so we could override all other css thru this custom class. Just as an example, to have another solution like this would be nice :)
The text was updated successfully, but these errors were encountered: