Skip to content

[BUG] Div model layout differences between bokeh 2.2.3 and 2.3.1 #11161

@jeffreymonaco

Description

@jeffreymonaco

On upgrading from bokeh 2.2.3 to bokeh 2.3.1, layouts of my apps are visually different; inspection of JavaScript console information points to changes in the Div elements as the cause.

Here’s a standalone minimal reproducible example to highlight the issue, where it seems that width and height properties of the Div model are no longer honored when rendered.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
"""

from bokeh.models import Div
from bokeh.io import show

_text = """
    <div>
        <span style="font-weight: bold; color: #1F77B4; font-size: 100%">
        Sampling Period
        </span>
    </div>"""
_div = Div(text=_text, width=500, height=50, margin=(5,5,5,5), background='#EFEFEF')

show(_div)

The browser output with the Div elements properties shown in the console for bokeh 2.2.3 …

image

The browser output with the Div elements properties shown in the console for bokeh 2.3.1 …

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions