Skip to content

Commit

Permalink
fix(styles): datepicker misaligned calendar icon (#3145)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch committed Jun 19, 2024
1 parent e2c21e1 commit ea3fa47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/rich-buttons-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': patch
---

Fixed the misaligned calendar icon in the datepicker input field.
18 changes: 5 additions & 13 deletions packages/styles/src/components/datepicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,14 @@ span.ngb-dp-navigation-chevron {
}
}

.form-control-sm ~ .ngb-dp-open {
height: forms.$input-height-inner-sm;
width: forms.$input-height-inner-sm;

.pi-3203,
.pi-calendar,
post-icon {
width: datepicker.$ngb-dp-icon-size-sm;
height: datepicker.$ngb-dp-icon-size-sm;
}
}

.form-control-rg ~ .ngb-dp-open {
height: forms.$input-height-inner-rg;
width: forms.$input-height-inner-rg;
}

.form-floating > .ngb-dp-open,
.form-control-lg ~ .ngb-dp-open {
height: forms.$input-height-inner-lg;
height: calc(#{forms.$form-floating-height} - #{forms.$input-border-width * 2});
width: forms.$input-height-inner-lg;

.pi-3203,
Expand All @@ -193,6 +181,10 @@ span.ngb-dp-navigation-chevron {
}
}

.form-control-sm ~ .ngb-dp-open {
height: calc(#{forms.$form-floating-label-height-sm} - #{forms.$input-border-width * 2});
}

input[ngbDatepicker] {
// Hide the x on IE/Edge input fields
&::-ms-clear {
Expand Down

0 comments on commit ea3fa47

Please sign in to comment.