Skip to content

Commit

Permalink
fix(calendar): addresses issue where text that was not selected was i…
Browse files Browse the repository at this point in the history
…llegible in high contrast mode (#3079)

* fix(calendar): addresses issue where text that was not selected was illegible in high contrast mode

* chore(calendar): clarify changeset
  • Loading branch information
cdransf committed Sep 17, 2024
1 parent 2000337 commit bde7701
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-tools-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spectrum-css/calendar": minor
---

Makes text in the calendar in high contrast mode that is not in a selected cell visible again by removing redundant color property and allowing it to be set by the adjusted variable values (--highcontrast-calendar-day-today-text-\*).
5 changes: 2 additions & 3 deletions components/calendar/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,6 @@
}

.spectrum-Calendar-date {
color: CanvasText;
forced-color-adjust: none;

--highcontrast-calendar-day-background-color-cap-selected: Highlight;
--highcontrast-calendar-day-background-color-down: ButtonFace;
--highcontrast-calendar-day-background-color-hover: Transparent;
Expand All @@ -439,6 +436,8 @@
--highcontrast-calendar-day-today-text-color-disabled: GrayText;
--highcontrast-calendar-day-today-text-color: ButtonText;

forced-color-adjust: none;

&.is-range-selection {
&.is-today {
color: HighlightText;
Expand Down

0 comments on commit bde7701

Please sign in to comment.