Skip to content
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

Input Selectize render issues on superhero theme #30

Open
adampinky85 opened this issue Mar 13, 2024 · 2 comments
Open

Input Selectize render issues on superhero theme #30

adampinky85 opened this issue Mar 13, 2024 · 2 comments

Comments

@adampinky85
Copy link

Hi team,

We are using the Superhero theme which is really great!

Following upgrading from shiny 0.7.1 to 0.8.1 the input selectize ui element no longer renders correctly:

  • Previously it renders with a white background and selected elements with a nice grey boarder in the selection field.
  • Currently it renders with the theme background colour, the selected elements have the same colour, there is a white line between selected fields, and the selected fields are not easily visible.

Versions:
shiny: 0.8.1
shinyswatch: 0.5.1

Minimal Example:

import shiny
import shinyswatch


def server(_, __, ___):
    """Shiny main server"""


UI = shiny.ui.page_navbar(
    shinyswatch.theme.superhero(),
    shiny.ui.nav_panel(
        "dashboard",
        shiny.ui.input_selectize(
            "id",
            "labels",
            [1, 2, 3, 4],
            multiple=True,
        ),
    )
)

app = shiny.App(UI, server)
@gadenbuie
Copy link
Contributor

Thanks for the report @adampinky85!

Internal notes: the problem is that we use --bs-tertiary-bg in the selectize styles,

.selectize-dropdown .active:not(.selected) {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color)
}

but from what I can tell Bootswatch hasn't yet (or hasn't in the release we bundle) customized the tertiary colors for its themes.

In the Bootstrap docs, the tertiary colors are described as

Tertiary — Use the color option for even lighter text. Use the bg option to style backgrounds for hover states, accents, and wells.

So while our use of --bs-tertiary-bg is technically correct, it doesn't work across all Bootswatch themes. We could report this upstream, patch in bslib or here in shinyswatch, or adjust the selectize styles in shiny.

@adampinky85
Copy link
Author

Hi team, is there any update on fixing this issue? We would really appreciate being able to upgrade to the new versions. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants