Code cleanup.

This commit is contained in:
Bryan Mauger 2022-10-13 08:40:10 -04:00
parent deea1abbe3
commit d0ba0aa8ee

View file

@ -41,7 +41,9 @@
</div>
<div class="grid-item radio-wrapper">
<input tabindex="0" type="radio" name="day-of-month" id="oct-1" />
<label class="highlighted-day selectable-day" :class="[isCurrentDay ? 'current-day' : '']" for="oct-1"><span>1</span></label>
<label class="highlighted-day selectable-day" :class="[isCurrentDay ? 'current-day' : '']" for="oct-1"><span>1</span>
<span class="sr-only">October 1st</span>
</label>
<div v-if="isFirstDayOfMonth" class="current-month first-day">OCT</div>
</div>
<div class="grid-item radio-wrapper">
@ -195,15 +197,10 @@ export default {
name: "datePicker",
data() {
return {
dayOfWeek: "Tuesday",
dayOfMonth: "1st",
pastMonth: "October",
currentMonth: "October",
currentYear: "2022",
isFirstDayOfMonth: true,
isCurrentDay: true,
isCurrentDayDot: true,
isPastDay: true,
};
},
};
@ -214,7 +211,6 @@ export default {
margin: 0 auto;
max-width: 414px;
display: grid;
//grid-template-columns: auto auto auto auto auto auto auto;
grid-template-columns: repeat(7, 1fr);
justify-content: center;
align-items: center;
@ -306,6 +302,7 @@ export default {
&:focus-visible + label {
box-shadow: 0 0 0 2.5px $blue;
}
&:focus + label,
&:checked:focus + label {
box-shadow: 0 0 0 3px #fff, 0 0 0 5.5px #1574a1;
@ -326,6 +323,7 @@ export default {
}
}
}
&:checked + label {
color: $white;
background: $blue;
@ -337,10 +335,6 @@ export default {
color: $white;
}
}
&:checked + label p,
&:checked + label span {
//font-weight: 500;
}
}
.first-day {
@ -352,7 +346,6 @@ export default {
z-index: 1;
}
label {
position: relative;
cursor: pointer;
@ -425,14 +418,10 @@ export default {
color: $white;
}
}
+ p {
display: none;
}
}
}
}
</style>
</style>