File tree Expand file tree Collapse file tree 5 files changed +39
-9
lines changed Expand file tree Collapse file tree 5 files changed +39
-9
lines changed Original file line number Diff line number Diff line change 44    "ng_module" ,
55    "ng_test_library" ,
66    "ng_web_test_suite" ,
7+     "sass_binary" ,
78)
89
910package (default_visibility  =  ["//visibility:public" ])
@@ -14,7 +15,7 @@ ng_module(
1415        ["**/*.ts" ],
1516        exclude  =  ["**/*.spec.ts" ],
1617    ),
17-     assets  =  glob (["**/*.html" ]),
18+     assets  =  [ ":dialog-container.css" ]  +   glob (["**/*.html" ]),
1819    deps  =  [
1920        "//src:dev_mode_types" ,
2021        "//src/cdk/a11y" ,
@@ -61,3 +62,8 @@ filegroup(
6162    name  =  "source-files" ,
6263    srcs  =  glob (["**/*.ts" ]),
6364)
65+ 
66+ sass_binary (
67+     name  =  "dialog_container_scss" ,
68+     src  =  "dialog-container.scss" ,
69+ )
Original file line number Diff line number Diff line change 1+ .cdk-dialog-container  {
2+   //  The container is a custom node so it'll be `display: inline` by default.
3+   display block ;
4+ 
5+   //  The dialog container should completely fill its parent overlay element.
6+   width 100%  ;
7+   height 100%  ;
8+ 
9+   //  Since the dialog won't stretch to fit the parent, if the height
10+   //  isn't set, we have to inherit the min and max values explicitly.
11+   min-height inherit ;
12+   max-height inherit ;
13+ }
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ export function throwDialogContentAlreadyAttachedError() {
4949@Component ( { 
5050  selector : 'cdk-dialog-container' , 
5151  templateUrl : './dialog-container.html' , 
52+   styleUrls : [ 'dialog-container.css' ] , 
5253  encapsulation : ViewEncapsulation . None , 
5354  // Using OnPush for dialogs caused some G3 sync issues. Disabled until we can track them down. 
5455  // tslint:disable-next-line:validate-decorators 
Original file line number Diff line number Diff line change 1- .demo-cdk-dialog  {
2-   background white ;
3-   padding 20px  ;
4-   border-radius 8px  ;
5- }
6- 
71.demo-container  {
82  button , label  {
93    margin-right 8px  ;
Original file line number Diff line number Diff line change @@ -75,8 +75,24 @@ export class DialogDemo {
7575      <button (click)="temporarilyHide()">Hide for 2 seconds</button> 
7676    </div> 
7777  ` , 
78-   encapsulation : ViewEncapsulation . None , 
79-   styles : [ `.hidden-dialog { opacity: 0; }` ] , 
78+   styles : [ 
79+     ` 
80+     :host { 
81+       background: white; 
82+       padding: 20px; 
83+       border-radius: 8px; 
84+       display: block; 
85+       width: 100%; 
86+       height: 100%; 
87+       min-width: inherit; 
88+       min-height: inherit; 
89+     } 
90+ 
91+     :host-context(.hidden-dialog) { 
92+       opacity: 0; 
93+     } 
94+   ` , 
95+   ] , 
8096  standalone : true , 
8197} ) 
8298export  class  JazzDialog  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments