Merge pull request #476 from NativeScript/feature/app-css-not-applied

FIX: App.css now applied when there is page css
This commit is contained in:
Vladimir Enchev
2015-07-24 09:50:31 +03:00

View File

@@ -38,7 +38,13 @@ export class StyleScope {
this._reset();
if (!this._cssSelectors) {
this._cssSelectors = new Array<cssSelector.CssSelector>();
// Always add app.css when initializing selectors
if (application.cssSelectorsCache) {
this._cssSelectors = StyleScope._joinCssSelectorsArrays([application.cssSelectorsCache]);
}
else {
this._cssSelectors = new Array<cssSelector.CssSelector>();
}
}
var selectorsFromFile = StyleScope.createSelectorsFromCss(cssString, cssFileName);