From 21098080e7716379ceefefca5f3cc1850ac78fa7 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 7 Jun 2012 15:17:19 -0700 Subject: Body PI fixes. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/body-controller.js | 2 +- js/controllers/styles-controller.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'js/controllers') diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js index 9c427c62..106fdcd0 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js @@ -30,7 +30,7 @@ exports.BodyController = Montage.create(ElementController, { value: function(el, p) { switch(p) { case "background" : - return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", false, true)); + return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color")); case "border": return 0; case "height": diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 83722184..a25a05df 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js @@ -154,6 +154,10 @@ var stylesController = exports.StylesController = Montage.create(Component, { styles['-webkit-transform-style'] = 'preserve-3d'; needsRule = true; } + if(this.getElementStyle(this.currentDocument.model.documentRoot, "background-color", false, false) == null) { + styles['background-color'] = "transparent"; + needsRule = true; + } if(needsRule) { rule = this.addRule('.ninja-body{}'); -- cgit v1.2.3