diff --git a/src/Layout.c b/src/Layout.c
index 6b2d9de3..f0bf426b 100644
--- a/src/Layout.c
+++ b/src/Layout.c
@@ -86,11 +86,17 @@ static void print_css_node_rec(
indent(level);
printf("{");
+ if (node->print) {
+ node->print(node->context);
+ }
+
if (options & CSS_PRINT_LAYOUT) {
+ printf("layout: {");
printf("width: %g, ", node->layout.dimensions[CSS_WIDTH]);
printf("height: %g, ", node->layout.dimensions[CSS_HEIGHT]);
printf("top: %g, ", node->layout.position[CSS_TOP]);
- printf("left: %g, ", node->layout.position[CSS_LEFT]);
+ printf("left: %g", node->layout.position[CSS_LEFT]);
+ printf("}, ");
}
if (options & CSS_PRINT_STYLE) {
@@ -160,6 +166,10 @@ static void print_css_node_rec(
print_number_nan("width", node->style.dimensions[CSS_WIDTH]);
print_number_nan("height", node->style.dimensions[CSS_HEIGHT]);
+ if (node->style.position_type == CSS_POSITION_ABSOLUTE) {
+ printf("position: 'absolute', ");
+ }
+
print_number_nan("left", node->style.position[CSS_LEFT]);
print_number_nan("right", node->style.position[CSS_RIGHT]);
print_number_nan("top", node->style.position[CSS_TOP]);
@@ -278,7 +288,7 @@ static bool isPosDefined(css_node_t *node, css_position_t position) {
}
static bool isMeasureDefined(css_node_t *node) {
- return node->style.measure;
+ return node->measure;
}
static float getPosition(css_node_t *node, css_position_t position) {
@@ -356,8 +366,8 @@ void layoutNode(css_node_t *node, float parentMaxWidth) {
// Let's not measure the text if we already know both dimensions
if (isRowUndefined || isColumnUndefined) {
- css_dim_t measure_dim = node->style.measure(
- node->style.measure_context,
+ css_dim_t measure_dim = node->measure(
+ node->context,
width
);
if (isRowUndefined) {
diff --git a/src/Layout.h b/src/Layout.h
index 649383a1..97cc4f94 100644
--- a/src/Layout.h
+++ b/src/Layout.h
@@ -82,9 +82,6 @@ typedef struct {
float padding[4];
float border[4];
float dimensions[2];
-
- css_dim_t (*measure)(void *context, float width);
- void *measure_context;
} css_style_t;
typedef struct css_node {
@@ -92,6 +89,10 @@ typedef struct css_node {
css_layout_t layout;
struct css_node *children;
int children_count;
+
+ css_dim_t (*measure)(void *context, float width);
+ void (*print)(void *context);
+ void *context;
} css_node_t;
diff --git a/src/Layout.js b/src/Layout.js
index 489feeb1..90549a86 100755
--- a/src/Layout.js
+++ b/src/Layout.js
@@ -234,7 +234,7 @@ var computeLayout = (function() {
// Let's not measure the text if we already know both dimensions
if (isRowUndefined || isColumnUndefined) {
var/*css_dim_t*/ measure_dim = node.style.measure(
- /*!node->style.measure_context,*/
+ /*!node->context,*/
width
);
if (isRowUndefined) {
diff --git a/src/__tests__/Layout-test.c b/src/__tests__/Layout-test.c
index 2a7ec565..21e19345 100644
--- a/src/__tests__/Layout-test.c
+++ b/src/__tests__/Layout-test.c
@@ -1,7 +1,8 @@
-
#include "../Layout.h"
#include "../Layout-test-utils.h"
+// @generated by transpile.html
+
int main()
{
{
@@ -2463,8 +2464,8 @@ int main()
css_node_t *root_node = new_css_node();
{
css_node_t *node_0 = root_node;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -2484,8 +2485,8 @@ int main()
{
css_node_t *node_0 = root_node;
node_0->style.dimensions[CSS_WIDTH] = 10;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -2512,8 +2513,8 @@ int main()
node_0->style.padding[CSS_TOP] = 5;
node_0->style.padding[CSS_RIGHT] = 5;
node_0->style.padding[CSS_BOTTOM] = 5;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -2592,8 +2593,8 @@ int main()
css_node_t *node_2;
node_2 = &node_1->children[0];
node_2->style.flex = CSS_FLEX_ONE;
- node_2->style.measure = measure;
- node_2->style.measure_context = "loooooooooong with space";
+ node_2->measure = measure;
+ node_2->context = "loooooooooong with space";
}
}
}
@@ -2643,8 +2644,8 @@ int main()
{
css_node_t *node_2;
node_2 = &node_1->children[0];
- node_2->style.measure = measure;
- node_2->style.measure_context = "loooooooooong with space";
+ node_2->measure = measure;
+ node_2->context = "loooooooooong with space";
}
}
}
@@ -2695,8 +2696,8 @@ int main()
css_node_t *node_2;
node_2 = &node_1->children[0];
node_2->style.dimensions[CSS_WIDTH] = 130;
- node_2->style.measure = measure;
- node_2->style.measure_context = "loooooooooong with space";
+ node_2->measure = measure;
+ node_2->context = "loooooooooong with space";
}
}
}
@@ -2740,8 +2741,8 @@ int main()
{
css_node_t *node_1;
node_1 = &node_0->children[0];
- node_1->style.measure = measure;
- node_1->style.measure_context = "loooooooooong with space";
+ node_1->measure = measure;
+ node_1->context = "loooooooooong with space";
}
}
@@ -2787,8 +2788,8 @@ int main()
{
css_node_t *node_2;
node_2 = &node_1->children[0];
- node_2->style.measure = measure;
- node_2->style.measure_context = "loooooooooong with space";
+ node_2->measure = measure;
+ node_2->context = "loooooooooong with space";
}
}
}
@@ -2918,8 +2919,8 @@ int main()
node_2->style.margin[CSS_TOP] = 20;
node_2->style.margin[CSS_RIGHT] = 20;
node_2->style.margin[CSS_BOTTOM] = 20;
- node_2->style.measure = measure;
- node_2->style.measure_context = "loooooooooong with space";
+ node_2->measure = measure;
+ node_2->context = "loooooooooong with space";
}
}
}
@@ -2971,8 +2972,8 @@ int main()
node_2->style.margin[CSS_TOP] = 20;
node_2->style.margin[CSS_RIGHT] = 20;
node_2->style.margin[CSS_BOTTOM] = 20;
- node_2->style.measure = measure;
- node_2->style.measure_context = "loooooooooong with space";
+ node_2->measure = measure;
+ node_2->context = "loooooooooong with space";
}
}
}
@@ -3017,8 +3018,8 @@ int main()
node_0->style.padding[CSS_TOP] = 7;
node_0->style.padding[CSS_RIGHT] = 7;
node_0->style.padding[CSS_BOTTOM] = 7;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -3033,6 +3034,41 @@ int main()
test("should layout text with alignItems: stretch", root_node, root_layout);
}
+ {
+ css_node_t *root_node = new_css_node();
+ {
+ css_node_t *node_0 = root_node;
+ init_css_node_children(node_0, 1);
+ {
+ css_node_t *node_1;
+ node_1 = &node_0->children[0];
+ node_1->style.position_type = CSS_POSITION_ABSOLUTE;
+ node_1->measure = measure;
+ node_1->context = "loooooooooong with space";
+ }
+ }
+
+ css_node_t *root_layout = new_css_node();
+ {
+ css_node_t *node_0 = root_layout;
+ node_0->layout.position[CSS_TOP] = 0;
+ node_0->layout.position[CSS_LEFT] = 0;
+ node_0->layout.dimensions[CSS_WIDTH] = 0;
+ node_0->layout.dimensions[CSS_HEIGHT] = 0;
+ init_css_node_children(node_0, 1);
+ {
+ css_node_t *node_1;
+ node_1 = &node_0->children[0];
+ node_1->layout.position[CSS_TOP] = 0;
+ node_1->layout.position[CSS_LEFT] = 0;
+ node_1->layout.dimensions[CSS_WIDTH] = 100;
+ node_1->layout.dimensions[CSS_HEIGHT] = 36;
+ }
+ }
+
+ test("should layout node with text and position absolute", root_node, root_layout);
+ }
+
{
css_node_t *root_node = new_css_node();
{
@@ -3064,8 +3100,8 @@ int main()
node_0->style.border[CSS_BOTTOM] = 2;
node_0->style.border[CSS_LEFT] = 2;
node_0->style.position[CSS_TOP] = 6;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -3112,8 +3148,8 @@ int main()
node_0->style.padding[CSS_RIGHT] = 13;
node_0->style.border[CSS_TOP] = 3;
node_0->style.border[CSS_BOTTOM] = 1;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -3186,8 +3222,8 @@ int main()
node_1->style.border[CSS_BOTTOM] = 0;
node_1->style.position[CSS_LEFT] = -10;
node_1->style.position[CSS_TOP] = 8;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
node_1 = &node_0->children[1];
node_1->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN;
node_1->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN;
@@ -3249,8 +3285,8 @@ int main()
node_0->style.border[CSS_LEFT] = 2;
node_0->style.border[CSS_RIGHT] = 2;
node_0->style.position[CSS_TOP] = -1;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -3316,8 +3352,8 @@ int main()
node_0->style.padding[CSS_RIGHT] = 17;
node_0->style.padding[CSS_BOTTOM] = 16;
node_0->style.position[CSS_TOP] = 0;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -3398,8 +3434,8 @@ int main()
node_0->style.border[CSS_TOP] = 3;
node_0->style.position[CSS_LEFT] = -8;
node_0->style.position[CSS_TOP] = 0;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -3428,8 +3464,8 @@ int main()
node_0->style.margin[CSS_TOP] = 12;
node_0->style.border[CSS_TOP] = 1;
node_0->style.position[CSS_LEFT] = 8;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -3471,8 +3507,8 @@ int main()
node_0->style.margin[CSS_TOP] = 8;
node_0->style.margin[CSS_RIGHT] = 6;
node_0->style.padding[CSS_RIGHT] = 16;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -3510,8 +3546,8 @@ int main()
node_0->style.border[CSS_LEFT] = 2;
node_0->style.position[CSS_LEFT] = 3;
node_0->style.position[CSS_TOP] = 5;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -3590,8 +3626,8 @@ int main()
node_1->style.border[CSS_BOTTOM] = 3;
node_1->style.position[CSS_LEFT] = -3;
node_1->style.position[CSS_TOP] = 0;
- node_1->style.measure = measure;
- node_1->style.measure_context = "loooooooooong with space";
+ node_1->measure = measure;
+ node_1->context = "loooooooooong with space";
node_1 = &node_0->children[1];
node_1->style.position_type = CSS_POSITION_ABSOLUTE;
node_1->style.margin[CSS_LEFT] = -7;
@@ -3625,8 +3661,8 @@ int main()
node_2->style.padding[CSS_BOTTOM] = 0;
node_2->style.border[CSS_LEFT] = 0;
node_2->style.position[CSS_LEFT] = 0;
- node_2->style.measure = measure;
- node_2->style.measure_context = "small";
+ node_2->measure = measure;
+ node_2->context = "small";
}
}
}
@@ -3734,8 +3770,8 @@ int main()
node_1->style.border[CSS_TOP] = 2;
node_1->style.border[CSS_BOTTOM] = 3;
node_1->style.position[CSS_LEFT] = 4;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
}
}
@@ -3778,8 +3814,8 @@ int main()
node_0->style.border[CSS_RIGHT] = 1;
node_0->style.border[CSS_BOTTOM] = 1;
node_0->style.position[CSS_LEFT] = -7;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -3843,8 +3879,8 @@ int main()
node_0->style.padding[CSS_TOP] = 4;
node_0->style.position[CSS_LEFT] = 0;
node_0->style.position[CSS_TOP] = 7;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -3968,8 +4004,8 @@ int main()
node_0->style.padding[CSS_BOTTOM] = 12;
node_0->style.border[CSS_LEFT] = 2;
node_0->style.position[CSS_LEFT] = -6;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -4085,8 +4121,8 @@ int main()
node_0->style.border[CSS_BOTTOM] = 0;
node_0->style.border[CSS_TOP] = 0;
node_0->style.position[CSS_LEFT] = 1;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -4140,8 +4176,8 @@ int main()
node_1->style.padding[CSS_LEFT] = 8;
node_1->style.padding[CSS_TOP] = 5;
node_1->style.position[CSS_LEFT] = 4;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
}
}
@@ -4254,8 +4290,8 @@ int main()
node_0->style.border[CSS_RIGHT] = 3;
node_0->style.border[CSS_BOTTOM] = 0;
node_0->style.position[CSS_LEFT] = 2;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -4281,8 +4317,8 @@ int main()
node_0->style.padding[CSS_LEFT] = 9;
node_0->style.border[CSS_RIGHT] = 0;
node_0->style.position[CSS_LEFT] = -5;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -4309,8 +4345,8 @@ int main()
node_0->style.margin[CSS_BOTTOM] = 6;
node_0->style.position[CSS_LEFT] = -2;
node_0->style.position[CSS_TOP] = -2;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -4391,8 +4427,8 @@ int main()
node_1->style.border[CSS_LEFT] = 0;
node_1->style.border[CSS_TOP] = 3;
node_1->style.position[CSS_LEFT] = -1;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
}
}
@@ -4459,8 +4495,8 @@ int main()
node_0->style.border[CSS_BOTTOM] = 0;
node_0->style.border[CSS_TOP] = 1;
node_0->style.position[CSS_LEFT] = -2;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -4503,8 +4539,8 @@ int main()
node_1->style.padding[CSS_RIGHT] = 14;
node_1->style.border[CSS_TOP] = 2;
node_1->style.position[CSS_TOP] = -1;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
node_1 = &node_0->children[1];
node_1->style.align_self = CSS_ALIGN_STRETCH;
node_1->style.dimensions[CSS_WIDTH] = 638;
@@ -4518,8 +4554,8 @@ int main()
node_1->style.padding[CSS_BOTTOM] = 14;
node_1->style.padding[CSS_TOP] = 18;
node_1->style.position[CSS_LEFT] = -7;
- node_1->style.measure = measure;
- node_1->style.measure_context = "loooooooooong with space";
+ node_1->measure = measure;
+ node_1->context = "loooooooooong with space";
}
}
@@ -4596,8 +4632,8 @@ int main()
node_0->style.border[CSS_TOP] = 2;
node_0->style.position[CSS_LEFT] = -9;
node_0->style.position[CSS_TOP] = -1;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -4709,8 +4745,8 @@ int main()
node_4->style.padding[CSS_LEFT] = 6;
node_4->style.padding[CSS_RIGHT] = 14;
node_4->style.padding[CSS_BOTTOM] = 19;
- node_4->style.measure = measure;
- node_4->style.measure_context = "small";
+ node_4->measure = measure;
+ node_4->context = "small";
}
}
}
@@ -4723,8 +4759,8 @@ int main()
node_1->style.border[CSS_RIGHT] = 3;
node_1->style.position[CSS_LEFT] = 4;
node_1->style.position[CSS_TOP] = 4;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
node_1 = &node_0->children[2];
node_1->style.justify_content = CSS_JUSTIFY_FLEX_START;
node_1->style.align_self = CSS_ALIGN_CENTER;
@@ -4735,8 +4771,8 @@ int main()
node_1->style.padding[CSS_BOTTOM] = 11;
node_1->style.border[CSS_TOP] = 0;
node_1->style.border[CSS_BOTTOM] = 3;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
}
}
@@ -4816,8 +4852,8 @@ int main()
node_0->style.border[CSS_LEFT] = 1;
node_0->style.border[CSS_TOP] = 2;
node_0->style.position[CSS_LEFT] = -6;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -4845,8 +4881,8 @@ int main()
node_0->style.margin[CSS_RIGHT] = 5;
node_0->style.margin[CSS_BOTTOM] = 18;
node_0->style.position[CSS_LEFT] = -8;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -4870,8 +4906,8 @@ int main()
node_0->style.padding[CSS_TOP] = 0;
node_0->style.padding[CSS_BOTTOM] = 11;
node_0->style.border[CSS_RIGHT] = 3;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -4940,8 +4976,8 @@ int main()
node_0->style.padding[CSS_BOTTOM] = 2;
node_0->style.border[CSS_LEFT] = 0;
node_0->style.border[CSS_BOTTOM] = 0;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -4971,8 +5007,8 @@ int main()
node_0->style.border[CSS_BOTTOM] = 2;
node_0->style.border[CSS_TOP] = 1;
node_0->style.border[CSS_RIGHT] = 1;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -5033,8 +5069,8 @@ int main()
node_0->style.border[CSS_BOTTOM] = 3;
node_0->style.position[CSS_LEFT] = -5;
node_0->style.position[CSS_TOP] = 2;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -5095,8 +5131,8 @@ int main()
node_0->style.padding[CSS_LEFT] = 5;
node_0->style.padding[CSS_TOP] = 17;
node_0->style.border[CSS_TOP] = 0;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -5144,8 +5180,8 @@ int main()
node_0->style.padding[CSS_BOTTOM] = 12;
node_0->style.padding[CSS_BOTTOM] = 7;
node_0->style.position[CSS_LEFT] = -3;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -5263,8 +5299,8 @@ int main()
node_1->style.border[CSS_TOP] = 0;
node_1->style.border[CSS_BOTTOM] = 3;
node_1->style.position[CSS_TOP] = -3;
- node_1->style.measure = measure;
- node_1->style.measure_context = "loooooooooong with space";
+ node_1->measure = measure;
+ node_1->context = "loooooooooong with space";
node_1 = &node_0->children[2];
node_1->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN;
node_1->style.justify_content = CSS_JUSTIFY_SPACE_AROUND;
@@ -5277,8 +5313,8 @@ int main()
node_1->style.padding[CSS_TOP] = 0;
node_1->style.padding[CSS_RIGHT] = 0;
node_1->style.padding[CSS_BOTTOM] = 0;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
node_1 = &node_0->children[3];
node_1->style.flex = CSS_FLEX_NONE;
node_1->style.margin[CSS_LEFT] = 0;
@@ -5295,8 +5331,8 @@ int main()
node_1->style.border[CSS_TOP] = 1;
node_1->style.border[CSS_RIGHT] = 0;
node_1->style.position[CSS_TOP] = -5;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
}
}
@@ -5409,8 +5445,8 @@ int main()
node_0->style.padding[CSS_RIGHT] = 14;
node_0->style.padding[CSS_BOTTOM] = 10;
node_0->style.position[CSS_LEFT] = -1;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -5548,8 +5584,8 @@ int main()
node_0->style.border[CSS_BOTTOM] = 1;
node_0->style.border[CSS_RIGHT] = 3;
node_0->style.position[CSS_TOP] = 3;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -5575,8 +5611,8 @@ int main()
node_0->style.padding[CSS_TOP] = 11;
node_0->style.padding[CSS_RIGHT] = 5;
node_0->style.border[CSS_RIGHT] = 1;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -5662,8 +5698,8 @@ int main()
node_0->style.padding[CSS_RIGHT] = 10;
node_0->style.border[CSS_LEFT] = 0;
node_0->style.position[CSS_LEFT] = -4;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -5795,8 +5831,8 @@ int main()
node_1->style.border[CSS_BOTTOM] = 0;
node_1->style.position[CSS_LEFT] = 8;
node_1->style.position[CSS_TOP] = -3;
- node_1->style.measure = measure;
- node_1->style.measure_context = "small";
+ node_1->measure = measure;
+ node_1->context = "small";
}
}
@@ -5895,8 +5931,8 @@ int main()
node_0->style.padding[CSS_RIGHT] = 9;
node_0->style.padding[CSS_BOTTOM] = 14;
node_0->style.position[CSS_TOP] = 7;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -5922,8 +5958,8 @@ int main()
node_0->style.margin[CSS_RIGHT] = 7;
node_0->style.margin[CSS_BOTTOM] = 7;
node_0->style.margin[CSS_BOTTOM] = 13;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -5958,8 +5994,8 @@ int main()
node_0->style.padding[CSS_BOTTOM] = 7;
node_0->style.border[CSS_RIGHT] = 0;
node_0->style.position[CSS_LEFT] = -6;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -6038,8 +6074,8 @@ int main()
node_2->style.padding[CSS_BOTTOM] = 13;
node_2->style.position[CSS_LEFT] = -5;
node_2->style.position[CSS_TOP] = 6;
- node_2->style.measure = measure;
- node_2->style.measure_context = "loooooooooong with space";
+ node_2->measure = measure;
+ node_2->context = "loooooooooong with space";
}
}
}
@@ -6090,8 +6126,8 @@ int main()
node_0->style.border[CSS_RIGHT] = 0;
node_0->style.position[CSS_LEFT] = -1;
node_0->style.position[CSS_TOP] = 4;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -6135,8 +6171,8 @@ int main()
node_0->style.border[CSS_LEFT] = 1;
node_0->style.border[CSS_TOP] = 0;
node_0->style.border[CSS_RIGHT] = 0;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -6182,8 +6218,8 @@ int main()
node_0->style.padding[CSS_TOP] = 15;
node_0->style.position[CSS_LEFT] = 3;
node_0->style.position[CSS_TOP] = 9;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
@@ -6210,8 +6246,8 @@ int main()
node_0->style.padding[CSS_BOTTOM] = 19;
node_0->style.border[CSS_BOTTOM] = 1;
node_0->style.position[CSS_TOP] = -3;
- node_0->style.measure = measure;
- node_0->style.measure_context = "small";
+ node_0->measure = measure;
+ node_0->context = "small";
}
css_node_t *root_layout = new_css_node();
@@ -6297,8 +6333,8 @@ int main()
node_0->style.border[CSS_BOTTOM] = 3;
node_0->style.border[CSS_LEFT] = 1;
node_0->style.border[CSS_BOTTOM] = 1;
- node_0->style.measure = measure;
- node_0->style.measure_context = "loooooooooong with space";
+ node_0->measure = measure;
+ node_0->context = "loooooooooong with space";
}
css_node_t *root_layout = new_css_node();
diff --git a/src/transpile.html b/src/transpile.html
index 78308167..a03409b6 100644
--- a/src/transpile.html
+++ b/src/transpile.html
@@ -14,6 +14,7 @@ textarea {