We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cb1a8c commit d0fe859Copy full SHA for d0fe859
src/selectors.js
@@ -8,18 +8,11 @@ const isRootSelector = (selector = '') => !!selector.match(/:root/);
8
9
const addDirToSelectors = (selectors = '', dir, options = {}) => {
10
const {addPrefixToSelector, prefixType} = options;
11
- // we swap direction prefixes if we are converting rtl styles to ltr
12
- if (options.fromRTL) {
13
- switch (dir) {
14
- case 'rtl':
15
- dir = 'ltr';
16
- break;
17
- case 'ltr':
18
- dir = 'rtl';
19
20
- default:
21
- }
+
+ if ((options.fromRTL && dir === 'rtl') || (!options.fromRTL && dir === 'ltr')) {
+ return selectors;
22
}
23
const prefix = generatePrefixes(options)[prefixType].prefixes[dir];
24
if (!prefix) return selectors;
25
0 commit comments