-
Notifications
You must be signed in to change notification settings - Fork 65
feat: add makeResetStyles to @griffel/core #232
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
feat: add makeResetStyles to @griffel/core #232
Conversation
| @@ -0,0 +1,324 @@ | |||
| import { GriffelResetStyle } from '@griffel/core'; | |||
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.
It's a copy of fixture.ts with exclusions of shorthands that are not banned.
📊 Bundle size reportUnchanged fixtures
|
86d9742 to
42e3ff4
Compare
42e3ff4 to
46fb64c
Compare
| let ltrCSS = ''; | ||
| let rtlCSS = ''; | ||
|
|
||
| // eslint-disable-next-line guard-for-in |
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.
is this for performance reasons? the styles here is provided by the user, this might leak some weird things if someone is tweaking around a custom object as styles.
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.
is this for performance reasons?
Yes, we use it consistently across in other places, too. It's not expected to see custom objects there, but we can change it if someone will report issues.
Co-authored-by: Bernardo Sunderhus <bernardo.sunderhus@gmail.com>
c90b433 to
d12d11f
Compare
| for (const property in styles) { | ||
| const value = styles[property as keyof GriffelStyle]; | ||
|
|
||
| // eslint-disable-next-line eqeqeq |
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.
Chro!

Fixes #225.
This PR implements
makeResetStyles()function in@griffel/core.rfprefixrbucket, so any Atomic rules will have higher precedencemakeResetStylescalls are there are no reasons to forbid them