Skip to content

Commit

Permalink
fix(react-checkbox): update styles to not use CSS shorthands
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter committed Nov 29, 2021
1 parent 39306b4 commit 910a9dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "update styles to not use CSS shorthands",
"packageName": "@fluentui/react-checkbox",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';
import { shorthands, makeStyles, mergeClasses } from '@fluentui/react-make-styles';
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
import { CheckboxState } from './Checkbox.types';

Expand All @@ -13,7 +13,7 @@ const useStyles = makeStyles({
position: 'relative',
alignSelf: 'flex-start',
alignItems: 'center',
padding: '4px',
...shorthands.padding('4px'),
userSelect: 'none',
cursor: 'pointer',
}),
Expand Down Expand Up @@ -155,8 +155,8 @@ const useInputStyles = makeStyles({
input: {
opacity: 0,
position: 'absolute',
margin: 0,
padding: 0,
...shorthands.margin(0),
...shorthands.padding(0),
cursor: 'pointer',
},

Expand All @@ -170,19 +170,20 @@ const useIndicatorStyles = makeStyles({
width: '100%',
height: '100%',
fill: 'currentColor',
overflow: 'hidden',
overflowX: 'hidden',
overflowY: 'hidden',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
boxSizing: 'border-box',
borderStyle: 'solid',
borderRadius: theme.borderRadiusSmall,
borderWidth: theme.strokeWidthThin,
...shorthands.borderStyle('solid'),
...shorthands.borderWidth(theme.strokeWidthThin),
...shorthands.borderRadius(theme.borderRadiusSmall),
}),

circular: theme => ({
borderRadius: theme.borderRadiusCircular,
...shorthands.borderRadius(theme.borderRadiusCircular),
}),
});

Expand Down

0 comments on commit 910a9dc

Please sign in to comment.