Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const AdvancedControls = ( { initialOpen = false } ) => {
const privateFills = useSlotFills(
PrivateInspectorControlsAllowedBlocks.name
);

const hasFills = Boolean( fills && fills.length );
Comment thread
t-hamano marked this conversation as resolved.
Resolved
const hasPrivateFills = Boolean( privateFills && privateFills.length );

Expand Down
6 changes: 6 additions & 0 deletions packages/block-editor/src/hooks/custom-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useInstanceId } from '@wordpress/compose';
import { getBlockType, hasBlockSupport } from '@wordpress/blocks';
import { __, sprintf } from '@wordpress/i18n';
import { processCSSNesting } from '@wordpress/global-styles-engine';
import { useBlockEditingMode } from '../components/block-editing-mode';

/**
* Internal dependencies
Expand All @@ -33,6 +34,11 @@ const EMPTY_STYLE = {};
* @param {Object} props.style Block style attribute.
*/
function CustomCSSControl( { blockName, setAttributes, style } ) {
const blockEditingMode = useBlockEditingMode();

if ( blockEditingMode !== 'default' ) {
return null;
}
const blockType = getBlockType( blockName );

function onChange( newStyle ) {
Expand Down
Loading