Skip to content

Commit d366294

Browse files
committed
Fix issue #64
1 parent 6cb1a8c commit d366294

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

src/prefixes-config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ module.exports = ({prefix}) => ({
33
prefixes: {
44
ltr: `[${prefix}=ltr]`,
55
rtl: `[${prefix}=rtl]`,
6-
dir: `[${prefix}]`,
76
},
87
regex: new RegExp(`\\[${prefix}(=(\\w+|"\\w+"))?\\]`),
98
},
109
class: {
1110
prefixes: {
1211
ltr: `.${prefix}-ltr`,
1312
rtl: `.${prefix}-rtl`,
14-
dir: `.${prefix}`,
1513
},
1614
regex: new RegExp(`\\.${prefix}(-\\w+)?`),
1715
},

src/test.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,12 @@ const run = (t, input, output, opts) => postcss([
1616
t.is(result.warnings().length, 0);
1717
});
1818

19-
test('Should NOT add [dir] prefix to symmetric rules', t => run(t,
20-
'a { font-size: 1em }',
21-
'a { font-size: 1em }'));
22-
2319
test('Should ONLY create LTR & RTL rules to asymmetric rules', t => run(t,
2420
'a { font-size: 1em; text-align: left }',
2521
'a { font-size: 1em }'
2622
+ '[dir=ltr] a { text-align: left }'
2723
+ '[dir=rtl] a { text-align: right }'));
2824

29-
test('Should add [dir] prefix to symmetric rules with direction related declarations', t => run(t,
30-
'a { text-align: center }',
31-
'[dir] a { text-align: center }'));
32-
33-
test('Should add [dir] prefix to symmetric rules with direction related declarations (2)', t => run(t,
34-
'a { font-size: 1em; text-align: center }',
35-
'a { font-size: 1em }'
36-
+ '[dir] a { text-align: center }'));
37-
38-
test('Should add [dir] prefix to symmetric rules with direction related declarations (3)', t => run(t,
39-
'a { text-align: left }'
40-
+ 'a { text-align: center }',
41-
'[dir=ltr] a { text-align: left }'
42-
+ '[dir=rtl] a { text-align: right }'
43-
+ '[dir] a { text-align: center }'));
44-
45-
test('Should add [dir] prefix to symmetric rules with direction related declarations (4)', t => run(t,
46-
'a { margin: 0 10px 0 0 }'
47-
+ 'a { margin-top: 20px }',
48-
'[dir=ltr] a { margin: 0 10px 0 0 }'
49-
+ '[dir=rtl] a { margin: 0 0 0 10px }'
50-
+ '[dir] a { margin-top: 20px }'));
51-
5225
test('Creates both LTR & RTL rules for asymmetric declarations', t => run(t,
5326
'a { text-align: left }',
5427
'[dir=ltr] a { text-align: left }'

0 commit comments

Comments
 (0)