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

fix(react-color-picker): design of thumb #33526

Merged
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
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: contrast border of thumb",
"packageName": "@fluentui/react-color-picker-preview",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const useThumbStyles = makeStyles({
outlineStyle: 'none',
ValentinaKozlova marked this conversation as resolved.
Show resolved Hide resolved
forcedColorAdjust: 'none',
borderRadius: tokens.borderRadiusCircular,
boxShadow: `0 0 0 calc(var(${thumbSizeVar}) * .2) ${tokens.colorNeutralBackground1} inset`,
boxShadow: `0 0 0 calc(var(${thumbSizeVar}) * .18) ${tokens.colorNeutralBackground1} inset`,
backgroundColor: `var(${colorAreaCSSVars.thumbColorVar})`,
transform: 'translate(-50%, 50%)',
[`${thumbPositionXVar}`]: `clamp(var(${innerThumbRadiusVar}), var(${colorAreaCSSVars.areaXProgressVar}), calc(100% - var(${innerThumbRadiusVar})))`,
Expand All @@ -67,7 +67,7 @@ const useThumbStyles = makeStyles({
borderRadius: tokens.borderRadiusCircular,
boxSizing: 'border-box',
content: "''",
border: `calc(var(${thumbSizeVar}) * .05) solid ${tokens.colorNeutralStroke1}`,
border: `calc(var(${thumbSizeVar}) * .05) solid ${tokens.colorNeutralStroke1Pressed}`,
},
},
focusIndicator: createFocusOutlineStyle({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const useThumbStyles = makeStyles({
outlineStyle: 'none',
forcedColorAdjust: 'none',
borderRadius: tokens.borderRadiusCircular,
boxShadow: `0 0 0 calc(var(${thumbSizeVar}) * .2) ${tokens.colorNeutralBackground1} inset`,
boxShadow: `0 0 0 calc(var(${thumbSizeVar}) * .18) ${tokens.colorNeutralBackground1} inset`,
backgroundColor: `var(${colorSliderCSSVars.thumbColorVar})`,
[`${thumbPositionVar}`]: `clamp(var(${innerThumbRadiusVar}), var(${colorSliderCSSVars.sliderProgressVar}), calc(100% - var(${innerThumbRadiusVar})))`,
'::before': {
Expand All @@ -141,7 +141,7 @@ const useThumbStyles = makeStyles({
borderRadius: tokens.borderRadiusCircular,
boxSizing: 'border-box',
content: "''",
border: `calc(var(${thumbSizeVar}) * .05) solid ${tokens.colorNeutralStroke1}`,
border: `calc(var(${thumbSizeVar}) * .05) solid ${tokens.colorNeutralStroke1Pressed}`,
},
},
horizontal: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const useStyles = makeStyles({
height: '50px',
borderRadius: '4px',
border: '1px solid #ccc',
'@media (forced-colors: active)': {
forcedColorAdjust: 'none',
},
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const useStyles = makeStyles({
borderRadius: tokens.borderRadiusMedium,
border: `1px solid ${tokens.colorNeutralStroke1}`,
margin: `${tokens.spacingVerticalMNudge} 0`,
'@media (forced-colors: active)': {
forcedColorAdjust: 'none',
},
},
button: {
marginRight: tokens.spacingHorizontalS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const useStyles = makeStyles({
height: '50px',
borderRadius: '4px',
border: `1px solid ${tokens.colorNeutralStroke1}`,
'@media (forced-colors: active)': {
forcedColorAdjust: 'none',
},
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ const useStyles = makeStyles({
height: '50px',
borderRadius: '4px',
border: '1px solid #ccc',
'@media (forced-colors: active)': {
forcedColorAdjust: 'none',
},
},
inputFields: {
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ const useStyles = makeStyles({
height: '50px',
borderRadius: '4px',
border: '1px solid #ccc',
'@media (forced-colors: active)': {
forcedColorAdjust: 'none',
},
},
row: {
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const useStyles = makeStyles({
height: '50px',
borderRadius: '4px',
border: '1px solid #ccc',
'@media (forced-colors: active)': {
forcedColorAdjust: 'none',
},
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const useStyles = makeStyles({
height: '50px',
borderRadius: '4px',
border: '1px solid #ccc',
'@media (forced-colors: active)': {
forcedColorAdjust: 'none',
},
},
});

Expand Down
Loading