| 22277 | "nw-resize": "ne-resize" |
| 22278 | }; |
| 22279 | function rtlifyRules(options, rulePairs, index) { |
| 22280 | if (options.rtl) { |
| 22281 | var name_1 = rulePairs[index]; |
| 22282 | if (!name_1) return; |
| 22283 | var value = rulePairs[index + 1]; |
| 22284 | if (typeof value === "string" && value.indexOf(NO_FLIP) >= 0) rulePairs[index + 1] = value.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g, ""); |
| 22285 | else if (name_1.indexOf(LEFT) >= 0) rulePairs[index] = name_1.replace(LEFT, RIGHT); |
| 22286 | else if (name_1.indexOf(RIGHT) >= 0) rulePairs[index] = name_1.replace(RIGHT, LEFT); |
| 22287 | else if (String(value).indexOf(LEFT) >= 0) rulePairs[index + 1] = value.replace(LEFT, RIGHT); |
| 22288 | else if (String(value).indexOf(RIGHT) >= 0) rulePairs[index + 1] = value.replace(RIGHT, LEFT); |
| 22289 | else if (NAME_REPLACEMENTS[name_1]) rulePairs[index] = NAME_REPLACEMENTS[name_1]; |
| 22290 | else if (VALUE_REPLACEMENTS[value]) rulePairs[index + 1] = VALUE_REPLACEMENTS[value]; |
| 22291 | else switch(name_1){ |
| 22292 | case "margin": |
| 22293 | case "padding": |
| 22294 | rulePairs[index + 1] = flipQuad(value); |
| 22295 | break; |
| 22296 | case "box-shadow": |
| 22297 | rulePairs[index + 1] = negateNum(value, 0); |
| 22298 | break; |
| 22299 | } |
| 22300 | } |
| 22301 | } |
| 22302 | /** |
| 22303 | * Given a string value in a space delimited format (e.g. "1 2 3 4"), negates a particular value. |
| 22304 | */ function negateNum(value, partIndex) { |