-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
fix(cssnano-preset): disable z-index minification #7593
Conversation
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
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.
LGTM; will wait for @slorber's opinion on this. I don't think sane applications would have much bloat caused by z-index anyway (can't speak for those who add a 0 every time something doesn't work).
👍 thanks, looks like useful to disable this It's marked as unsafe in CSSNano doc: https://cssnano.co/docs/optimisations/zindex/ Considering it's hard to ensure users will use be in the safe use-case, let's turn it off. |
1 similar comment
👍 thanks, looks like useful to disable this It's marked as unsafe in CSSNano doc: https://cssnano.co/docs/optimisations/zindex/ Considering it's hard to ensure users will use be in the safe use-case, let's turn it off. |
Pre-flight checklist
Motivation
z-index
minification can cause issues when working with the styles of third party libraries.Test Plan
On the dogfooding page, the text would normally have its
z-index
minified to 3, but after these changes, it remains 100.For comparison, one place on the Docusaurus website that already uses
z-index
is on the showcase pageTest links
Dogfooding: https://deploy-preview-7593--docusaurus-2.netlify.app/tests/pages/z-index-tests/
Deploy preview: https://deploy-preview-7593--docusaurus-2.netlify.app/
Related issues/PRs
#7548