From 6242d62b430633b1dc6d01a7e70975e22e358e21 Mon Sep 17 00:00:00 2001 From: Tobias Date: Tue, 6 Aug 2019 16:45:25 +0200 Subject: [PATCH] fix: fix IE11 #date-picker sizing issue not showing days in correct weekday column --- .../__tests__/__snapshots__/DatePicker.test.js.snap | 5 ++++- .../src/components/date-picker/style/_date-picker.scss | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/dnb-ui-lib/src/components/date-picker/__tests__/__snapshots__/DatePicker.test.js.snap b/packages/dnb-ui-lib/src/components/date-picker/__tests__/__snapshots__/DatePicker.test.js.snap index a187abcf42e..0d79b008ad2 100644 --- a/packages/dnb-ui-lib/src/components/date-picker/__tests__/__snapshots__/DatePicker.test.js.snap +++ b/packages/dnb-ui-lib/src/components/date-picker/__tests__/__snapshots__/DatePicker.test.js.snap @@ -1753,7 +1753,8 @@ legend.dnb-form-label { justify-content: space-between; padding: 1rem; } .dnb-date-picker__labels__day { - padding: 1.5rem 0 0.5rem; } + padding-top: 1.5rem; + padding-bottom: 0.5rem; } .dnb-date-picker__labels, .dnb-date-picker__days { min-width: 18rem; max-width: 18rem; @@ -1854,6 +1855,8 @@ legend.dnb-form-label { @media screen and (-ms-high-contrast: none) { .dnb-date-picker { flex: none; } + .dnb-date-picker__day, .dnb-date-picker__labels__day { + flex-basis: 13.48571%; } .dnb-date-picker__day .dnb-button, .dnb-core-style .dnb-date-picker__day .dnb-button, .dnb-date-picker__day .dnb-button__bounding { top: 0; diff --git a/packages/dnb-ui-lib/src/components/date-picker/style/_date-picker.scss b/packages/dnb-ui-lib/src/components/date-picker/style/_date-picker.scss index 4d465d9fe08..371c35a1227 100644 --- a/packages/dnb-ui-lib/src/components/date-picker/style/_date-picker.scss +++ b/packages/dnb-ui-lib/src/components/date-picker/style/_date-picker.scss @@ -236,13 +236,13 @@ &__labels { &__day { - padding: 1.5rem 0 0.5rem; + padding-top: 1.5rem; + padding-bottom: 0.5rem; } } &__labels, &__days { - // min-width: 12rem; min-width: 18rem; max-width: 18rem; @@ -391,6 +391,12 @@ // IE fix @media screen and (-ms-high-contrast: none) { flex: none; + + &__day, + &__labels__day { + flex-basis: percentage(1 / 7) - 0.8; + } + &__day { .dnb-button { &,