mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
The ring drawn in the day button's own text colour was hard to see on themes whose day buttons are already a strong colour, such as wisteria's purple. Today now has its own fill, green with white text, forced over every theme (the custom theme colour sets the buttons' background with !important), with a white inset ring and the underline kept for colour-blind users. A day that is both today and selected keeps a visible green outline. Thanks to mimZD and xet7 ! Fixes #6751.
108 lines
3.2 KiB
CSS
108 lines
3.2 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, in every theme. Today
|
|
gets its OWN fill - green with white text - instead of a mark drawn on the
|
|
theme's fill: a ring in the button's text colour was too faint on themes
|
|
whose day buttons are already a strong colour (wisteria's purple, #6751
|
|
comment 6097142848). The fill and the text colour are !important because the
|
|
custom theme colour sets the picker buttons' background with !important; the
|
|
selector (0,4,1) is more specific than every theme's `.board-color-x
|
|
.selected-calendar-picker button.primary` (0,3,1), so it wins over all of
|
|
them. The white inset ring and the underline still mark it without colour
|
|
vision. Logical properties only: RTL-safe. */
|
|
.calendar-date-input .selected-calendar-picker button.js-calendar-day.is-today {
|
|
background: #2e7d32 !important;
|
|
color: #fff !important;
|
|
box-shadow: inset 0 0 0 2px #fff;
|
|
font-weight: bold;
|
|
text-decoration: underline;
|
|
text-decoration-thickness: 2px;
|
|
text-underline-offset: 3px;
|
|
}
|
|
/* Today and selected: the selected outline is drawn outside the button in
|
|
today's green, as white (the text colour) would vanish on a light popup. */
|
|
.calendar-date-input .selected-calendar-picker button.js-calendar-day.is-today[aria-pressed='true'] {
|
|
outline: 2px solid #2e7d32;
|
|
outline-offset: 2px;
|
|
}
|
|
.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;
|
|
}
|