Skip to content

Commit 7d90600

Browse files
committed
fix application of "will-change" CSS prop on elements
1 parent dec01f4 commit 7d90600

File tree

8 files changed

+11
-12
lines changed

8 files changed

+11
-12
lines changed

docs/asset-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"files": {
3-
"main.js": "./main.f629e0d6.iframe.bundle.js",
3+
"main.js": "./main.287a7ceb.iframe.bundle.js",
44
"runtime~main.js": "./runtime~main.f398e60b.iframe.bundle.js",
55
"vendors~main.js": "./vendors~main.31a06b8d.iframe.bundle.js",
66
"vendors~main.js.map": "./vendors~main.31a06b8d.iframe.bundle.js.map",
@@ -10,6 +10,6 @@
1010
"entrypoints": [
1111
"runtime~main.f398e60b.iframe.bundle.js",
1212
"vendors~main.31a06b8d.iframe.bundle.js",
13-
"main.f629e0d6.iframe.bundle.js"
13+
"main.287a7ceb.iframe.bundle.js"
1414
]
1515
}

docs/iframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@
130130

131131

132132

133-
window['FRAMEWORK_OPTIONS'] = {"fastRefresh":true};</script><script src="runtime~main.f398e60b.iframe.bundle.js"></script><script src="vendors~main.31a06b8d.iframe.bundle.js"></script><script src="main.f629e0d6.iframe.bundle.js"></script></body></html>
133+
window['FRAMEWORK_OPTIONS'] = {"fastRefresh":true};</script><script src="runtime~main.f398e60b.iframe.bundle.js"></script><script src="vendors~main.31a06b8d.iframe.bundle.js"></script><script src="main.287a7ceb.iframe.bundle.js"></script></body></html>

docs/main.287a7ceb.iframe.bundle.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/main.f629e0d6.iframe.bundle.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@storybook/react": "^6.2.8",
5656
"@testing-library/jest-dom": "^5.11.10",
5757
"@testing-library/react": "^11.2.6",
58-
"@testing-library/user-event": "^13.1.3",
58+
"@testing-library/user-event": "^13.1.4",
5959
"@types/jest": "^26.0.22",
6060
"@types/node": "^14.14.41",
6161
"@types/react": "^17.0.3",

src/components/indicators/IndicatorIcons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ const IndicatorIcon = styled.div`
4545
`;
4646

4747
const Caret = styled.div<Pick<IndicatorIconsProps, 'menuOpen' | 'isInvalid'>>`
48+
will-change: transform, color;
4849
transition: ${({ theme }) => theme.icon.caret.transition};
4950
border-top: ${({ theme }) => theme.icon.caret.size} dashed;
5051
border-left: ${({ theme }) => theme.icon.caret.size} solid transparent;
5152
border-right: ${({ theme }) => theme.icon.caret.size} solid transparent;
52-
will-change: transform, color;
5353
5454
${({ theme, menuOpen, isInvalid }) =>
5555
menuOpen &&

src/components/menu/Menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const MenuWrapper = styled.div<MenuWrapperProps>`
3232
z-index: 999;
3333
cursor: default;
3434
position: absolute;
35-
will-change: opacity, box-shadow, display;
35+
will-change: opacity;
3636
3737
${({ menuTop, menuOpen, hideNoOptionsMsg, theme: { menu } }) => css`
3838
width: ${menu.width};
@@ -55,9 +55,9 @@ const MenuWrapper = styled.div<MenuWrapperProps>`
5555
white-space: nowrap;
5656
text-overflow: ellipsis;
5757
-webkit-tap-highlight-color: transparent;
58+
will-change: top, color, background-color;
5859
padding: ${({ theme }) => theme.menu.option.padding};
5960
text-align: ${({ theme }) => theme.menu.option.textAlign};
60-
will-change: top, opacity, color, background-color;
6161
6262
&.${OPTION_FOCUSED_CLS},
6363
&:hover:not(.${OPTION_DISABLED_CLS}):not(.${OPTION_SELECTED_CLS}) {

src/components/value/MultiValue.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type MultiValueProps = SelectedOption & Readonly<{
1212
removeSelectedOption: (value?: ReactText) => void;
1313
}>;
1414

15-
const _clearIconFocusStyle = css`
15+
const CLEAR_ICON_FOCUS_STYLE = css`
1616
z-index: 5000;
1717
transform: scale(1.26);
1818
color: ${({ theme }) => theme.multiValue.clear.focusColor};
@@ -21,7 +21,6 @@ const _clearIconFocusStyle = css`
2121
const MultiValueWrapper = styled.div`
2222
min-width: 0;
2323
display: flex;
24-
will-change: opacity;
2524
2625
${({ theme: { multiValue } }) => css`
2726
margin: ${multiValue.margin};
@@ -55,11 +54,11 @@ const Clear = styled.i<Pick<MultiValueProps, 'isFocused'>>`
5554
font-weight: ${clear.fontWeight};
5655
5756
:hover {
58-
${_clearIconFocusStyle}
57+
${CLEAR_ICON_FOCUS_STYLE}
5958
}
6059
`}
6160
62-
${({ isFocused }) => isFocused && _clearIconFocusStyle}
61+
${({ isFocused }) => isFocused && CLEAR_ICON_FOCUS_STYLE}
6362
`;
6463

6564
const MultiValue = memo<MultiValueProps>(({

0 commit comments

Comments
 (0)