From 162f81ea0d7d56a3fd6aec0555e5e72187a0caa5 Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Thu, 4 Feb 2016 19:03:28 -0800 Subject: [PATCH] Fixes for IE style ordering issue. --- src/standard/styling.html | 4 +++- src/standard/x-styling.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/standard/styling.html b/src/standard/styling.html index 80bc2ed1b9..fc637c9483 100644 --- a/src/standard/styling.html +++ b/src/standard/styling.html @@ -47,7 +47,9 @@ var cssText = styleTransformer.elementStyles(this); // do we really need to output shimmed styles var needsStatic = this._needsStaticStyles(this._styles); - cssText = needsStatic ? cssText : ''; + // NOTE: IE has css style ordering issues unless there's at least a + // space in the stylesheet. + cssText = needsStatic ? cssText : ' '; // under shady dom we always output a shimmed style (which may be // empty) so that other dynamic stylesheets can always be placed // after the element's main stylesheet. diff --git a/src/standard/x-styling.html b/src/standard/x-styling.html index b64d5a9c45..6d16020e83 100644 --- a/src/standard/x-styling.html +++ b/src/standard/x-styling.html @@ -32,7 +32,7 @@ _needsStaticStyles: function(styles) { var needsStatic; for (var i=0, l=styles.length, css; i < l; i++) { - css = styles[i].textContent; + css = styleUtil.parser._clean(styles[i].textContent); needsStatic = needsStatic || Boolean(css); if (css.match(propertyUtils.rx.MIXIN_MATCH) || css.match(propertyUtils.rx.VAR_MATCH)) {