Data Types (Character Displays)
This document defines the data types you can use with APL-T.
APL-T does not support the full set of APL data types, such as
Dimensions in APL-T are expressed in three different ways: as an absolute, a relative, or as a special.
Absolute dimensions are simple numbers with an optional qualifier. If the qualifier is not specified, the absolute dimension is assumed to be in screen characters. The valid qualifiers are:
|1% of the viewport height. 100vh = viewport.height
|1% of the viewport width. 100vw = viewport.width
Relative dimensions are a string of the form “X%”, where X is a valid JSON number. A percentage dimension is interpreted as a percentage of the containing Component's bounding box. Since the bounding box has two dimensions (width and height), the appropriate dimension is chosen if the semantic of the property is inherently horizontal or vertical (e.g., paddingTop, height).
Note that percentage dimensions can create a dependency loop, in which case the results are undefined. For example, if the parent container has auto sizing and the child's height is set to “50%”, the result is undefined. The APL-T runtime will try to render something on the screen, but there is no guarantee of a consistent rendering experience between different devices.
Special dimensions are named values that have special processing. The only current special defined is “auto”, which means that the Component size should match its “natural” size. For example, a Text component with width and height “auto” will be laid out in a single line in a bounding box that exactly contains the text.
Was this page helpful?
Last updated: Nov 28, 2023