File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,13 @@ export class MenuDemo {
1919  selected  =  '' ; 
2020  items  =  [ 
2121    { text : 'Refresh' } , 
22-     { text : 'Settings' } , 
22+     { text : 'Settings with a longer name so we can test text wrapping ' } , 
2323    { text : 'Help' ,  disabled : true } , 
2424    { text : 'Sign Out' } 
2525  ] ; 
2626
2727  iconItems  =  [ 
28-     { text : 'Redial' ,  icon : 'dialpad' } , 
28+     { text : 'Redial with a longer name so we can test text wrapping ' ,  icon : 'dialpad' } , 
2929    { text : 'Check voicemail' ,  icon : 'voicemail' ,  disabled : true } , 
3030    { text : 'Disable alerts' ,  icon : 'notifications_off' } 
3131  ] ; 
Original file line number Diff line number Diff line change 1111  display  : flex ;
1212  flex-direction  : row ;
1313  max-width  : 100%  ;
14-   box-sizing  : border-box ;
1514  align-items  : center ;
1615  -webkit-tap-highlight-color  : transparent ;
1716
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ $mat-menu-icon-margin: 16px !default;
2828  line-height  : $mat-menu-item-height ;
2929  height  : $mat-menu-item-height ;
3030  padding  : 0  $mat-menu-side-padding ;
31+   box-sizing  : border-box ;
3132
3233  text-align  : left ;
3334  text-decoration  : none ;   //  necessary to reset anchor tags
Original file line number Diff line number Diff line change 55@import  ' ../../cdk/a11y/a11y'  ;
66
77$mat-menu-vertical-padding : 8px   !default ;
8+ $mat-menu-item-vertical-padding : 8px   !default ;
89$mat-menu-border-radius : 4px   !default ;
910$mat-menu-submenu-indicator-size : 10px   !default ;
1011
@@ -30,6 +31,17 @@ $mat-menu-submenu-indicator-size: 10px !default;
3031  @include  mat-menu-item-base ();
3132  position  : relative ;
3233
34+   //  TODO(crisbeto): most of these can be moved into the `mat-menu-item-base`
35+   //  once we start allowing text wrapping in mat-select and mat-autocomplete.
36+   display  : flex ;
37+   align-items  : center ;
38+   white-space  : normal ;
39+   line-height  : normal ;
40+   height  : auto ;
41+   min-height  : $mat-menu-item-height ;
42+   padding-top  : $mat-menu-item-vertical-padding ;
43+   padding-bottom  : $mat-menu-item-vertical-padding ;
44+ 
3345  @include  cdk-high-contrast  {
3446    & .cdk-program-focused ,
3547    & .cdk-keyboard-focused ,
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments