Fix/daterangepicker css (#4418)

* added styles from external stylesheet

* fixed a border color

* codacy improvements

* more codacy fix

* codacy why u be so dumb
pull/4409/head^2
Syed Ali Shahbaz 2022-09-13 15:02:27 +05:30 committed by GitHub
parent 140bb3836a
commit b2d3432438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 138 additions and 35 deletions

View File

@ -1,9 +1,114 @@
.react-calendar {
width: 350px;
max-width: 100%;
background: white;
border: 1px solid #e5e7eb;
font-family: Arial, Helvetica, sans-serif;
line-height: 1.125em;
}
.react-calendar,
.react-calendar *,
.react-calendar ::before,
.react-calendar ::after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.react-calendar--doubleView {
width: 700px;
}
.react-calendar--doubleView .react-calendar__viewContainer {
display: flex;
margin: -0.5em;
}
.react-calendar--doubleView .react-calendar__viewContainer > * {
width: 50%;
margin: 0.5em;
}
.react-calendar button {
margin: 0;
border: 0;
outline: none;
}
.react-calendar__navigation {
display: flex;
height: 44px;
margin-bottom: 1em;
}
.react-calendar__navigation button {
min-width: 44px;
background: none;
}
.react-calendar button:enabled:hover {
cursor: pointer;
}
.react-calendar__navigation button:disabled {
background-color: #f0f0f0;
}
.react-calendar__navigation button:enabled:hover,
.react-calendar__navigation button:enabled:focus {
background-color: #e5e7eb;
color: #111827;
}
.react-calendar__tile {
max-width: 100%;
padding: 10px 6.6667px;
background: none;
text-align: center;
line-height: 16px;
}
.react-calendar__month-view__weekdays {
text-align: center;
text-transform: uppercase;
font-weight: bold;
font-size: 0.75em;
}
.react-calendar__month-view__weekdays__weekday {
padding: 0.5em;
}
.react-calendar__month-view__weekNumbers .react-calendar__tile {
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75em;
font-weight: bold;
}
.react-calendar__year-view .react-calendar__tile,
.react-calendar__decade-view .react-calendar__tile,
.react-calendar__century-view .react-calendar__tile {
padding: 2em 0.5em;
}
.react-calendar__tile:disabled {
background-color: #f0f0f0;
}
.react-calendar__tile:enabled:hover,
.react-calendar__tile:enabled:focus {
background-color: #e6e6e6;
}
.react-daterange-picker > .react-daterange-picker__wrapper { .react-daterange-picker > .react-daterange-picker__wrapper {
padding: .625rem .75rem; padding: 0.625rem 0.75rem;
font-size: .875rem; font-size: 0.875rem;
line-height: 1.25rem; line-height: 1.25rem;
border-radius: .375rem; border-radius: 0.375rem;
border-color: #E5E7EB; border-color: #e5e7eb;
width: 360px; width: 360px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -18,12 +123,13 @@
.react-daterange-picker > .react-daterange-picker__wrapper > .react-daterange-picker__inputGroup { .react-daterange-picker > .react-daterange-picker__wrapper > .react-daterange-picker__inputGroup {
height: auto; height: auto;
} }
.react-daterange-picker.react-daterange-picker--disabled { .react-daterange-picker.react-daterange-picker--disabled {
background-color: transparent; background-color: transparent;
} }
.react-daterange-picker.react-daterange-picker--disabled > .react-daterange-picker__wrapper { .react-daterange-picker.react-daterange-picker--disabled > .react-daterange-picker__wrapper {
background-color: #F3F4F6; background-color: #f3f4f6;
} }
.react-daterange-picker > .react-daterange-picker__wrapper:focus-within, .react-daterange-picker > .react-daterange-picker__wrapper:focus-within,
@ -32,22 +138,21 @@
border-width: 2px; border-width: 2px;
} }
.react-daterange-picker > .react-daterange-picker__wrapper input { .react-daterange-picker > .react-daterange-picker__wrapper input {
margin: 0; margin: 0;
height: auto; height: auto;
border-radius: .125rem; border-radius: 0.125rem;
} }
.react-daterange-picker__calendar.react-daterange-picker__calendar--open { .react-daterange-picker__calendar.react-daterange-picker__calendar--open {
width: 360px; width: 360px;
} }
.react-daterange-picker__calendar > .react-calendar{ .react-daterange-picker__calendar > .react-calendar {
padding: 0.5rem; padding: 0.5rem;
border-radius: 0.375rem; border-radius: 0.375rem;
border-width: 1px; border-width: 1px;
border-color: #E5E7EB; border-color: #e5e7eb;
width: 360px; width: 360px;
margin-top: 4px; margin-top: 4px;
} }
@ -93,16 +198,15 @@
} }
button.react-calendar__tile.react-calendar__month-view__days__day { button.react-calendar__tile.react-calendar__month-view__days__day {
flex : 0 0 13.25% !important; flex: 0 0 13.25% !important;
border-radius: 0.375rem; border-radius: 0.375rem;
padding-top: 13px; padding-top: 13px;
padding-bottom: 13px; padding-bottom: 13px;
position: relative; position: relative;
} }
.react-calendar__tile--now,
.react-calendar__tile.react-calendar__tile--hover:not(.react-calendar__tile--active) { .react-calendar__tile.react-calendar__tile--hover:not(.react-calendar__tile--active) {
background-color: #E5E7EB !important; background-color: #e5e7eb !important;
} }
.react-calendar__month-view__days > .react-calendar__tile.react-calendar__tile--hasActive, .react-calendar__month-view__days > .react-calendar__tile.react-calendar__tile--hasActive,
@ -124,9 +228,8 @@ button.react-calendar__tile.react-calendar__month-view__days__day {
color: #9ca3af; color: #9ca3af;
} }
.react-calendar__tile--now::before { .react-calendar__tile--now::before {
content:"\A"; content: "\A";
width: 4px; width: 4px;
height: 4px; height: 4px;
border-radius: 50%; border-radius: 50%;
@ -140,16 +243,16 @@ button.react-calendar__tile.react-calendar__month-view__days__day {
button.react-calendar__tile.react-calendar__month-view__days__day:hover, button.react-calendar__tile.react-calendar__month-view__days__day:hover,
.react-calendar__tile.react-calendar__year-view__months__month:hover { .react-calendar__tile.react-calendar__year-view__months__month:hover {
background-color: #D1D5DB; background-color: #d1d5db;
color: #111827; color: #111827;
} }
.react-daterange-picker > .react-daterange-picker__wrapper:hover { .react-daterange-picker > .react-daterange-picker__wrapper:hover {
border-color: #9CA3AF; border-color: #9ca3af;
} }
.react-daterange-picker.react-daterange-picker--disabled > .react-daterange-picker__wrapper:hover { .react-daterange-picker.react-daterange-picker--disabled > .react-daterange-picker__wrapper:hover {
border-color: #E5E7EB; border-color: #e5e7eb;
} }
.react-calendar__navigation button.react-calendar__navigation__label:enabled:hover, .react-calendar__navigation button.react-calendar__navigation__label:enabled:hover,