-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Theming is not inherited by dialogs #1399
Comments
That sounds like an intuitive UX. |
@rschmukler - has this been fixed already? |
@hkgrani the theme is inherited from the parent container that you put the element in. ie. if you specify a parent, the dialog will have the same theme as the parent. I'm not sure if I think that inheriting from the invoking button / event is that intuitive, in that, just because a button has a different theme doesn't mean that a dialog that it spawns should have a context different than the application wide context (default). I think I'd rather force an explicit configuration than infer something that I'm not sure most developers would expect to happen. I'm open to hearing thoughts to the contrary, if I am the only one that that wouldn't be intuitive to. |
@rschmukler my understanding is that for dialogs you do not currently inherit the theme from the parent container. I think the reason for that is that the dialog (.md-dialog-container) are put as a direct child to the body tag and not as a child to the element where it was invoked. Google documents, Inbox for gmail and Google play store are all examples of complex apps that use colors/theming to help the user understand what part of the application they are in. Building something like this in anguar material you could specify a different theme per main route (green for apps, red for films, blue for books etc). In this scenario (I think) dialog would be the only component that would break the "theme inheritance chain". Themes for custom dialogs could be set "manually" or dynamically if templates are shared across routes. For simple dialogs I see no way to set theme though Looking at the documentation one more time I see that there is an option to set the parent element. Setting that to something other than document.body may help for theming but I am afraid that would break the backdrop or something similar Anyways, its not a big problem and I may have misunderstood or are using the components wrongly. If no one else see a use for a "inherit theming" option I am fine with that. |
Not sure if it merits a separate issue or not, but theming also is not inherited by |
Can anyone confirm that this is related to #5899? |
Have a look at the plunk : http://plnkr.co/edit/VRvi9JCq7I81QvtTTP94?p=preview
Dialogs will use "default" theme
For custom dialogs you can set theming but it would be nice if it could be inherited by the theme "state" from where the dialog was invoked
The text was updated successfully, but these errors were encountered: