Skip to content
Browse files

Added: base-convert built-in function

Added: base-convert test cases
  • Loading branch information...
1 parent e264579 commit 64caaf8c286f99b876053ca32ac6634416ef8845 @mythril committed
Showing with 42 additions and 0 deletions.
  1. +21 −0 test/cases/bifs.base-convert.css
  2. +21 −0 test/cases/bifs.base-convert.styl
View
21 test/cases/bifs.base-convert.css
@@ -0,0 +1,21 @@
+#test {
+ make-rrggbb: #ccaabb;
+}
+#test2 {
+ foo: 10;
+ foo: 11;
+ foo: 12;
+ foo: 13;
+ foo: 14;
+ foo: 15;
+ foo: 16;
+ foo: 17;
+ foo: 20;
+ foo: 22;
+}
+#test3 {
+ bar: 1;
+ bar: 01;
+ bar: 001;
+ bar: 0001;
+}
View
21 test/cases/bifs.base-convert.styl
@@ -0,0 +1,21 @@
+#test
+ make-rrggbb: s('#%s%s%s', base-convert(red(#ccaabb), 16), base-convert(green(#ccaabb), 16), base-convert(blue(#ccaabb), 16))
+
+#test2
+ foo: base-convert(16, 16)
+ foo: base-convert(16, 15)
+ foo: base-convert(16, 14)
+ foo: base-convert(16, 13)
+ foo: base-convert(16, 12)
+ foo: base-convert(16, 11)
+ foo: base-convert(16, 10)
+ foo: base-convert(16, 9)
+ foo: base-convert(16, 8)
+ foo: base-convert(16, 7)
+
+#test3
+ bar: base-convert(1, 10, 1);
+ bar: base-convert(1, 10, 2);
+ bar: base-convert(1, 10, 3);
+ bar: base-convert(1, 10, 4);
+

0 comments on commit 64caaf8

Please sign in to comment.
Something went wrong with that request. Please try again.