devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
307 lines (251 loc) • 8.1 kB
text/less
/**
* DevExtreme (widgets/generic/calendar.generic.less)
* Version: 20.1.4
* Build date: Tue Jun 02 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
@import (once) "./button.generic.less";
.dx-size-default() {
@GENERIC_CALENDAR_CELL_FONT_SIZE: 15px;
@GENERIC_CALENDAR_BODY_WIDTH: 282px;
@GENERIC_CALENDAR_BODY_HEIGHT: 205px;
@GENERIC_CALENDAR_BODY_TOP: 52px;
@GENERIC_CALENDAR_FOOTER_HEIGHT: 45px;
@GENERIC_CALENDAR_NAVIGATOR_VERTICAL_PADDING: 9px;
@GENERIC_CALENDAR_NAVIGATOR_HEIGHT: 36px;
@GENERIC_CALENDAR_HEADER_BOTTOM_PADDING: 6px;
@GENERIC_CALENDAR_CELL_HORIZONTAL_PADDING: 8px;
@GENERIC_NAV_BUTTON_WIDTH: 32px;
@GENERIC_CALENDAR_CAPTION_BUTTON_PADDING: 2px 15px 4px;
}
.dx-size-compact() {
@GENERIC_CALENDAR_CELL_FONT_SIZE: 13px;
@GENERIC_CALENDAR_BODY_WIDTH: 232px;
@GENERIC_CALENDAR_BODY_HEIGHT: 175px;
@GENERIC_CALENDAR_BODY_TOP: 42px;
@GENERIC_CALENDAR_FOOTER_HEIGHT: 35px;
@GENERIC_CALENDAR_NAVIGATOR_VERTICAL_PADDING: 4px;
@GENERIC_CALENDAR_NAVIGATOR_HEIGHT: 30px;
@GENERIC_CALENDAR_HEADER_BOTTOM_PADDING: 2px;
@GENERIC_CALENDAR_CELL_HORIZONTAL_PADDING: 3px;
@GENERIC_NAV_BUTTON_WIDTH: 24px;
@GENERIC_CALENDAR_CAPTION_BUTTON_PADDING: 3px 3px;
}
@GENERIC_CALENDAR_NAVIGATOR_FONTSIZE: @GENERIC_H5_FONT_SIZE;
@GENERIC_CALENDAR_NAVIGATOR_LINE_HEIGHT: 1.6;
@GENERIC_CALENDAR_WIDTH: @GENERIC_CALENDAR_BODY_WIDTH;
@GENERIC_CALENDAR_HEIGHT: @GENERIC_CALENDAR_BODY_HEIGHT + @GENERIC_CALENDAR_NAVIGATOR_FONTSIZE * @GENERIC_CALENDAR_NAVIGATOR_LINE_HEIGHT + @GENERIC_CALENDAR_NAVIGATOR_VERTICAL_PADDING * 2;
.dx-calendar {
width: @GENERIC_CALENDAR_WIDTH;
min-width: @GENERIC_CALENDAR_WIDTH;
height: @GENERIC_CALENDAR_HEIGHT + 20px;
min-height: @GENERIC_CALENDAR_HEIGHT + 20px;
background-color: @calendar-bg;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
outline: 0;
border: 1px solid transparent;
&.dx-calendar-with-footer {
height: @GENERIC_CALENDAR_HEIGHT + @GENERIC_CALENDAR_FOOTER_HEIGHT + 10px + 20px;
min-height: @GENERIC_CALENDAR_HEIGHT + @GENERIC_CALENDAR_FOOTER_HEIGHT;
.dx-calendar-body {
bottom: @GENERIC_CALENDAR_FOOTER_HEIGHT + 10px;
}
.dx-calendar-footer {
text-align: center;
height: @GENERIC_CALENDAR_FOOTER_HEIGHT;
width: 100%;
.dx-button {
background: none;
&.dx-state-active {
background-color: @calendar-button-footer-active-bg;
}
}
}
}
}
.dx-calendar-navigator {
line-height: @GENERIC_CALENDAR_NAVIGATOR_LINE_HEIGHT;
height: @GENERIC_CALENDAR_NAVIGATOR_HEIGHT;
display: table;
border-collapse: collapse;
.dx-button {
height: 100%;
border-radius: 0;
display: table-cell;
border-color: @calendar-navigator-border-color;
.dx-icon {
font-size: @GENERIC_CALENDAR_NAVIGATOR_FONTSIZE;
}
&.dx-calendar-disabled-navigator-link {
border-collapse: collapse;
visibility: visible;
opacity: 1;
.dx-button-content {
opacity: 0.5;
}
}
&.dx-state-active:not(.dx-calendar-disabled-navigator-link) {
z-index: 1;
}
&.dx-state-hover:not(.dx-calendar-disabled-navigator-link) {
z-index: 1;
border-color: @calendar-navigator-hover-border-color;
}
}
.dx-calendar-caption-button {
font-size: @GENERIC_CALENDAR_NAVIGATOR_FONTSIZE;
font-weight: bold;
line-height: 1.2;
text-transform: uppercase;
right: @GENERIC_NAV_BUTTON_WIDTH;
left: @GENERIC_NAV_BUTTON_WIDTH;
&.dx-button {
&.dx-state-active {
background-color: @calendar-button-caption-active-bg;
}
.dx-button-content {
padding: @GENERIC_CALENDAR_CAPTION_BUTTON_PADDING;
color: @calendar-button-caption-color;
}
}
}
}
.dx-calendar-navigator-previous-month {
width: @GENERIC_NAV_BUTTON_WIDTH;
background: none;
&.dx-button {
margin: 0 2px;
}
.dx-button-content {
padding: 0;
}
&.dx-state-hover {
z-index: 1;
}
}
.dx-calendar-navigator-previous-month,
.dx-calendar-navigator-next-view {
width: @GENERIC_NAV_BUTTON_WIDTH;
background: none;
&.dx-button {
margin: 0 1px;
}
.dx-button-content {
padding: 0;
}
}
.dx-calendar-navigator-previous-view,
.dx-calendar-navigator-previous-month {
left: 0;
&.dx-button {
border-radius: @calendar-navigator-border-radius 0 0 @calendar-navigator-border-radius;
.dx-icon {
color: @calendar-shevron-icon-color;
}
}
}
.dx-calendar-navigator-next-view,
.dx-calendar-navigator-next-month {
right: 0;
&.dx-button {
border-radius: 0 @calendar-navigator-border-radius @calendar-navigator-border-radius 0;
.dx-icon {
color: @calendar-shevron-icon-color;
}
}
}
.dx-calendar-body {
top: @GENERIC_CALENDAR_BODY_TOP;
thead {
font-size: 10px;
font-weight: bold;
text-transform: uppercase;
line-height: 1.2;
tr {
height: 25px;
padding-bottom: 10px;
th {
box-shadow: inset 0 -1px 0 @calendar-border-color;
color: @calendar-header-color;
}
}
}
table {
border-spacing: 0;
th {
color: @calendar-header-color;
text-align: center;
font-size: @GENERIC_XS_FONT_SIZE;
padding: 1px 0 @GENERIC_CALENDAR_HEADER_BOTTOM_PADDING 0;
}
}
}
.dx-calendar-cell {
text-align: center;
padding: 1px @GENERIC_CALENDAR_CELL_HORIZONTAL_PADDING 2px;
color: @calendar-color;
font-size: @GENERIC_CALENDAR_CELL_FONT_SIZE;
border: 1px double transparent;
width: 39px;
border-radius: @calendar-cell-contoured-border-radius;
&.dx-calendar-today {
font-weight: bold;
}
&.dx-state-hover {
box-shadow: inset 0 -1px 0 1000px @calendar-hover-bg;
color: @calendar-cell-hover-color;
}
&.dx-calendar-other-view:not(.dx-calendar-selected-date),
&.dx-calendar-empty-cell:not(.dx-calendar-selected-date) {
color: @calendar-cell-other-color;
&.dx-state-hover,
&.dx-state-active {
color: @calendar-cell-other-hover-color;
}
}
&.dx-calendar-empty-cell {
cursor: default;
background: @calendar-cell-empty-bg;
&.dx-state-hover:not(.dx-calendar-selected-date) {
box-shadow: none;
}
}
&.dx-state-active {
&:not(.dx-calendar-empty-cell) {
&:not(.dx-calendar-selected-date) {
box-shadow: inset 0 -1px 0 1000px @calendar-cell-active-bg;
}
}
}
&.dx-calendar-contoured-date:not(.dx-calendar-empty-cell) {
box-shadow: inset 0 0 0 1px @calendar-cell-contoured-border-color;
}
&.dx-calendar-selected-date {
&,
&.dx-calendar-today {
color: @base-inverted-text-color;
box-shadow: inset 0 0 0 1000px @calendar-cell-selected-bg;
font-weight: normal;
&.dx-calendar-contoured-date {
box-shadow: inset 0 0 0 1px @calendar-cell-contoured-border-color, inset 0 0 0 1000px @calendar-cell-selected-bg;
}
}
}
}
.dx-invalid {
&.dx-calendar {
border-color: @calendar-invalid-faded-border-color;
&.dx-state-focused {
border-color: @calendar-invalid-focused-border-color;
}
}
}
.dx-popup-wrapper {
.dx-calendar {
.dx-calendar-caption-button {
margin: 0;
}
}
}