-
-
Notifications
You must be signed in to change notification settings - Fork 223
Description
Is your feature request related to a problem? Please describe.
In style: directive syntax, you can't pass a number. Svelte's VSCode extension errors out when you attempt something like style:z-index={someNumericalValue}, so you have to apply hacks like style:z-index={someNumericalValue + ''} to coerce it into a string, which looks really ugly.
Describe the solution you'd like
I recommend language-tools don't error out when value passed is a number, as that is a valid value for properties like z-index, width, height, block-*, top, bottom, inset, opacity, and many more, including all the CSS Variables style:--opacity={someNumber}.
This would work because we know JS coerces numbers into strings when needed, so svelte core itself doesn't need to be changed
Describe alternatives you've considered
Not do anything