Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
remove support global styles
Browse files Browse the repository at this point in the history
  • Loading branch information
gigitux committed Jan 30, 2023
1 parent 1dc7baa commit d9900e0
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@
"category": "woocommerce",
"supports": {
"align": true,
"reusable": false,
"spacing": {
"margin": true
},
"__experimentalBorder": {
"radius": true,
"__experimentalSkipSerialization": true
},
"__experimentalSelector": ".wp-block-woocommerce-product-image-gallery img"
"reusable": false
},
"keywords": [ "WooCommerce" ],
"usesContext": [ "postId", "postType", "queryId" ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { WC_BLOCKS_IMAGE_URL } from '@woocommerce/block-settings';
import { isEmptyObject } from '@woocommerce/types';
import { useBlockProps } from '@wordpress/block-editor';
import { BlockAttributes } from '@wordpress/blocks';
import { Disabled } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -63,7 +64,9 @@ const Edit = ( { context, attributes }: Props ) => {
if ( isEmptyObject( context ) ) {
return (
<div { ...blockProps }>
<Placeholder attributes={ attributes } />
<Disabled>
<Placeholder attributes={ attributes } />
</Disabled>
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
.wc-block-editor-product-gallery {
border-style: none;

img {
width: 500px;
height: 500px;
border-radius: inherit;
}
.wc-block-editor-product-gallery__gallery {
img {
width: 100px;
height: 100px;
border-radius: inherit;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { registerBlockSingleProductTemplate } from '@woocommerce/atomic-utils';
import edit from './edit';
import save from './save';
import metadata from './block.json';
import './style.scss';

registerBlockSingleProductTemplate( {
registerBlockFn: () => {
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions src/BlockTypes/ProductImageGallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ protected function get_block_type_uses_context() {
return [ 'query', 'queryId', 'postId' ];
}

/**
* Get block attributes.
*
* @return array
*/
protected function get_block_type_supports() {
return array(
'__experimentalSelector' => 'img',
);
}

/**
* Include and render the block.
Expand Down

0 comments on commit d9900e0

Please sign in to comment.