File size: 5,873 Bytes
1e92f2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | .backup-date-picker {
display: flex;
align-items: stretch;
font-size: $font-body-small;
margin-bottom: 1rem;
flex-wrap: wrap;
@include breakpoint-deprecated( ">660px" ) {
flex-wrap: nowrap;
}
}
.backup-date-picker__select-date-container {
display: flex;
align-items: center;
padding: 0.5rem;
background: #fff;
box-shadow: 0 0 0 1px #dcdcde;
flex-grow: 1;
flex-basis: 100%;
}
.backup-date-picker__date-button-container {
position: relative;
flex-basis: 100%;
margin-top: 1rem;
@include breakpoint-deprecated( ">660px" ) {
flex-basis: auto;
flex-shrink: 0;
margin-top: 0;
margin-left: 1rem;
}
}
.backup-date-picker__select-date {
flex-grow: 1;
display: flex;
justify-content: space-between;
@include breakpoint-deprecated( ">660px" ) {
justify-content: flex-start;
}
// Variant when the calendar date picker is used
&--with-date-calendar-picker {
.backup-date-picker__select-date--previous,
.backup-date-picker__select-date--next {
@include breakpoint-deprecated( ">660px" ) {
max-width: none;
}
}
}
}
.backup-date-picker__select-date--previous,
.backup-date-picker__select-date--next {
display: flex;
flex: 1;
align-items: center;
cursor: pointer;
@include breakpoint-deprecated( ">660px" ) {
max-width: 153px;
}
}
.backup-date-picker__current-date {
display: flex;
align-items: center;
}
.backup-date-picker__select-date--previous {
text-align: left;
}
.backup-date-picker__select-date--next {
text-align: right;
@include breakpoint-deprecated( ">660px" ) {
justify-content: space-between;
}
}
.backup-date-picker__next-date-link {
display: flex;
flex: 1;
align-items: center;
}
.backup-date-picker__search-link {
display: flex;
align-items: center;
}
.backup-date-picker__button--next.button.is-borderless.is-compact,
.backup-date-picker__button--previous.button.is-borderless.is-compact {
.gridicon {
width: 24px;
height: 24px;
color: var(--studio-gray-70);
}
}
.button.backup-date-picker__button--previous {
margin-left: initial;
margin-right: 8px;
}
.button.backup-date-picker__button--next {
margin-left: 8px;
margin-right: initial;
}
.backup-date-picker__select-date .date-range {
flex: 1;
text-align: center;
max-width: 24px;
}
.button.is-primary.backup-date-picker__button--previous:focus,
.button.is-primary.backup-date-picker__button--next:focus {
box-shadow: none;
}
.backup-date-picker__select-date .button,
.backup-date-picker .date-range {
display: inline-block;
float: none;
}
.backup-date-picker .button .gridicon.disabled {
fill: #dcdcde;
}
.backup-date-picker__search-icon {
margin-left: 0.5rem;
cursor: pointer;
}
.backup-date-picker__display-date {
flex: 1;
user-select: none;
}
.backup-date-picker__display-date.disabled {
color: var(--studio-gray-10);
}
.filterbar__selection.button.is-borderless.is-compact .gridicon {
width: 24px;
height: 24px;
color: var(--studio-gray-70);
}
.backup-date-picker__search-icon.gridicon {
fill: currentColor;
}
.backup-date-picker__date-button-button {
width: 100%;
// Reiterate the button styles from wpcom to make them consistent in Jetpack cloud.
.is_jetpackcom & {
border: 1px solid var(--color-neutral-10);
border-radius: 2px;
font-weight: normal;
color: var(--color-neutral-70);
&:focus {
border-width: 1px;
}
&:not(:disabled):hover {
color: var(--color-neutral-70);
border-color: var(--color-neutral-20);
background: #fff;
}
}
svg {
margin-right: 0.5rem;
}
// Select date button should fill the height of the stretched container.
@include breakpoint-deprecated(">660px") {
height: 100%;
}
}
.backup-date-picker__date-button-picker {
position: relative;
z-index: 1;
width: 100%;
padding: 1rem;
background: #fff;
border-bottom: 1px solid #dcdcde;
box-sizing: border-box;
.backup-date-picker__picker-background-screen {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: #fff;
}
.date-picker {
position: relative;
z-index: 1;
}
&::before,
&::after {
content: "";
position: absolute;
bottom: 100%;
right: 65px;
width: 20px;
height: 20px;
background: #fff;
transform: rotate(45deg) translateX(75%);
display: none;
}
&::after {
z-index: -1;
box-shadow: 0 0 5px 1px #dcdcde;
}
// Overriding this rule specifically for backups output. ( the :not selectors add extra specificity )
// This is not totally ideal, but a bit better than stringing random selectors together to override specificity.
.DayPicker-Day.DayPicker-Day--is-selected:not(.DayPicker-Day--today):not(.DayPicker-Day--events) .date-picker__day,
// When today is the active day.
.DayPicker-Day.DayPicker-Day--is-selected.DayPicker-Day--today .date-picker__day,
.DayPicker-Day--is-selected .date-picker__day {
background-color: var(--studio-jetpack-green-50);
}
// Style Sundays the same as the other days
.DayPicker-Day--sunday:not(.DayPicker-Day--today):not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside) .date-picker__day {
color: var(--color-neutral-70);
}
// Show a small dot on the days that should have a backup available.
.DayPicker-Day:not(.DayPicker-Day--disabled) .date-picker__day {
position: relative;
&::after {
content: "";
display: block;
position: absolute;
bottom: 1px;
left: calc(50% - 2px);
width: 4px;
height: 4px;
border-radius: 2px;
background-color: var(--studio-gray-10);
}
}
// Change the color of the backup dot on the active day.
.DayPicker-Day:not(.DayPicker-Day--disabled).DayPicker-Day--is-selected .date-picker__day::after {
background-color: var(--studio-white);
}
@include breakpoint-deprecated(">660px") {
position: absolute;
right: 0;
width: 300px;
top: calc(100% + 1rem);
box-shadow: 0 0 5px 1px #dcdcde;
border: none;
&::before,
&::after {
display: block;
}
}
}
|