[fix] CSS scrollbarWidth

The previous code wasn't inserting the W3C rule because it had the same selector as the rule for proprietary styles. However, the Firefox value isn't supported anymore, and the Edge value is unnecessary as Edge uses Blink now. This patch removes the non-WebKit fallback styles for this property.

Fix #1760
This commit is contained in:
Nicolas Gallagher
2020-10-06 11:38:17 -07:00
parent aad0c88cea
commit d8ee51e326
2 changed files with 1 additions and 5 deletions
@@ -63,7 +63,6 @@ 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;}",
],
"value": "none",
@@ -171,10 +171,7 @@ function createAtomicRules(identifier: string, property, value): Rules {
// https://drafts.csswg.org/css-scrollbars-1/
case 'scrollbarWidth': {
if (value === 'none') {
rules.push(
`${selector}::-webkit-scrollbar{display:none}`,
`${selector}{overflow:-moz-scrollbars-none;-ms-overflow-style:none;}`
);
rules.push(`${selector}::-webkit-scrollbar{display:none}`);
}
const block = createDeclarationBlock({ [property]: value });
rules.push(`${selector}${block}`);