mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-01 10:07:35 +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 [
|
"rules": Array [
|
||||||
".r-scrollbarWidth-2eszeu::-webkit-scrollbar{display:none}",
|
".r-scrollbarWidth-2eszeu::-webkit-scrollbar{display:none}",
|
||||||
".r-scrollbarWidth-2eszeu{overflow:-moz-scrollbars-none;-ms-overflow-style:none}",
|
".r-scrollbarWidth-2eszeu{overflow:-moz-scrollbars-none;-ms-overflow-style:none}",
|
||||||
|
".r-scrollbarWidth-2eszeu{scrollbar-width:none;}",
|
||||||
],
|
],
|
||||||
"value": "none",
|
"value": "none",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -148,9 +148,11 @@ function createAtomicRules(identifier: string, property, value): Rules {
|
|||||||
// https://drafts.csswg.org/css-scrollbars-1/
|
// https://drafts.csswg.org/css-scrollbars-1/
|
||||||
case 'scrollbarWidth': {
|
case 'scrollbarWidth': {
|
||||||
if (value === 'none') {
|
if (value === 'none') {
|
||||||
|
const block = createDeclarationBlock({ [property]: value });
|
||||||
rules.push(
|
rules.push(
|
||||||
`${selector}::-webkit-scrollbar{display:none}`,
|
`${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;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user