mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-24 15:18:19 +00:00
[fix] Add support for browsers that implement scrollbar-width
Close #1395
This commit is contained in:
committed by
Nicolas Gallagher
parent
a7ddd7b9ac
commit
ef770d4bd1
+1
@@ -64,6 +64,7 @@ Object {
|
||||
"rules": Array [
|
||||
".r-scrollbarWidth-2eszeu::-webkit-scrollbar{display:none}",
|
||||
".r-scrollbarWidth-2eszeu{overflow:-moz-scrollbars-none;-ms-overflow-style:none}",
|
||||
".r-scrollbarWidth-2eszeu{scrollbar-width:none;}",
|
||||
],
|
||||
"value": "none",
|
||||
},
|
||||
|
||||
@@ -148,9 +148,11 @@ function createAtomicRules(identifier: string, property, value): Rules {
|
||||
// https://drafts.csswg.org/css-scrollbars-1/
|
||||
case 'scrollbarWidth': {
|
||||
if (value === 'none') {
|
||||
const block = createDeclarationBlock({ [property]: value });
|
||||
rules.push(
|
||||
`${selector}::-webkit-scrollbar{display:none}`,
|
||||
`${selector}{overflow:-moz-scrollbars-none;-ms-overflow-style:none}`
|
||||
`${selector}{overflow:-moz-scrollbars-none;-ms-overflow-style:none}`,
|
||||
`${selector}${block}`
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user