Files
wekan/client/components/forms/calendarDateInput.css
T
Lauri Ojansivu 519fb2c105 Mark today in the date popup calendar and the board Calendar view.
The due/start/end date popup's calendar now gives today's day button the
is-today class and aria-current="date", and its cell is-today-cell. Today
gets a ring and underline in the button's own text colour plus a subtle cell
tint, so it stays visible in every board colour theme, light and dark, and
in RTL. The board Calendar view keeps FullCalendar's today tint and also
marks today's day number with the board theme's colour.

Thanks to mimZD and xet7 !

Fixes #6751,
2026-10-08 00:01:56 +03:00

99 lines
2.7 KiB
CSS

.calendar-date-input {
min-width: 0;
width: 100%;
}
.calendar-date-input > input,
.calendar-date-input > .js-calendar-toggle {
box-sizing: border-box;
max-width: 100%;
}
.selected-calendar-picker {
background: inherit;
color: inherit;
margin-block: 8px;
width: 100%;
}
.selected-calendar-heading {
align-items: center;
display: flex;
gap: 3px;
justify-content: space-between;
}
.selected-calendar-heading span {
flex: 1;
text-align: center;
}
.selected-calendar-heading button,
.selected-calendar-picker .js-calendar-day {
margin: 0;
min-width: 24px;
padding: 4px;
}
.calendar-date-input .selected-calendar-picker table {
table-layout: fixed;
width: 100%;
border-collapse: collapse;
color: inherit;
}
.calendar-date-input .selected-calendar-picker table th {
font-size: calc(10px * var(--wekan-ui-font-scale, 1));
overflow: hidden;
text-overflow: ellipsis;
}
.calendar-date-input .selected-calendar-picker table td {
text-align: center;
padding: 2px;
}
.selected-calendar-picker td .js-calendar-day {
box-sizing: border-box;
width: 100%;
min-width: 0;
min-height: 36px;
padding: 4px 0;
}
.selected-calendar-picker .js-calendar-day[aria-pressed='true'] {
font-weight: bold;
outline: 2px solid currentColor;
}
/* #6751: today's day is distinct from every other day. The ring and the
underline are drawn in the button's OWN text colour (currentColor), so they
contrast with whatever fill a board colour theme, dark mode or a custom theme
colour gives the day buttons - the fills differ per theme, some with
!important, but each theme already keeps its text readable on its fill. The
selector is more specific than the themes' `.board-color-x
.selected-calendar-picker button.primary` (0,3,1) rules so a theme's
box-shadow or font-weight cannot hide it. Selected day keeps its outline
outside, so today + selected shows both. Logical properties only: RTL-safe. */
.calendar-date-input .selected-calendar-picker button.js-calendar-day.is-today {
box-shadow: inset 0 0 0 3px currentColor;
font-weight: bold;
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 3px;
}
.calendar-date-input .selected-calendar-picker td.is-today-cell {
background: color-mix(in srgb, currentColor 15%, transparent);
border-radius: 9px;
}
.calendar-date-input button:focus-visible,
.calendar-time-input select:focus-visible,
.calendar-date-input input:focus-visible {
outline: 2px solid currentColor;
outline-offset: 2px;
}
.calendar-time-input {
align-items: center;
display: flex;
gap: 4px;
}
.calendar-time-input select {
flex: 1;
min-width: 0;
margin-bottom: 0;
padding-inline: 4px;
}
.selected-calendar-heading .selected-calendar-date {
margin-inline-start: 4px;
}