It looks like you can't add a node as a child of another node if the parent node has a display=BLOCK style.
from colosseum.constants import BLOCK
from colosseum.engine import layout
from colosseum import CSS
from tests.utils import TestNode, Display
root = TestNode(style=CSS(display=BLOCK), children=[TestNode()])
display = Display(dpi=96, width=1024, height=768)
layout(display, root)
Traceback (most recent call last):
File "test_box.py", line 25, in
layout(display, root)
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/engine.py", line 85, in layout
layout_box(display, node, containing_block, containing_block, font)
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/engine.py", line 234, in layout_box
calculate_height_and_margins(node, vertical)
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/engine.py", line 523, in calculate_height_and_margins
calculate_block_non_replaced_normal_flow_height(node, context)
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/engine.py", line 578, in calculate_block_non_replaced_normal_flow_height
content_height = last_child.layout.border_box_bottom
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/dimensions.py", line 393, in border_box_bottom
+ self.border_bottom_width
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'