File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -1044,6 +1044,30 @@ def test_yui_decimals(self):
10441044
10451045 self._test(input, output)
10461046
1047+ def test_yui_neg_decimals(self):
1048+ input = """
1049+ ::selection {
1050+ margin: -0.6px -0.333pt -1.2em -8.8cm;
1051+ }
1052+
1053+ """
1054+
1055+ output = """::selection{margin:-.6px -.333pt -1.2em -8.8cm}"""
1056+
1057+ self._test(input, output)
1058+
1059+ def test_yui_pos_decimals(self):
1060+ input = """
1061+ ::selection {
1062+ margin: +0.6px +0.333pt +1.2em +8.8cm;
1063+ }
1064+
1065+ """
1066+
1067+ output = """::selection{margin:.6px .333pt 1.2em 8.8cm}"""
1068+
1069+ self._test(input, output)
1070+
10471071 def test_yui_dollar_header(self):
10481072 input = """
10491073/*!
@@ -1402,6 +1426,29 @@ def test_yui_special_comments(self):
14021426
14031427 self._test(input, output)
14041428
1429+ def test_yui_remove_special_comments(self):
1430+ input = """
1431+ /*!************88****
1432+ Preserving comments
1433+ as they are
1434+ ********************
1435+ Keep the initial !
1436+ *******************/
1437+ #yo {
1438+ ma: "ma";
1439+ }
1440+ /*!
1441+ I said
1442+ pre-
1443+ serve! */
1444+ """
1445+
1446+ output = """#yo{ma:"ma"}"""
1447+
1448+ from csscompressor import compress
1449+ res = compress(input, preserve_exclamation_comments=False)
1450+ self.assertEqual(res, output)
1451+
14051452 def test_yui_star_underscore_hacks(self):
14061453 input = """
14071454 #elementarr {
You can’t perform that action at this time.
0 commit comments