-
Notifications
You must be signed in to change notification settings - Fork 312
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: fix valid-shorthands object casting error on css-shorthand-expand null return #814
Conversation
workflow: benchmarks/sizeComparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.
|
import stylex from 'stylex'; | ||
const styles = stylex.create({ | ||
main: { | ||
borderRight: '4px solid var(--fds-gray-10)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still identifying repros to make the test more robust
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming we are aligned that we should return if css shorthand expand fails, the changes LGTM.
@nmn please feel free to chime in since you have more context 🙂
Lint error will still be triggered, we just will not provide an autofix. Merging as SEV follow up |
What changed / motivation ?
Certain complex shorthand values like
'4px solid var(--fds-gray-10)'
seem to trip up the css-shorthand-expand package, which defaults to returning null. Let's handle the cases by prematurely returning and not providing an autofix in such cases.Testing
Still identifying repros to make the test more robust
Contribution Guidelines