Last active
October 28, 2016 07:36
-
-
Save twome/1f9668f81d326fc3ce535015c871e765 to your computer and use it in GitHub Desktop.
Trello - Stronger "today" indicator for date-select mini-calendar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Stronger "today" indicator for date-select mini-calendar. | |
The current "today" indicator already has bold text, but that might be a bit subtle | |
for some users (especially those with vision impairments or poor font rendering). | |
This uses a coloured background and a faint light rim that remains when "today" | |
is also the selected day, to save users from having to select a different | |
day to double-check they have correctly selected "today". This also helps | |
for more instantly noticing the current day when skimming through months. | |
*/ | |
.pika-single .is-today:not(.is-selected) .pika-button { | |
background-color: #61BD4F; | |
box-shadow: inset 0px 0px 0px 3px #4b9e3b; | |
} | |
.pika-single .is-today.is-selected .pika-button { | |
box-shadow: inset 0px 0px 0px 3px rgba(255, 255, 255, 0.7); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Stronger "today" indicator for date-select mini-calendar. | |
Uses a coloured background and a faint light rim that remains when "today" | |
is also the selected day, to save users from having to select a different | |
day to double-check they have correctly selected "today". | |
*/ | |
$trello-brand-color-green: #61BD4F; | |
$date-select-today-color: $trello-brand-color-green; | |
$date-select-today-rim: inset 0px 0px 0px 3px; | |
.pika-single .is-today:not(.is-selected) .pika-button { | |
background-color: $date-select-today-color; | |
box-shadow: inset 0px 0px 0px 3px darken($date-select-today-color, 10%); | |
} | |
// We must copy the shadow's positioning properties as "box-shadow" is not | |
// actually a shorthand for more sub-properties. | |
.pika-single .is-today.is-selected .pika-button { | |
box-shadow: $date-select-today-rim hsla(100,0%,100%,.7); | |
} |
Author
twome
commented
Oct 28, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment