[fix] Support for native scroll-width style

Close #1418
This commit is contained in:
Quentin Woivré
2019-08-16 13:09:30 -07:00
committed by Nicolas Gallagher
parent 1cce9a1668
commit d2e8d616e2
2 changed files with 2 additions and 5 deletions
@@ -63,8 +63,7 @@ Object {
"property": "scrollbarWidth",
"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;}",
".r-scrollbarWidth-2eszeu{overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none;}",
],
"value": "none",
},
@@ -148,11 +148,9 @@ 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}${block}`
`${selector}{overflow:-moz-scrollbars-none;-ms-overflow-style:none;scrollbar-width:none;}`
);
}
break;