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

[preset-mini] Cannot read properties of undefined (reading 'split') when overriding spacing config #3656

Closed
4 tasks done
1001v opened this issue Mar 25, 2024 · 0 comments · Fixed by #3662
Closed
4 tasks done

Comments

@1001v
Copy link

1001v commented Mar 25, 2024

UnoCSS version

0.58.6

Describe the bug

Hello. Preset Mini throws an exception "Cannot read properties of undefined (reading 'split')" when we override spacing field in the theme completely and miss the DEFAULT property.
It's highly likely, that Uno will try to generate a corresponding class for the px (which is equal to px-DEFAULT) entry against developer's will, since px is also a shortcut for pixel, and the presence of this entry outside the CSS classes context is kind of expected.
I see, how keeping defaults is a good practice. However, this behavior, in my opinion, in unexpected. Thanks.

Reproduction

https://unocss.dev/play/?html=DwEwlgbgfARADgDxsA9OaQ&config=PTAEFMGcBsEsDsAuBaAJrSBDARtcz5wAPFOQ0eAe2QCcpEbYBjRcVZWAWwAdKbFIAKC69%2BoAN6DQoVOABmCcAGFK8BQHMANFNDc6kcIgCCiBrGwBXRLDkBPbdL1RDASSarID3fsMBVKtoAvqByNJScoADkFlRMkJCRgoLEoogy8pgW0GmyCoQqarDqABSS0jRZUABcoADaOtK1kUwWkIjhtJWRmhKg7tB8NZF0qJGggQC6XlM6kAAWfIgtAjVl0lEtbR3zi8uRQ6wkyNDqoIcofJjw6uCgCwBu4DRV58ismNDdOoFeTgYrdQa3mciH8lGKAEovI4fMZTIxLNY7JDocD-m4PKUgdJIEwPuAagBGAB0ACZUdImKh4EM5qZuJAqiAoJxifNgF91uMIToZtJiKx4KgACpzcCcAmgYqIMUSiGgAC8AD4JECZeLwGzuJgmAhTgrepwhgAObhEMaBb6CQI8oA&css=PQKgBA6gTglgLgUzAYwK4Gc4HsC2YDCAyoWABYJQIA0YAhgHYAmYcUD6AZllDhWOqgAOg7nAB0YAGLcwCAB60cggDYIAXGBDAAUKDBi0mXGADe2sGC704AWgDuCGAHNScDQFYADJ4Dc5sAACtMLKAJ5gggCMLPK2ABR2pPBIcsoAlH4WAEa0yADWTlBYqEw2yFjK3Bpw5LxxAOTllVDoYpSMYgAs3vUZ2gC%2BmsBAA&options=N4XyA

System Info

No response

Validations

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 a pull request may close this issue.

1 participant