mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(color): support web standard #rrggbbaa format
original pr credit to @farfromrefug https://github.com/NativeScript/NativeScript/pull/8519 BREAKING CHANGE Long standing inconsistency with color handling here. BEFORE: ``` // #aarrggbb const color = new Color('#ff00ff00'); Label { background-color: #ff00ff00; } ``` AFTER: ``` // #rrggbbaa const color = new Color('#00ff00ff'); Label { background-color: #00ff00ff; } ```
This commit is contained in:
@@ -295,8 +295,8 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
||||
const label = this.testView;
|
||||
|
||||
const fontSize = 14;
|
||||
const color = '#FFFF0000';
|
||||
const backgroundColor = '#FF00FF00';
|
||||
const color = '#FF0000FF';
|
||||
const backgroundColor = '#00FF00FF';
|
||||
const testCss = ['.title {background-color: ', backgroundColor, '; ', 'color: ', color, '; ', 'font-size: ', fontSize, ';}'].join('');
|
||||
|
||||
// >> label-cssclass
|
||||
@@ -566,7 +566,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
||||
let view = this.testView;
|
||||
let page = this.testPage;
|
||||
this.waitUntilTestElementIsLoaded();
|
||||
let expectedColor = '#FFFF0000';
|
||||
let expectedColor = '#FF0000FF';
|
||||
let expectedNormalizedColor = '#FF0000';
|
||||
|
||||
page.css = 'label:disabled { background-color: ' + expectedColor + '; }';
|
||||
|
||||
Reference in New Issue
Block a user