Skip to content

Commit ee0abdd

Browse files
committed
MC-3571: Implement overlay for MC-1405
- Refactored overlay implementation to not add additional elements
1 parent b9d554e commit ee0abdd

File tree

2 files changed

+19
-17
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web

2 files changed

+19
-17
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/css/source/content-type/block/_default.less

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,24 @@
2121
font-weight: lighter;
2222
}
2323
}
24-
.pagebuilder-block-overlay {
25-
-moz-transition: background-color 500ms ease;
26-
-o-transition: background-color 500ms ease;
27-
-webkit-transition: background-color 500ms ease;
28-
height: 100%;
29-
opacity: .7;
30-
position: absolute;
31-
transition: background-color 500ms ease;
32-
width: 100%;
33-
z-index: 10;
24+
> div:first-child {
25+
&:before {
26+
content: '';
27+
height: 100%;
28+
opacity: .7;
29+
position: absolute;
30+
-moz-transition: background-color 500ms ease;
31+
-o-transition: background-color 500ms ease;
32+
-webkit-transition: background-color 500ms ease;
33+
transition: background-color 500ms ease;
34+
width: 100%;
35+
z-index: 10;
36+
}
3437

3538
&:hover {
36-
background-color: @color-gray98;
39+
&:before {
40+
background-color: @color-gray98;
41+
}
3742
}
3843
}
3944
.rendered-content {

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/block/default/preview.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77

88
<div class="pagebuilder-content-type pagebuilder-block" event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false">
99
<div attr="data.main.attributes" ko-style="data.main.style" css="data.main.css">
10-
<div class="pagebuilder-block-wrapper">
11-
<div class="pagebuilder-block-overlay"></div>
12-
<div if="displayPreview" class="rendered-content" html="data.main.html" afterRender="initializeWidgets"></div>
13-
<div ifnot="displayPreview" class="pagebuilder-block-placeholder">
14-
<span class="placeholder-text" text="placeholderText"/>
15-
</div>
10+
<div if="displayPreview" class="rendered-content" html="data.main.html" afterRender="initializeWidgets"></div>
11+
<div ifnot="displayPreview" class="pagebuilder-block-placeholder">
12+
<span class="placeholder-text" text="placeholderText"/>
1613
</div>
1714
</div>
1815
<div data-role="spinner"

0 commit comments

Comments
 (0)