Alternative XML properties - tremho/thunderbolt-common GitHub Wiki
Alternatives to normal CSS names
There are some cases where Thunderbolt has defined aliases for properties normally known by other CSS names.
align
,alignSelf
,hAlign
,vAlign
,horizontalAlignment
,verticalAlignment
Thealign
oralignSelf
property may contain one or both horizontal and vertical components, separated by either comma or space. Otherwise,hAlign
andvAlign
may be defined independentlyhAlign
values are one ofleft
,center
, orright
vAlign
values are one oftop
,middle
, orbottom
horizontalAlignment
andverticalAlignment
are synonymous withhAlign
andvAlign
, respectively.
background
vs. backgroundSettings
In CSS, the background
property is an aggregate shorthand for multiple possible background settings.
However, in Nativescript, it's really just an alias for 'background-color'. Setting anything other than a recognized color to background
will result in an error cannot set value of null
As a result, Thunderbolt supports the same semantics under the property background-settings
(backgroundSettings
). Like background
for CSS, this will parse and distribute the values given to the individual background properties.
You can also use the individual background properties in either XML markup or in CSS:
- background-color
- background-image see asset notes
- background-repeat
- background-position note that if providing values, both must be provided.
- background-size note that if providing values, both must be provided. also: unsized Android images will be smaller than elsewhere, but sized images are consistent with the appearance of other platforms