mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Introduce background shorthand property (#5053)
* Introduce background shorthand style property * Add text property in parser for BackgroundPosition value reason: prevent parsing of background position (pass it as sample string) * Introduce background-shorthand test page * Modify parser unit tests to respect the new BackgroundPosition 'text' property
This commit is contained in:
committed by
Svetoslav
parent
ac3c895c89
commit
fc9a0b7ad8
@@ -254,6 +254,13 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
|
||||
this.style.color = value;
|
||||
}
|
||||
|
||||
get background(): string {
|
||||
return this.style.background;
|
||||
}
|
||||
set background(value: string) {
|
||||
this.style.background = value;
|
||||
}
|
||||
|
||||
get backgroundColor(): Color {
|
||||
return this.style.backgroundColor;
|
||||
}
|
||||
|
||||
5
tns-core-modules/ui/core/view/view.d.ts
vendored
5
tns-core-modules/ui/core/view/view.d.ts
vendored
@@ -163,6 +163,11 @@ export abstract class View extends ViewBase {
|
||||
*/
|
||||
color: Color;
|
||||
|
||||
/**
|
||||
* Gets or sets the background style property.
|
||||
*/
|
||||
background: string;
|
||||
|
||||
/**
|
||||
* Gets or sets the background color of the view.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user