vant/src/calendar/index.less

136 lines
2.2 KiB
Plaintext

@import '../style/var';
.van-calendar {
display: flex;
flex-direction: column;
height: 100%;
&__header {
flex-shrink: 0;
box-shadow: 0 2px 10px rgba(125, 126, 128, 0.16);
}
&__header-title,
&__month-title {
height: 44px;
font-weight: @font-weight-bold;
line-height: 44px;
text-align: center;
}
&__header-title {
font-size: @font-size-lg;
}
&__month-title {
font-size: @font-size-md;
}
&__weekdays {
display: flex;
}
&__weekday {
flex: 1;
font-size: @font-size-sm;
line-height: 30px;
text-align: center;
}
&__body {
flex: 1;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
&__days {
position: relative;
display: flex;
flex-wrap: wrap;
}
&__month-mark {
position: absolute;
top: 50%;
left: 50%;
z-index: -1;
color: @gray-2;
font-size: 160px;
transform: translate(-50%, -50%);
pointer-events: none;
}
&__day,
&__selected-day {
display: flex;
align-items: center;
justify-content: center;
}
&__day {
position: relative;
width: 14.285%;
height: 64px;
font-size: @font-size-lg;
cursor: pointer;
&--end,
&--start {
color: @white;
background-color: @red;
}
&--start {
border-radius: @border-radius-md 0 0 @border-radius-md;
}
&--end {
border-radius: 0 @border-radius-md @border-radius-md 0;
}
&--middle {
color: @red;
background-color: fade(@red, 10%);
}
&--disabled {
color: @gray-5;
cursor: default;
}
}
&__day-label {
position: absolute;
right: 0;
bottom: 6px;
left: 0;
font-size: @font-size-xs;
line-height: 14px;
text-align: center;
}
&__selected-day {
width: 54px;
height: 54px;
color: @white;
background: @red;
border-radius: @border-radius-md;
}
&__footer {
flex-shrink: 0;
padding: 0 @padding-md;
&--safe-area-inset-bottom {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
}
&__confirm {
height: 36px;
margin: 7px 0;
line-height: 34px;
}
}