posit-dev / py-shiny

Shiny for Python
https://shiny.posit.co/py/
MIT License
1.3k stars 78 forks source link

Selectize & other 3rd party CSS should be re-compiled for Bootstrap 5 #782

Open cpsievert opened 1 year ago

cpsievert commented 1 year ago

py-shiny currently copies over CSS (and JS) from (R) shiny (which is pre-compiled with Bootstrap 3 in mind).

In the build script, we do re-compile CSS for ionRangeSlider to target Bootstrap 5 (+ our styling tweaks). We should be doing a similar thing for input_selectize(), input_date(), etc...

cpsievert commented 1 year ago

772 didn't close this issue. Here's a reprex of the problem. The border for input_selectize() doesn't match input_select() because selectize.css hasn't been compiled against bs_theme(preset = "shiny").

from shiny import App, Inputs, Outputs, Session, ui

app_ui = ui.page_fluid(
    ui.input_select("n", "N", choices=["a", "b", "c"]),
    ui.input_selectize("n2", "N2", choices=["a", "b", "c"]),
)

def server(input: Inputs, output: Outputs, session: Session):
    pass

app = App(app_ui, server)
Screenshot 2023-10-27 at 2 26 21 PM