def cell_baseline(cell):
    """Return the y position of a cell baseline from the top of its border box.

    See https://www.w3.org/TR/CSS21/tables.html#height-layout

    """
    baseline_types = (boxes.LineBox, boxes.TableRowBox)
    result = find_in_flow_baseline(cell, baseline_types=baseline_types)
    if result is not None:
        return result - cell.position_y
    else:
        # Default to the bottom of the content area.
        return cell.border_top_width + cell.padding_top + cell.height
Return the y position of a cell baseline from the top of its border box.

See https://www.w3.org/TR/CSS21/tables.html#height-layout
weasyprint/layout/table.py