Skip to content

Commit

Permalink
Quality: remove custom fallback css for 40px size (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Oct 20, 2024
1 parent 44a6fa2 commit b69cabb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
7 changes: 0 additions & 7 deletions src/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,6 @@
cursor: initial;
}

// TODO: Remove this style and replace it with `__next40pxDefaultSize` prop
// when supported WordPress versions are greater than or equal to 6.5.
// See: https://github.com/WordPress/gutenberg/pull/55471
.ftb-is-next-40px-default-size .components-text-control__input {
height: 40px;
}

// Setting Component Styles
.ftb-button-group {
display: block;
Expand Down
4 changes: 2 additions & 2 deletions src/elements/table-placeholder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,24 +166,24 @@ export default function TablePlaceholder( { setAttributes }: Props ) {
</div>
<div className="ftb-placeholder__row">
<TextControl
className="ftb-is-next-40px-default-size"
label={ __( 'Column count', 'flexible-table-block' ) }
type="number"
min="1"
max={ MAX_PREVIEW_TABLE_COL }
value={ colCount || '' }
onChange={ onChangeColumnCount }
__nextHasNoMarginBottom
__next40pxDefaultSize
/>
<TextControl
className="ftb-is-next-40px-default-size"
label={ __( 'Row count', 'flexible-table-block' ) }
type="number"
min="1"
max={ MAX_PREVIEW_TABLE_ROW }
value={ rowCount || '' }
onChange={ onChangeRowCount }
__nextHasNoMarginBottom
__next40pxDefaultSize
/>
<Button
variant="primary"
Expand Down
2 changes: 1 addition & 1 deletion src/settings/table-caption-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export default function TableCaptionSettings( {
__nextHasNoMarginBottom
>
<TextControl
className="ftb-is-next-40px-default-size"
label={ __( 'Caption line height', 'flexible-table-block' ) }
autoComplete="off"
onChange={ onChangeLineHeight }
Expand All @@ -136,6 +135,7 @@ export default function TableCaptionSettings( {
value={ captionStylesObj?.lineHeight || '' }
min={ 0 }
__nextHasNoMarginBottom
__next40pxDefaultSize
/>
</BaseControl>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/settings/table-cell-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ export default function TableCellSettings( { setAttributes, vTable, selectedCell
__nextHasNoMarginBottom
>
<TextControl
className="ftb-is-next-40px-default-size"
label={ __( 'Cell line height', 'flexible-table-block' ) }
value={ cellStylesObj?.lineHeight || '' }
autoComplete="off"
Expand All @@ -253,6 +252,7 @@ export default function TableCellSettings( { setAttributes, vTable, selectedCell
min={ 0 }
onChange={ onChangeLineHeight }
__nextHasNoMarginBottom
__next40pxDefaultSize
/>
</BaseControl>
</div>
Expand Down Expand Up @@ -395,20 +395,19 @@ export default function TableCellSettings( { setAttributes, vTable, selectedCell
) ) }
</ToggleGroupControl>
<TextControl
className="ftb-is-next-40px-default-size"
label={ __( 'Cell CSS class(es)', 'flexible-table-block' ) }
autoComplete="off"
value={ targetCell.className || '' }
onChange={ onChangeClass }
help={ __( 'Separate multiple classes with spaces.', 'flexible-table-block' ) }
__nextHasNoMarginBottom
__next40pxDefaultSize
/>
{ selectedCellTags.length === 1 && (
<>
<hr />
{ selectedCellTags.includes( 'th' ) && (
<TextControl
className="ftb-is-next-40px-default-size"
label={ createInterpolateElement(
__( '<code>id</code> attribute', 'flexible-table-block' ),
{ code: <code /> }
Expand All @@ -417,10 +416,10 @@ export default function TableCellSettings( { setAttributes, vTable, selectedCell
value={ targetCell.id || '' }
onChange={ onChangeId }
__nextHasNoMarginBottom
__next40pxDefaultSize
/>
) }
<TextControl
className="ftb-is-next-40px-default-size"
label={ createInterpolateElement(
__( '<code>headers</code> attribute', 'flexible-table-block' ),
{ code: <code /> }
Expand All @@ -429,6 +428,7 @@ export default function TableCellSettings( { setAttributes, vTable, selectedCell
value={ targetCell.headers || '' }
onChange={ onChangeHeaders }
__nextHasNoMarginBottom
__next40pxDefaultSize
/>
{ selectedCellTags.includes( 'th' ) && (
<BaseControl id="flexible-table-block-cell-scope" __nextHasNoMarginBottom>
Expand Down

0 comments on commit b69cabb

Please sign in to comment.