Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit e7d8d1d

Browse files
crisbetoThomasBurleson
authored andcommitted
fix(datepicker): don't override global label size
* Fixes the datepicker overriding the global font size for the floating labels. * Fixes a couple of pixels being off on the alignment. * Removes unnecessary styles on the input demo. Fixes #8760. Closes #8762
1 parent 83b7e66 commit e7d8d1d

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/components/datepicker/datePicker.scss

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ $md-datepicker-open-animation-duration: 0.2s !default;
66
$md-datepicker-triangle-button-width: 36px !default;
77
$md-datepicker-input-mask-height: 40px !default;
88

9-
// The datepickers triangle icon uses the default button margin.
10-
// We need to use the margin to align the label inside of an input container properly.
11-
$icon-button-margin: rem(0.600) !default;
129

1310
md-datepicker {
1411
// Don't let linebreaks happen between the open icon-button and the input.
@@ -38,7 +35,7 @@ md-datepicker {
3835
}
3936

4037
// The input into which the user can type the date.
41-
.md-datepicker-input, label:not(.md-no-float):not(._md-container-ignore) {
38+
.md-datepicker-input {
4239
@include md-flat-input();
4340
min-width: 120px;
4441
max-width: $md-calendar-width - $md-datepicker-button-gap;
@@ -47,10 +44,11 @@ md-datepicker {
4744
// If the datepicker is inside of a md-input-container
4845
._md-datepicker-floating-label {
4946
> label:not(.md-no-float):not(._md-container-ignore) {
50-
$offset: $md-datepicker-triangle-button-width * 2 + $md-datepicker-button-gap + $icon-button-margin + $baseline-grid;
51-
@include rtl(right, $icon-button-margin, auto);
52-
@include rtl(left, auto, $icon-button-margin);
53-
width: calc(100% - #{$offset});
47+
$width-offset: $md-datepicker-triangle-button-width * 2 + $md-datepicker-button-gap;
48+
$offset: $md-datepicker-triangle-button-width / 2;
49+
@include rtl(right, $offset, auto);
50+
@include rtl(left, auto, $offset);
51+
width: calc(100% - #{$width-offset});
5452
}
5553

5654
> md-datepicker {

src/components/input/demoBasicUsage/style.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)