Skip to content

Include SELECT2_THEME settings #101

@codingjoe

Description

@codingjoe

Discussed in #99

Originally posted by CleitonDeLima October 29, 2021
Select2 accepts themes, an example is bootstrap4.

To configure it, you need to include a new css file and add the theme option when starting select2.

<link rel="stylesheet" href="/path/to/select2.css">
<link rel="stylesheet" href="/path/to/select2-bootstrap4.min.css">
$('select').select2({
    theme: 'bootstrap4',
});

The settings could look like this:

# accept str too
SELECT2_CSS = (
    "/path/to/select2.css",
    "/path/to/select2-bootstrap4.min.css",
)
SELECT2_THEME = `"bootstrap4"`

I am willing to develop this option if it is valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions