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

Fix light-dark #27

Merged
merged 2 commits into from
Feb 14, 2024
Merged

Fix light-dark #27

merged 2 commits into from
Feb 14, 2024

Conversation

VladBrok
Copy link
Contributor

The previous regex for light-dark was not taking into account values with variables and css color functions such as:

light-dark(rgb(0, 0, 0), var(--color))

Also, nested light-dark was not supported (we need to recursively "unwrap" light-dark in this case). Although using this syntax does not make any sense because this:

light-dark(light-dark(white, red), red)

is equivalent to this:

light-dark(white, red)

but this syntax is valid that's why we need to support it

@ai ai merged commit e486e28 into postcss:main Feb 14, 2024
3 checks passed
@ai
Copy link
Member

ai commented Feb 14, 2024

Thanks. Released in 1.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants