-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
this dialog style is not work,seems no have #2228
Comments
These are the proper dialog styles. We recently switched to using flexbox to center the dialog (see #1962), instead of |
thank u very much. your mean is cleaning node_modules/@angular or node_modules/@angular/material and reinstalling this. |
angular version: 2.3.0 |
Both should do the trick. Also clearing the |
i need it in center , or i can custom this position. my css style maybe cause this problem? or not it's version problem? |
It should be in the center by default. I'm trying it out locally and it works fine. It's hard to know what is going on just by looking at a screenshot, but the following CSS rules are what makes it work, in addition to the ones that are set as inline styles: .md-overlay-container {
position: fixed;
z-index: 1000;
}
.md-overlay-container, .md-global-overlay-wrapper {
pointer-events: none;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.md-global-overlay-wrapper {
display: flex;
position: absolute;
z-index: 1000;
} If these aren't in your stylesheet, then it's probably outdated. |
It's not supposed to be in the |
I suspect that because this version of the style file is not loaded properly, you think there may be what causes it? |
I'll try what you just said |
Most likely, I'm not sure what your setup is, although I can also see that some of your other CSS might be missing (e.g. the dialog backdrop is supposed to be dark, but yours looks transparent). |
i'm sorry. i did as yor said. but this problem is still exist. my node_module/@angluar/material/dialog
/*# sourceMappingURL=dialog-container.css.map */ is this .css file's problem??? |
The positioning styles that I pasted should be in the overlay styles. They should be at |
My bad, looks like the overlay styles are in the generated theme files. Do you use the theming? You can see how to set it up in our guide: https://github.com/angular/material2/blob/master/docs/theming.md. You only need to include one of the pre-built themes. |
its my error.i didnt use this reference theme file.i will try it again.thank u very much. |
this problem is solved, thank u very much for your patience |
I basically have the same problem (beta version). Will styles be moved to the component itself or will it be mandatory to use theming as described before? |
Some of these styles don't have a corresponding component @Cleudi, hence why they are added to the theme. Also even if we did move the structural styles away from the theme, your app probably wouldn't look good either since all of the color-related styles are there. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
i use your demo code , but the css style is wrong, can you tell me that what are the possible causes of this error.
demo link:
https://github.com/angular/material2/blob/master/src/demo-app/dialog/dialog-demo.ts
error style:
expect style:
like this
i need your help
The text was updated successfully, but these errors were encountered: