-
Notifications
You must be signed in to change notification settings - Fork 30
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
Refactor getZIndex
#12900
Refactor getZIndex
#12900
Conversation
Changed the function to return just the `z-index` value rather than the CSS declaration. This should prove more flexible. One example of this is that it can be used with `!important` without requiring an addition to the API. It also makes it easier to test. As a consequence this change also updates the tests to more accurately reflect that we care what the z-indices are relative to one another, not their absolute values.
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
This wasn't added by this change, only refactored.
Size Change: -92 B (-0.01%) Total Size: 946 kB ℹ️ View Unchanged
|
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.
Thanks, I think this is a good improvement
Seen on PROD (merged by @JamieB-gu 27 minutes and 18 seconds ago) Please check your changes! |
Changed the function to return just the
z-index
value rather than the CSS declaration. This should prove more flexible. One example of this is that it can be used with!important
without requiring an addition to the API.It also makes it easier to test. As a consequence this change also updates the tests to more accurately reflect that we care what the z-indices are relative to one another, not their absolute values, as pointed out by @arelra .