Merge pull request woocommerce/woocommerce-admin#327 from woocommerce/fix/datepicker-1px-shift
Segmented-selection: remove focus outline in favor of inset box-shadow
This commit is contained in:
commit
22e3d962ad
|
@ -59,6 +59,9 @@ class DatePicker extends Component {
|
|||
if ( 'custom' === selectedTab ) {
|
||||
data.after = after ? after.format( isoDateFormat ) : '';
|
||||
data.before = before ? before.format( isoDateFormat ) : '';
|
||||
} else {
|
||||
data.after = undefined;
|
||||
data.before = undefined;
|
||||
}
|
||||
updateQueryString( data, path, query );
|
||||
onClose( event );
|
||||
|
|
|
@ -56,17 +56,6 @@
|
|||
}
|
||||
|
||||
&:focus + label .woocommerce-segmented-selection__label {
|
||||
/**
|
||||
Must use outline instead of border here to avoid having the
|
||||
elements below shift by 2 pixel on focus. This trickery is needed
|
||||
so that left and right edges can be seen as those borders are actually
|
||||
part of the parent CSS grid.
|
||||
*/
|
||||
outline: 1px solid $black;
|
||||
width: calc(100% - 1px);
|
||||
}
|
||||
|
||||
&:nth-child(4n + 1):focus + label .woocommerce-segmented-selection__label {
|
||||
transform: translateX(1px);
|
||||
box-shadow: inset 0 0 0 1px $black;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue