mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
url('some.css') is now optional
This commit is contained in:
@ -778,6 +778,17 @@ export function test_CSS_isAppliedOnPage_From_Import() {
|
||||
});
|
||||
}
|
||||
|
||||
export function test_CSS_isAppliedOnPage_From_Import_Without_Url() {
|
||||
var testButton = new buttonModule.Button();
|
||||
testButton.text = "Test";
|
||||
|
||||
helper.buildUIAndRunTest(testButton, function (views: Array<viewModule.View>) {
|
||||
var page: pageModule.Page = <pageModule.Page> views[1];
|
||||
page.css = "@import '~/ui/style/test.css';";
|
||||
helper.assertViewBackgroundColor(page, "#FF0000");
|
||||
});
|
||||
}
|
||||
|
||||
export function test_CSS_isAppliedOnPage_From_addCssFile() {
|
||||
var testButton = new buttonModule.Button();
|
||||
testButton.text = "Test";
|
||||
|
@ -8,7 +8,7 @@ import utils = require("utils/utils");
|
||||
import types = require("utils/types");
|
||||
import fs = require("file-system");
|
||||
|
||||
var pattern: RegExp = /url\(('|")(.*?)\1\)/;
|
||||
var pattern: RegExp = /('|")(.*?)\1/;
|
||||
|
||||
export class StyleScope {
|
||||
// caches all the visual states by the key of the visual state selectors
|
||||
|
Reference in New Issue
Block a user