Skip to content

Commit

Permalink
Clean up BorderControls focus styles now UnitControl handles it
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Jul 13, 2022
1 parent 905760a commit fed2e95
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const UnconnectedBorderControl = (
showDropdownHeader,
sliderClassName,
value: border,
widthControlClassName,
widthUnit,
widthValue,
withSlider,
Expand Down Expand Up @@ -86,7 +85,6 @@ const UnconnectedBorderControl = (
__next36pxDefaultSize={ __next36pxDefaultSize }
/>
}
className={ widthControlClassName }
min={ 0 }
onChange={ onWidthChange }
value={ border?.width || '' }
Expand Down
5 changes: 0 additions & 5 deletions packages/components/src/border-control/border-control/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ export function useBorderControl(
return cx( styles.innerWrapper(), widthStyle, heightStyle );
}, [ isCompact, width, cx, __next36pxDefaultSize ] );

const widthControlClassName = useMemo( () => {
return cx( styles.borderWidthControl() );
}, [ cx ] );

const sliderClassName = useMemo( () => {
return cx( styles.borderSlider() );
}, [ cx ] );
Expand All @@ -145,7 +141,6 @@ export function useBorderControl(
previousStyleSelection: styleSelection,
sliderClassName,
value: border,
widthControlClassName,
widthUnit,
widthValue,
__next36pxDefaultSize,
Expand Down
19 changes: 0 additions & 19 deletions packages/components/src/border-control/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
StyledField,
StyledLabel,
} from '../base-control/styles/base-control-styles';
import { BackdropUI } from '../input-control/styles/input-control-styles';
import {
Root as UnitControlWrapper,
UnitSelect,
Expand All @@ -35,17 +34,6 @@ export const innerWrapper = () => css`
&& ${ UnitSelect } {
/* Prevent unit select forcing min height larger than its UnitControl */
min-height: 0;
${ rtl(
{ borderRadius: '0 2px 2px 0' },
{ borderRadius: '2px 0 0 2px' }
)() }
transition: box-shadow 0.1s linear, border 0.1s linear;
&:focus {
z-index: 1;
${ focusBoxShadow }
border: 1px solid ${ COLORS.ui.borderFocus };
}
}
`;

Expand Down Expand Up @@ -181,13 +169,6 @@ export const resetButton = css`
}
`;

export const borderWidthControl = () => css`
/* Target the InputControl's backdrop */
&&& ${ BackdropUI } {
transition: box-shadow 0.1s linear;
}
`;

export const borderControlStylePicker = css`
${ StyledLabel } {
${ labelStyles }
Expand Down

0 comments on commit fed2e95

Please sign in to comment.