Product Editor: Fix styling of checkboxes in Categories and Tags fields with Gutenberg plugin installed (#47816)

* Remove styling of checkbox (use GB core styling)

* Remove setting of margin on checkbox control

* Remove unused CSS

* Changelog
This commit is contained in:
Matt Sherman 2024-05-27 14:34:21 -04:00 committed by GitHub
parent 988c3634b7
commit 8894850ce1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 20 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fixes the styling of checkboxes in __experimentalTreeControl

View File

@ -41,29 +41,9 @@ $control-size: $gap-large;
display: block;
}
.components-base-control__field {
margin: 0;
}
.components-checkbox-control__label {
display: none;
}
.components-checkbox-control__input-container {
display: block;
width: $control-size;
height: $control-size;
}
svg.components-checkbox-control__checked,
svg.components-checkbox-control__indeterminate,
.components-checkbox-control__input[type='checkbox'] {
position: absolute;
border-color: $gray-700;
width: $control-size;
height: $control-size;
top: 0;
left: 0;
&:focus {
outline: none;
box-shadow: none;

View File

@ -58,6 +58,9 @@ export const TreeItem = forwardRef( function ForwardedTreeItem(
}
checked={ selection.checkedStatus === 'checked' }
onChange={ selection.onSelectChild }
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore __nextHasNoMarginBottom is a valid prop
__nextHasNoMarginBottom={ true }
/>
) : (
<input