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

False errors "The types are incompatible" and "Invalid type" #399

Open
1jj opened this issue Apr 18, 2023 · 3 comments
Open

False errors "The types are incompatible" and "Invalid type" #399

1jj opened this issue Apr 18, 2023 · 3 comments
Assignees
Labels

Comments

@1jj
Copy link

1jj commented Apr 18, 2023

Hello!

Code like this gives wrong error messages (IMHO):

x { --y:  max(1 * var(--a), var(--b)) }     /* "The types are incompatible" */

x { --y:  max(var(--c), 1 * var(--d)) }     /* "Invalid type" */

x { --y:  max(2 * var(--e), var(--f)) }     /* "The types are incompatible" */

x { --y:  max(var(--g), var(--h) * 1) }     /* "Invalid type" */

x { --y:  max(-1 * var(--h)) }        /* (sometimes?) "Invalid type" */

Testcase from above:
https://peter-hindelang.de/x.css
Real-world example:
https://peter-hindelang.de/Bilder/style.css

Thanks!
j.j.

@ylafon ylafon added the bug label Apr 19, 2023
@ylafon ylafon self-assigned this Apr 19, 2023
@ylafon
Copy link
Member

ylafon commented Apr 19, 2023

It is indeed related to handling variable types, which has been done in calc() but not here.

@ylafon
Copy link
Member

ylafon commented Apr 19, 2023

Note that having default value (then types) is a way to temporarily fix this.
x { --y: max(1 * var(--a, 2em), var(--b, 42px)) } is shown as valid as the defaulted types are matching.

@1jj
Copy link
Author

1jj commented Apr 19, 2023

https://peter-hindelang.de/Bilder/style.css
... btw and while we are here:
At least @font-face { size-adjust: ... } and probably poiner-events: none shouldn't be errors.

Edit: I see now that "pointer-events" depends on profile.

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

No branches or pull requests

2 participants