Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toggle group design update #68244

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const buttonView = ( {
`;

const pressed = css`
color: ${ COLORS.theme.foregroundInverted };
color: '#000';
&:active {
background: transparent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export const toggleGroupControl = ( {
}: Pick< ToggleGroupControlProps, 'isBlock' | 'isDeselectable' > & {
size: NonNullable< ToggleGroupControlProps[ 'size' ] >;
} ) => css`
background: ${ COLORS.ui.background };
border: 1px solid transparent;
border-radius: ${ CONFIG.radiusSmall };
background: #f5f5f5;
//border: 1px solid transparent;
//border-radius: ${ CONFIG.radiusSmall };
display: inline-flex;
min-width: 0;
position: relative;
Expand All @@ -39,11 +39,11 @@ export const toggleGroupControl = ( {
content: '';
position: absolute;
pointer-events: none;
background: ${ COLORS.theme.foreground };
background: ${ COLORS.theme.background };

// Windows High Contrast mode will show this outline, but not the box-shadow.
outline: 2px solid transparent;
outline-offset: -3px;
outline: 1.5px solid ${ COLORS.gray[400] };
//outline-offset: -3px;

/* Using a large value to avoid antialiasing rounding issues
when scaling in the transform, see: https://stackoverflow.com/a/52159123 */
Expand All @@ -56,7 +56,7 @@ export const toggleGroupControl = ( {
var( --antialiasing-factor )
)
) / ${ CONFIG.radiusXSmall };
left: -1px; // Correcting for border.
left: 0; // Correcting for border.
width: calc( var( --antialiasing-factor ) * 1px );
height: calc( var( --selected-height, 0 ) * 1px );
transform-origin: left top;
Expand All @@ -82,8 +82,8 @@ const enclosingBorders = ( isBlock: ToggleGroupControlProps[ 'isBlock' ] ) => {
}

&:focus-within {
border-color: ${ COLORS.ui.borderFocus };
box-shadow: ${ CONFIG.controlBoxShadowFocus };
//border-color: ${ COLORS.ui.borderFocus };
//box-shadow: ${ CONFIG.controlBoxShadowFocus };
z-index: 1;
// Windows High Contrast mode will show this outline, but not the box-shadow.
outline: 2px solid transparent;
Expand Down
Loading