Skip to content

Commit

Permalink
Adding trsform molecule #60
Browse files Browse the repository at this point in the history
  • Loading branch information
Krasimir Tsonev committed Mar 17, 2014
1 parent 8056d7b commit 787e38a
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client-side/build/absurd.js
@@ -1,4 +1,4 @@
/* version: 0.3.145, born: 10-2-2014 16:20 */
/* version: 0.3.147, born: 17-2-2014 23:10 */
var Absurd = (function(w) {
var lib = {
api: {},
Expand Down
7 changes: 6 additions & 1 deletion client-side/build/absurd.organic.js
@@ -1,4 +1,4 @@
/* version: 0.3.145, born: 10-2-2014 16:20 */
/* version: 0.3.147, born: 17-2-2014 23:10 */
var Organic = (function(w){
var o = {
helpers: {},
Expand Down Expand Up @@ -2128,6 +2128,11 @@ o.lib.molecules.transparent = function(value) {
r['opacity'] = value;
r['KhtmlOpacity'] = value;
return r;
}
o.lib.molecules.trsform = function(value) {
return {
'-wmso-transform': value
}
};
return o.index;
})(window);
2 changes: 1 addition & 1 deletion client-side/build/absurd.organic.min.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions client-side/tests/tests.from.node.js
Expand Up @@ -3053,6 +3053,17 @@ describe("Testing molecules", function() {
}, { minify: true });
});

it("should use trsform", function(done) {
api.add({
'.container': {
trsform: 'rotate(-20deg) scale(1.2, 1.2)'
}
}).compile(function(err, css) {
expect(css).toBe(".container{transform: rotate(-20deg) scale(1.2,1.2);-webkit-transform: rotate(-20deg) scale(1.2,1.2);-moz-transform: rotate(-20deg) scale(1.2,1.2);-ms-transform: rotate(-20deg) scale(1.2,1.2);-o-transform: rotate(-20deg) scale(1.2,1.2);}");
done();
}, { minify: true });
});

});
describe("Moving a selector to the top of the chain", function() {

Expand Down
5 changes: 5 additions & 0 deletions lib/processors/css/organic/lib/molecules/trsform.js
@@ -0,0 +1,5 @@
module.exports = function(value) {
return {
'-wmso-transform': value
}
}
4 changes: 2 additions & 2 deletions package.json
@@ -1,8 +1,8 @@
{
"name": "absurd",
"version": "0.3.146",
"version": "0.3.147",
"homepage": "http://absurdjs.com/",
"description": "CSS/HTML preprocessor. Check out krasimirtsonev.com/blog/article/AbsurdJS-fundamentals",
"description": "JavaScript library with superpowers - http://absurdjs.com/",
"main": "./index.js",
"author": {
"name": "Krasimir Tsonev",
Expand Down
5 changes: 5 additions & 0 deletions tasks/tmp/absurd-organic.js
Expand Up @@ -2075,4 +2075,9 @@ o.lib.molecules.transparent = function(value) {
r['opacity'] = value;
r['KhtmlOpacity'] = value;
return r;
}
o.lib.molecules.trsform = function(value) {
return {
'-wmso-transform': value
}
}
11 changes: 11 additions & 0 deletions tests/organic/molecules.spec.js
Expand Up @@ -220,4 +220,15 @@ describe("Testing molecules", function() {
}, { minify: true });
});

it("should use trsform", function(done) {
api.add({
'.container': {
trsform: 'rotate(-20deg) scale(1.2, 1.2)'
}
}).compile(function(err, css) {
expect(css).toBe(".container{transform: rotate(-20deg) scale(1.2,1.2);-webkit-transform: rotate(-20deg) scale(1.2,1.2);-moz-transform: rotate(-20deg) scale(1.2,1.2);-ms-transform: rotate(-20deg) scale(1.2,1.2);-o-transform: rotate(-20deg) scale(1.2,1.2);}");
done();
}, { minify: true });
});

});

0 comments on commit 787e38a

Please sign in to comment.