Skip to content

Commit

Permalink
Gallery: Remove unused inline menu styles (#68776)
Browse files Browse the repository at this point in the history
* Gallery: Remove unused inline menu transition

* Base Styles: Remove unused  styles entirely

Co-authored-by: himanshupathak95 <[email protected]>
Co-authored-by: t-hamano <[email protected]>
  • Loading branch information
3 people authored Jan 21, 2025
1 parent e68767f commit 1295878
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 57 deletions.
1 change: 0 additions & 1 deletion packages/base-styles/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ $z-layers: (
".components-popover__close": 5,
".block-editor-block-list__insertion-point": 6,
".block-editor-warning": 5,
".block-library-gallery-item__inline-menu": 20,
".block-editor-url-input__suggestions": 30,
".edit-post-layout__footer": 30,
".interface-interface-skeleton__header": 30,
Expand Down
56 changes: 0 additions & 56 deletions packages/block-library/src/gallery/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@
opacity: 0.3;
}

.is-selected .block-library-gallery-item__inline-menu {
display: inline-flex;
}

.block-editor-media-placeholder {
margin: 0;
height: 100%;
Expand All @@ -131,58 +127,6 @@
}
}

.block-library-gallery-item__inline-menu {
display: none;
position: absolute;
top: -2px;
margin: $grid-unit-10;
z-index: z-index(".block-library-gallery-item__inline-menu");
border-radius: $radius-small;
background: $white;
border: $border-width solid $gray-900;

@media not (prefers-reduced-motion) {
transition: box-shadow 0.2s ease-out;
}

&:hover {
box-shadow: $elevation-x-small;
}

@include break-small() {
// Use smaller buttons to fit when there are many columns.
.columns-7 &,
.columns-8 & {
padding: $grid-unit-05 * 0.5;
}
}

.components-button.has-icon {
&:not(:focus) {
border: none;
box-shadow: none;
}

@include break-small() {
// Use smaller buttons to fit when there are many columns.
.columns-7 &,
.columns-8 & {
padding: 0;
width: inherit;
height: inherit;
}
}
}

&.is-left {
left: -2px;
}

&.is-right {
right: -2px;
}
}

.wp-block-gallery ul.blocks-gallery-grid {
padding: 0;
// Some themes give all <ul> default margin instead of padding.
Expand Down

0 comments on commit 1295878

Please sign in to comment.