Skip to content
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

Update z-index hierarchy #65626

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions packages/base-styles/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ $z-layers: (
".interface-interface-skeleton__header": 30,
".interface-interface-skeleton__content": 20,
".edit-widgets-header": 30,
".wp-block-cover__inner-container": 1, // InnerBlocks area inside cover image block.
".wp-block-cover.is-placeholder .components-placeholder.is-large": 1, // Cover block resizer component inside a large placeholder.
".wp-block-cover.has-background-dim::before": 1, // Overlay area inside block cover need to be higher than the video background.
renatho marked this conversation as resolved.
Show resolved Hide resolved
".block-library-cover__padding-visualizer": 2, // BoxControl visualizer needs to be +1 higher than .wp-block-cover.has-background-dim::before
".wp-block-cover__image-background": 0, // Image background inside cover block.
".wp-block-cover__video-background": 0, // Video background inside cover block.
".wp-block-cover.has-background-dim::before": 0, // Overlay area inside block cover need to be higher than the video background.
".block-library-cover__padding-visualizer": 1, // BoxControl visualizer needs to be +1 higher than .wp-block-cover.has-background-dim::before
aaronrobertshaw marked this conversation as resolved.
Show resolved Hide resolved
".wp-block-cover__image-background": -1, // Image background inside cover block.
".wp-block-cover__video-background": -1, // Video background inside cover block.
renatho marked this conversation as resolved.
Show resolved Hide resolved
".wp-block-template-part__placeholder-preview-filter-input": 1,

// Fixed position appender:
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/cover/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
// Shown while media is being uploaded
.components-spinner {
position: absolute;
z-index: z-index(".wp-block-cover__inner-container");
renatho marked this conversation as resolved.
Show resolved Hide resolved
top: 50%;
left: 50%;
transform: translate(-50%, -50%); // Account for spinner dimensions
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/cover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
}

.wp-block-cover__inner-container {
position: relative;
width: 100%;
z-index: z-index(".wp-block-cover__inner-container");
color: inherit;
// Reset the fixed LTR direction at the root of the block in RTL languages.
/*rtl:raw: direction: rtl; */
Expand Down
Loading