-
-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul CSS and stylesheet handling for Bokeh 3.x #4275
Conversation
pre-commit.ci autofix |
@maximlt @hoxbro If you guys continue working on this, simply create the component CSS files in the template directories and reference them using a relative path:
Whenever you edit the CSS files you'll have to bundle them with: panel bundle --templates --verbose --only-local This will copy them to the correct place in the |
0a7de84
to
4680fca
Compare
eee3847
to
081ca6d
Compare
9a1c4a4
to
dfb912c
Compare
d647620
to
a34a554
Compare
Codecov Report
@@ Coverage Diff @@
## branch-1.0 #4275 +/- ##
==============================================
- Coverage 73.36% 73.33% -0.04%
==============================================
Files 238 239 +1
Lines 34594 34674 +80
==============================================
+ Hits 25380 25428 +48
- Misses 9214 9246 +32
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
In bokeh 3.1 we can define
ImportedStyleSheet
models from Python, providing a cleaner mechanism than adding a custom property which then has to be converted toImportedStyleSheet
instances on the JS side.The templates will then iterate over all components and inject custom stylesheets that extend the default styling of each component. Currently this adds a single
components.css
file for each template which will be injected on each component. We may decide to break this up and make component specific stylesheets that only inject the necessary CSS.Developing
To develop the stylesheets select a particular template and then start editing the CSS files associated with that template and re-bundle them with:
panel bundle --templates --local-only
. Since this can be tedious you usewatch panel bundle --templates --only-local --verbose
to periodically re-run the bundling every few seconds.Run the following application to check the styling of different components (note we should update this app to include a variety of components):
MaterialTemplate
Here's the output for the app above for the MaterialTemplate, we should also keep this updated.
BootstrapTemplate
Here's the output for the app above for the MaterialTemplate, we should also keep this updated.