Skip to content

Commit

Permalink
Update <Placeholder hasIllustration> design, remove unnecessary mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed Jul 24, 2024
1 parent bdc0acb commit 1453f90
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 21 deletions.
16 changes: 0 additions & 16 deletions packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,6 @@
}
}

@mixin placeholder-style() {
border-radius: $radius-block-ui;

&::before {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
background: currentColor;
opacity: 0.1;
}
}

/**
* Allows users to opt-out of animations via OS-level preferences.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
left: 0;
pointer-events: none;
border: $border-width dashed currentColor;
@include placeholder-style();
border-radius: $radius-block-ui;
}

.block-editor-inserter {
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/group/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
pointer-events: none;
min-height: $grid-unit-60 - $border-width - $border-width;
border: $border-width dashed currentColor;
@include placeholder-style();
border-radius: $radius-block-ui;
}

// Let the parent be selectable in the placeholder area.
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ $color-control-label-height: 20px;
left: 0;
pointer-events: none;
border: $border-width dashed currentColor;
@include placeholder-style();

// Inherit border radius from style variations.
border-radius: inherit;
Expand Down
13 changes: 11 additions & 2 deletions packages/components/src/placeholder/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,17 @@
}
}

// By painting the borders here, we enable them to be replaced by the Border control.
@include placeholder-style();
&::before {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
background: $gray-900;
opacity: 0.7;
}

overflow: hidden;
.is-selected & {
Expand Down

0 comments on commit 1453f90

Please sign in to comment.