Skip to content

Commit

Permalink
fix non-touch styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba committed Apr 11, 2017
1 parent 0a75b3e commit a293b81
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/lib/datepicker/calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ $mat-calendar-weekday-table-font-size: 11px !default;

.mat-calendar-body {
padding: $mat-calendar-padding;
outline: none;
}

.mat-calendar-controls {
Expand Down
2 changes: 0 additions & 2 deletions src/lib/datepicker/datepicker-content.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<md-calendar cdkTrapFocus
[id]="datepicker.id"
[class.mat-datepicker-content-touch]="datepicker.touchUi"
[class.mat-datepicker-content-non-touch]="!datepicker.touchUi"
[startAt]="datepicker.startAt"
[minDate]="datepicker._minDate"
[maxDate]="datepicker._maxDate"
Expand Down
8 changes: 4 additions & 4 deletions src/lib/datepicker/datepicker-content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ $md-datepicker-touch-max-width: 778px;
$md-datepicker-touch-max-height: 800px;


.mat-datepicker-content {
.mat-datepicker-content-touch {
display: block;
// make sure the dialog scrolls rather than being cropped on ludicrously small screens
max-height: 80vh;
overflow: auto;
}

.mat-datepicker-content-touch {
.mat-datepicker-content-touch .mat-calendar {
width: $md-datepicker-touch-width;
height: $md-datepicker-touch-height;
min-width: $md-datepicker-touch-min-width;
Expand All @@ -35,11 +35,11 @@ $md-datepicker-touch-max-height: 800px;
max-height: $md-datepicker-touch-max-height;
}

.mat-datepicker-content-non-touch {
.mat-datepicker-content-non-touch .mat-calendar {
width: $md-datepicker-non-touch-calendar-width;
@include mat-elevation(8);
}

.mat-datepicker-content-dialog {
.mat-datepicker-content-dialog.mat-dialog-container {
padding: 0;
}
2 changes: 2 additions & 0 deletions src/lib/datepicker/datepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ let datepickerUid = 0;
styleUrls: ['datepicker-content.css'],
host: {
'[class.mat-datepicker-content]': 'true',
'[class.mat-datepicker-content-touch]': 'datepicker.touchUi',
'[class.mat-datepicker-content-non-touch]': '!datepicker.touchUi',
},
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down

0 comments on commit a293b81

Please sign in to comment.