feat: add makeResetStyles to @griffel/core#232
Merged
layershifter merged 6 commits intomicrosoft:mainfrom Oct 4, 2022
Merged
Conversation
layershifter
commented
Sep 27, 2022
| @@ -0,0 +1,324 @@ | |||
| import { GriffelResetStyle } from '@griffel/core'; | |||
Member
Author
There was a problem hiding this comment.
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
This was referenced Oct 3, 2022
ling1726
reviewed
Oct 4, 2022
bsunderhus
reviewed
Oct 4, 2022
| let ltrCSS = ''; | ||
| let rtlCSS = ''; | ||
|
|
||
| // eslint-disable-next-line guard-for-in |
Contributor
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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.
ling1726
reviewed
Oct 4, 2022
ling1726
approved these changes
Oct 4, 2022
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 |
miroslavstastny
approved these changes
Oct 4, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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