From e33a45f19d6380599924a0000febe20a13566a2c Mon Sep 17 00:00:00 2001 From: Gerben Date: Thu, 6 Jun 2019 23:20:00 +0200 Subject: [PATCH 1/2] Vertically center 'close icon' again. It became wrongly vertically aligned in PR #1437. --- src/stylesheets/datepicker.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stylesheets/datepicker.scss b/src/stylesheets/datepicker.scss index 85630a617..e40b305f4 100644 --- a/src/stylesheets/datepicker.scss +++ b/src/stylesheets/datepicker.scss @@ -548,7 +548,8 @@ position: absolute; height: 16px; width: 16px; - top: 25%; + margin: -8px auto 0; + top: 50%; right: 7px; &::after { @@ -563,7 +564,6 @@ height: 16px; width: 16px; line-height: 1; - margin: -8px auto 0; padding: 2px; position: absolute; right: 0px; From 87c470a88aa6fdb45c71d819a53d009b8b8ab2cc Mon Sep 17 00:00:00 2001 From: Gerben Date: Thu, 6 Jun 2019 23:31:12 +0200 Subject: [PATCH 2/2] Epibrate css rules for close icon Just clean up a bit, make the ordering somewhat intuitive. --- src/stylesheets/datepicker.scss | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/stylesheets/datepicker.scss b/src/stylesheets/datepicker.scss index e40b305f4..aa2de4d8d 100644 --- a/src/stylesheets/datepicker.scss +++ b/src/stylesheets/datepicker.scss @@ -539,35 +539,33 @@ } .react-datepicker__close-icon { + cursor: pointer; background-color: transparent; border: 0; - cursor: pointer; outline: 0; padding: 0; - vertical-align: middle; position: absolute; + top: 50%; + right: 7px; height: 16px; width: 16px; margin: -8px auto 0; - top: 50%; - right: 7px; &::after { + cursor: pointer; background-color: $datepicker__selected-color; - border-radius: 50%; - bottom: 0; - box-sizing: border-box; color: #fff; - content: "\00d7"; - cursor: pointer; - font-size: 12px; + border-radius: 50%; + position: absolute; + top: 0; + right: 0; height: 16px; width: 16px; - line-height: 1; padding: 2px; - position: absolute; - right: 0px; + font-size: 12px; + line-height: 1; text-align: center; + content: "\00d7"; } }