Skip to content

Commit d2e8d61

Browse files
Quentin Woivrénecolas
authored andcommitted
[fix] Support for native scroll-width style
Close #1418
1 parent 1cce9a1 commit d2e8d61

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/react-native-web/src/exports/StyleSheet/__tests__/__snapshots__/compile-test.js.snap

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ Object {
6363
"property": "scrollbarWidth",
6464
"rules": Array [
6565
".r-scrollbarWidth-2eszeu::-webkit-scrollbar{display:none}",
66-
".r-scrollbarWidth-2eszeu{overflow:-moz-scrollbars-none;-ms-overflow-style:none}",
67-
".r-scrollbarWidth-2eszeu{scrollbar-width:none;}",
66+
".r-scrollbarWidth-2eszeu{overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none;}",
6867
],
6968
"value": "none",
7069
},

packages/react-native-web/src/exports/StyleSheet/compile.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,9 @@ function createAtomicRules(identifier: string, property, value): Rules {
148148
// https://drafts.csswg.org/css-scrollbars-1/
149149
case 'scrollbarWidth': {
150150
if (value === 'none') {
151-
const block = createDeclarationBlock({ [property]: value });
152151
rules.push(
153152
`${selector}::-webkit-scrollbar{display:none}`,
154-
`${selector}{overflow:-moz-scrollbars-none;-ms-overflow-style:none}`,
155-
`${selector}${block}`
153+
`${selector}{overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none;}`
156154
);
157155
}
158156
break;

0 commit comments

Comments
 (0)