Skip to content

Properly validate theme(…) function paths in v4 #1074

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

Merged
merged 10 commits into from
Nov 8, 2024

Conversation

thecrypticace
Copy link
Contributor

In v4 currently using the theme function in your CSS will show diagnostics about the theme config keys not existing regardless of the theme key.

We've done two things here:

  • We compile a candidate with the theme function to see if the theme key exists. While this isn't an optimal solution it works without needing to introduce new APIs into v4 — also prevents us from having to expose the legacy resolved config anywhere in v4.
  • We look at all currently registered theme keys to offer suggestions in case you type a theme key incorrectly as long as it's a CSS variable. In v4 suggestions for legacy theme config values is not implemented.

Base automatically changed from fix/v4-oklch-colors to main November 8, 2024 13:45
@RobinMalfait RobinMalfait merged commit 5798007 into main Nov 8, 2024
@RobinMalfait RobinMalfait deleted the fix/v4-invalid-theme-keys branch November 8, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants