Fix inconsistent heading editor styles for filter blocks (https://github.com/woocommerce/woocommerce-blocks/pull/1256)

* override title bg to transparent in editor for filter blocks
This commit is contained in:
Rua Haszard 2019-11-26 23:56:14 +13:00 committed by Seghir Nadir
parent 9eaeb208f5
commit 1ec624f2d7
3 changed files with 12 additions and 0 deletions

View File

@ -39,3 +39,4 @@
}
}
}

View File

@ -0,0 +1,6 @@
// Ensure textarea bg color is transparent for block titles.
// Some themes (e.g. Twenty Twenty) set a non-white background for the editor, and Gutenberg sets white background for text inputs, creating this issue.
// https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/1204
.wc-block-component-title {
background-color: transparent;
}

View File

@ -5,6 +5,11 @@ import PropTypes from 'prop-types';
import { PlainText } from '@wordpress/block-editor';
import classnames from 'classnames';
/**
* Internal dependencies
*/
import './editor.scss';
const BlockTitle = ( { className, headingLevel, onChange, heading } ) => {
const TagName = `h${ headingLevel }`;
return (