mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-04 19:05:49 +00:00
[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:
-1
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user