You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importparamimportpathlibfrompanel.templateimportBootstrapTemplatefrompanel.template.themeimportDefaultTheme, ThemeclassBootstrapAcfTheme(DefaultTheme):
# To repro the issue, the css provided here should not be in the BUNDLE_DIRcss=param.Filename(default=pathlib.Path(__file__).parent/'bootstrap-acf.css')
_template=BootstrapTemplate#Providing my own theme to the BootstrapTemplatebootstrap_theme=BootstrapTemplate(title='Autocorrelation function', theme=BootstrapAcfTheme)
bootstrap_theme.show()
Upon rendering the page, the {{ raw_css }} tag from the template is replaced by the base_css instead of the content of bootstrap-acf.css. The served web page contains the following snippet, which comes from \panel\template\theme\default.css
This issue seems to be due to a cut and paste error. Line 620 uses theme.base_css, I am quite certain that it should use theme.css instead. Line 620 is an exact copy of line 613.
ALL software version info
Version 0.12.6. Problem can also be reproed using latest code available in the repo.
Description of expected behavior and the observed behavior
When using a css theme that is not located the BUNDLE_DIR, the BasicTemplate ignores the provided value, and uses the base_css instead.
Complete, minimal, self-contained example code that reproduces the issue
This is closely following the example from https://panel.holoviz.org/user_guide/Templates.html:
Upon rendering the page, the
{{ raw_css }}
tag from the template is replaced by the base_css instead of the content ofbootstrap-acf.css
. The served web page contains the following snippet, which comes from\panel\template\theme\default.css
Code
This issue seems to be due to a cut and paste error. Line 620 uses
theme.base_css
, I am quite certain that it should usetheme.css
instead. Line 620 is an exact copy of line 613.panel/panel/template/base.py
Lines 615 to 621 in 007475d
I'll provide a PR that corrects this.
The text was updated successfully, but these errors were encountered: