-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
In development mode, everything always works correctly.
In production mode, everything works visually, but Lighthouse reports an
error: axe-core Error: Unable to parse color "oklab(1 0 5.96046e-8 / 0.08)"
The error occurs specifically when alpha transparency is applied to colors.
From this point on, the discussion will focus only on production mode, since everything works correctly in development.
@theme inline {
--color-color-dark: #030712;
--color-color-light: #ffffff;
}
Example:
className="bg-color-dark dark:bg-color-light"
npm run build
npm start
Result:

Adding transparency:
className="bg-color-dark/8 dark:bg-color-light/8"
npm run build
npm start
Result:

HOW TO FIX IT!
in:
@theme inline {
--color-color-dark: #030712;
--color-color-light: #ffffff;
}
remove - inline
result:
@theme {
--color-color-dark: #030712;
--color-color-light: #ffffff;
}
Now with transparency:
className="bg-color-dark/8 dark:bg-color-light/8"
npm run build
npm start
Result:


