-
Notifications
You must be signed in to change notification settings - Fork 359
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
Add support for declarations #2468
base: main
Are you sure you want to change the base?
Conversation
it('ignores important', () => | ||
expect( | ||
new Declaration({ | ||
prop: 'foo', | ||
value: 'bar !important', | ||
raws: {important: '!IMPORTANT'}, | ||
}).toString(), | ||
).toBe('foo: bar !important')); | ||
|
||
it('ignores value', () => | ||
expect( | ||
new Declaration({ | ||
prop: 'foo', | ||
value: 'bar', | ||
raws: {value: {value: 'bar', raw: 'BAR'}}, | ||
}).toString(), | ||
).toBe('foo: bar')); |
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.
I'm slightly lost, why is !important
and value
ignored?
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.
Because in the Sass AST, those are fully parsed expressions in their own right, and the expression ASTs determine how they're serialized rather than the statement-level raws.
No description provided.