Hotfix wrong override when value is not defined in breakpoint #6969
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.
What does this PR do?
This PR tend to avoid generating a wrong CSS override when value is not known in theme breakpoint (Same as for
gap
, etc...)Where should the reviewer start?
Read the linked issue to see the difference between both Codepens.
What testing has been done on this PR?
Manual tests only
How should this be manually tested?
Use Developper console with the new version to figure out that CSS override have not been generated for unknown value.
Then add a 'small' breakpoint with distinct edgeSize value to see the override being generated.
Do Jest tests follow these best practices?
No Jest tests.
Any background context you want to provide?
What are the relevant issues?
Issue #6968
Screenshots (if appropriate)
N/A
Do the grommet docs need to be updated?
No
Should this PR be mentioned in the release notes?
Maybe, depending if a lot of people get a specific expected behavior with this bug.
Is this change backwards compatible or is it a breaking change?
It should be backwards compatible, except if some users get a specific behavior getting the raw CSS value inserted and being different than the value defined in global theme.