get rid of cover element

This commit is contained in:
Damián Suárez 2023-12-07 13:55:26 -03:00
parent 789c849666
commit ff9df643ef
2 changed files with 2 additions and 18 deletions

View File

@ -1,7 +1,7 @@
/** /**
* External dependencies * External dependencies
*/ */
import { createElement, useEffect, Fragment } from '@wordpress/element'; import { createElement, useEffect } from '@wordpress/element';
import { BlockInstance, parse, serialize } from '@wordpress/blocks'; import { BlockInstance, parse, serialize } from '@wordpress/blocks';
import { useSelect } from '@wordpress/data'; import { useSelect } from '@wordpress/data';
import classNames from 'classnames'; import classNames from 'classnames';
@ -109,13 +109,7 @@ export function DescriptionBlockEdit( {
{ ! description.length && <div { ...innerBlockProps } /> } { ! description.length && <div { ...innerBlockProps } /> }
{ !! description.length && ( { !! description.length && (
<div className="wp-block-woocommerce-product-description-field__cover" />
) }
{ !! description.length && (
<>
<BlockPreview blocks={ parse( description ) } /> <BlockPreview blocks={ parse( description ) } />
</>
) } ) }
{ isModalEditorOpen && <ModalEditorWelcomeGuide /> } { isModalEditorOpen && <ModalEditorWelcomeGuide /> }

View File

@ -1,4 +1,3 @@
.wp-block-woocommerce-product-description-field { .wp-block-woocommerce-product-description-field {
&:focus { &:focus {
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)); box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
@ -7,7 +6,6 @@
&.has-blocks { &.has-blocks {
min-height: 320px; min-height: 320px;
.wp-block-woocommerce-product-description-field__cover,
.woocommerce-content-preview { .woocommerce-content-preview {
min-height: 320px; min-height: 320px;
&:after { &:after {
@ -28,11 +26,3 @@
z-index: 100; z-index: 100;
} }
} }
.wp-block-woocommerce-product-description-field__cover {
position: absolute;
width: 100%;
top: 0;
left: 0;
z-index: 200;
}