...

Text file src/oss.terrastruct.com/d2/e2etests/testdata/files/grid_even.d2

Documentation: oss.terrastruct.com/d2/e2etests/testdata/files

     1row no growth: {
     2  grid-rows: 2
     3
     4  # row 1
     5  a.width: 620
     6
     7  # row 2 width equals row 1 (with 40 in-between each)
     8  b.width: 200
     9  c.width: 150
    10  d.width: 100
    11  e.width: 50
    12}
    13
    14row 200 growth: {
    15  grid-rows: 2
    16
    17  # row 1
    18  a.width: 820
    19
    20  # row 2 needs to grow 200 to equal row 1
    21  b.width: 200
    22  # these 3 should grow proportionally until they reach b's width
    23  c.width: 150
    24  d.width: 100
    25  e.width: 50
    26}
    27
    28row big growth: {
    29  grid-rows: 2
    30
    31  # row 1
    32  a.width: 1420
    33  # row 2 needs to grow 800
    34  # these should all reach width 350
    35  b.width: 200 # 0   + 150
    36  c.width: 150 # 50  + 150
    37  d.width: 100 # 100 + 150
    38  e.width: 50 #  150 + 150
    39}
    40
    41column no growth: {
    42  grid-columns: 2
    43
    44  a.height: 620
    45  b.height: 200
    46  c.height: 150
    47  d.height: 100
    48  e.height: 50
    49}
    50
    51column 200 growth: {
    52  grid-columns: 2
    53
    54  a.height: 820
    55  b.height: 200
    56  c.height: 150
    57  d.height: 100
    58  e.height: 50
    59}
    60
    61column big growth: {
    62  grid-columns: 2
    63
    64  a.height: 1420
    65  b.height: 200
    66  c.height: 150
    67  d.height: 100
    68  e.height: 50
    69}

View as plain text