Why it's not possible to sizing_mode="stretch_both" on pn.Tabs if extension has set sizing_mode="stretch_width"?

Say you have an app like this:

import panel as pn

pn.extension(
    template="fast",
)

tab1 = pn.pane.Markdown("This is tab 1 content")
tab2 = pn.pane.Markdown("This is tab 2 content")

tabs = pn.Tabs(("Tab 1", tab1), ("Tab 2", tab2), sizing_mode="stretch_both")

tabs.servable()

The sizing_mode of “stretch_both” makes the Tabs component to take all the available width and height:

If you set the sizing_mode in the pn.extension like this:

import panel as pn

pn.extension(
    template="fast",
    sizing_mode="stretch_width", # added this
)

tab1 = pn.pane.Markdown("This is tab 1 content")
tab2 = pn.pane.Markdown("This is tab 2 content")

tabs = pn.Tabs(("Tab 1", tab1), ("Tab 2", tab2), sizing_mode="stretch_both")

tabs.servable()

you’ll get

Question

Why Panel does not respect the sizing_mode argument of the pn.Tabs component in the latter case? Isn’t the sizing_mode of pn.extension meant to be giving defaults for all the components?

Used versions

  • panel 1.4.0
  • param 2.1.0
  • bokeh 3.4.0
  • CPython 3.12.2 on Ubuntu