Make align-items: stretch the default
This commit is contained in:
@@ -2729,11 +2729,13 @@ int main()
|
||||
css_node_t *root_node = new_test_css_node();
|
||||
{
|
||||
css_node_t *node_0 = root_node;
|
||||
node_0->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_0->style.dimensions[CSS_WIDTH] = 100;
|
||||
init_css_node_children(node_0, 1);
|
||||
{
|
||||
css_node_t *node_1;
|
||||
node_1 = node_0->get_child(node_0->context, 0);
|
||||
node_1->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_1->measure = measure;
|
||||
node_1->context = "loooooooooong with space";
|
||||
}
|
||||
@@ -2764,6 +2766,7 @@ int main()
|
||||
css_node_t *root_node = new_test_css_node();
|
||||
{
|
||||
css_node_t *node_0 = root_node;
|
||||
node_0->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_0->style.dimensions[CSS_WIDTH] = 100;
|
||||
node_0->style.padding[CSS_LEFT] = 10;
|
||||
node_0->style.padding[CSS_TOP] = 10;
|
||||
@@ -2773,6 +2776,7 @@ int main()
|
||||
{
|
||||
css_node_t *node_1;
|
||||
node_1 = node_0->get_child(node_0->context, 0);
|
||||
node_1->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_1->style.margin[CSS_LEFT] = 10;
|
||||
node_1->style.margin[CSS_TOP] = 10;
|
||||
node_1->style.margin[CSS_RIGHT] = 10;
|
||||
@@ -3044,14 +3048,17 @@ int main()
|
||||
css_node_t *root_node = new_test_css_node();
|
||||
{
|
||||
css_node_t *node_0 = root_node;
|
||||
node_0->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_0->style.dimensions[CSS_WIDTH] = 100;
|
||||
node_0->style.dimensions[CSS_HEIGHT] = 100;
|
||||
init_css_node_children(node_0, 2);
|
||||
{
|
||||
css_node_t *node_1;
|
||||
node_1 = node_0->get_child(node_0->context, 0);
|
||||
node_1->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_1->style.flex = 2.5;
|
||||
node_1 = node_0->get_child(node_0->context, 1);
|
||||
node_1->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_1->style.flex = 7.5;
|
||||
}
|
||||
}
|
||||
@@ -3086,13 +3093,16 @@ int main()
|
||||
css_node_t *root_node = new_test_css_node();
|
||||
{
|
||||
css_node_t *node_0 = root_node;
|
||||
node_0->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_0->style.dimensions[CSS_WIDTH] = 100;
|
||||
node_0->style.dimensions[CSS_HEIGHT] = 100;
|
||||
init_css_node_children(node_0, 2);
|
||||
{
|
||||
css_node_t *node_1;
|
||||
node_1 = node_0->get_child(node_0->context, 0);
|
||||
node_1->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_1 = node_0->get_child(node_0->context, 1);
|
||||
node_1->style.align_self = CSS_ALIGN_FLEX_START;
|
||||
node_1->style.flex = 0;
|
||||
}
|
||||
}
|
||||
|
@@ -827,8 +827,8 @@ describe('Layout', function() {
|
||||
|
||||
it('should layout node with text bounded by parent', function() {
|
||||
testLayout(
|
||||
{style: {width: 100}, children: [
|
||||
{style: {measure: text(texts.big)}}
|
||||
{style: {width: 100, alignSelf: 'flex-start'}, children: [
|
||||
{style: {measure: text(texts.big), alignSelf: 'flex-start'}}
|
||||
]},
|
||||
{width: 100, height: textSizes.bigHeight, top: 0, left: 0, children: [
|
||||
{width: textSizes.bigMinWidth, height: textSizes.bigHeight, top: 0, left: 0}
|
||||
@@ -838,8 +838,8 @@ describe('Layout', function() {
|
||||
|
||||
it('should layout node with text bounded by grand-parent', function() {
|
||||
testLayout(
|
||||
{style: {width: 100, padding: 10}, children: [
|
||||
{style: {margin: 10}, children: [
|
||||
{style: {width: 100, padding: 10, alignSelf: 'flex-start'}, children: [
|
||||
{style: {margin: 10, alignSelf: 'flex-start'}, children: [
|
||||
{style: {measure: text(texts.big)}}
|
||||
]}
|
||||
]},
|
||||
@@ -918,9 +918,9 @@ describe('Layout', function() {
|
||||
|
||||
it('should layout with arbitrary flex', function() {
|
||||
testLayout(
|
||||
{style: {width: 100, height: 100}, children: [
|
||||
{style: {flex: 2.5}},
|
||||
{style: {flex: 7.5}}
|
||||
{style: {width: 100, height: 100, alignSelf: 'flex-start'}, children: [
|
||||
{style: {flex: 2.5, alignSelf: 'flex-start'}},
|
||||
{style: {flex: 7.5, alignSelf: 'flex-start'}}
|
||||
]},
|
||||
{width: 100, height: 100, top: 0, left: 0, children: [
|
||||
{width: 0, height: 25, top: 0, left: 0},
|
||||
@@ -931,9 +931,9 @@ describe('Layout', function() {
|
||||
|
||||
it('should layout with negative flex', function() {
|
||||
testLayout(
|
||||
{style: {width: 100, height: 100}, children: [
|
||||
{style: {flex: -2.5}},
|
||||
{style: {flex: 0}}
|
||||
{style: {width: 100, height: 100, alignSelf: 'flex-start'}, children: [
|
||||
{style: {flex: -2.5, alignSelf: 'flex-start'}},
|
||||
{style: {flex: 0, alignSelf: 'flex-start'}}
|
||||
]},
|
||||
{width: 100, height: 100, top: 0, left: 0, children: [
|
||||
{width: 0, height: 0, top: 0, left: 0},
|
||||
|
Reference in New Issue
Block a user