Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight today's date in DatePicker #41647

Merged
merged 1 commit into from
Jun 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/components/src/date-time/date/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,29 @@
border: none;
font-size: $default-font-size;
border-radius: $radius-round;
background: $white;

&:hover {
color: var(--wp-admin-theme-color);
}

&:focus {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 #{ $border-width-focus + $border-width } $white;
outline: 2px solid transparent; // Shown in Windows 10 high contrast mode.
}
}

.CalendarDay__today {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is a strange naming convention compared to other components, but I see it matches rest of this scss file - I guess it will get tidied up when it all moves to emotion :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because these classes come from a third party library (react-dates).

background: $gray-100;
}

.CalendarDay__selected {
background: var(--wp-admin-theme-color);
border: 2px solid transparent; // This indicates selection in Windows 10 high contrast mode.

&:hover {
background: var(--wp-admin-theme-color-darker-20);
color: $white;
}

&:focus {
Expand Down