Skip to content

Commit

Permalink
fix(alert): status colors wcag compliant (#8014)
Browse files Browse the repository at this point in the history
  • Loading branch information
CalleEklund committed Sep 22, 2023
1 parent bd3d0fd commit 6d12ea8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/short-taxis-boil.md
@@ -0,0 +1,6 @@
---
"@chakra-ui/alert": patch
---

Set the standard color for toasts and alerts to a slightly darker color to make
i WCAG compatible
8 changes: 4 additions & 4 deletions packages/components/theme/src/components/alert.ts
Expand Up @@ -56,7 +56,7 @@ const variantSubtle = definePartsStyle((props) => {
const bg = getBg(props)
return {
container: {
[$fg.variable]: `colors.${c}.500`,
[$fg.variable]: `colors.${c}.600`,
[$bg.variable]: bg.light,
_dark: {
[$fg.variable]: `colors.${c}.200`,
Expand All @@ -71,7 +71,7 @@ const variantLeftAccent = definePartsStyle((props) => {
const bg = getBg(props)
return {
container: {
[$fg.variable]: `colors.${c}.500`,
[$fg.variable]: `colors.${c}.600`,
[$bg.variable]: bg.light,
_dark: {
[$fg.variable]: `colors.${c}.200`,
Expand All @@ -89,7 +89,7 @@ const variantTopAccent = definePartsStyle((props) => {
const bg = getBg(props)
return {
container: {
[$fg.variable]: `colors.${c}.500`,
[$fg.variable]: `colors.${c}.600`,
[$bg.variable]: bg.light,
_dark: {
[$fg.variable]: `colors.${c}.200`,
Expand All @@ -107,7 +107,7 @@ const variantSolid = definePartsStyle((props) => {
return {
container: {
[$fg.variable]: `colors.white`,
[$bg.variable]: `colors.${c}.500`,
[$bg.variable]: `colors.${c}.600`,
_dark: {
[$fg.variable]: `colors.gray.900`,
[$bg.variable]: `colors.${c}.200`,
Expand Down

1 comment on commit 6d12ea8

@vercel
Copy link

@vercel vercel bot commented on 6d12ea8 Sep 22, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.