Closed GoogleCodeExporter closed 9 years ago
A more specific example is setting 2 rules:
.my_content .left_column .box .box_1,
.my_content .left_column .box .box_2 {
padding-right: 0px;
padding-left: 8px;
width: 191px;
}
In this case, CSS Janus will swap the first .left_column to .right_column, and
not the second. Verified here:
http://cssjanus.commoner.com/
Original comment by chad.lit...@gmail.com
on 23 Oct 2008 at 9:11
It would be nice to get this fixed, but changing the class names (so they don't
include left or right) is also obviously an option. Classes separated by a
comma and
linebreak are flipped when they shouldn’t be. This doesn’t work in
http://cssjanus.commoner.com/ or when passing a css file to cssjanus on stdin.
Here's the sample:
.my_content .left_column .box .box_1,
.my_content .left_column .box .box_2 {
padding-right: 0px;
padding-left: 8px;
width: 191px;
}
CSS Janus returns:
.my_content .right_column .box .box_1,
.my_content .left_column .box .box_2 {
padding-left: 0px;
padding-right: 8px;
width: 191px;
}
I added a test case to report this (see below), but it passed. I think it
has something to do with the newline parsing.
--- a/www/scripts/cssjanus/cssjanus_test.py
+++ b/www/scripts/cssjanus/cssjanus_test.py
@@ -443,6 +443,12 @@ class CSSJANUSUnitTest(unittest.TestCase):
shouldbe = ['div.left > span.right+span.left { float: right }']
self.assertEqual(shouldbe, cssjanus.ChangeLeftToRightToLeft(testcase))
+ testcase = [""".my_content .left_column .box .box_1,"""
+ """.my_content .left_column .box .box_2 {\npadding-right:
0px;\npadding-left: 8px;\
+ shouldbe = [""".my_content .left_column .box .box_1,"""
+ """.my_content .left_column .box .box_2 {\npadding-left:
0px;\npadding-right: 8px;\
+ self.assertEqual(shouldbe, cssjanus.ChangeLeftToRightToLeft(testcase))
+
def testLongLineWithMultipleDefs(self):
testcase = ['body{direction:rtl;float:right}'
'.b2{direction:ltr;float:right}']
Original comment by SilvanT...@gmail.com
on 24 Oct 2008 at 1:14
fixed in rev #27
Original comment by els...@gmail.com
on 1 Jul 2009 at 12:14
Original issue reported on code.google.com by
jan.schn...@gmail.com
on 9 Mar 2008 at 6:44