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

optgroup wrong font style #19

Closed
michele-b opened this issue Jul 15, 2015 · 3 comments
Closed

optgroup wrong font style #19

michele-b opened this issue Jul 15, 2015 · 3 comments
Milestone

Comments

@michele-b
Copy link

font-size is wrong, and maybe color also...simply remove it from select2-results__group style

.select2-container--bootstrap .select2-results__group {
    /*color: #777;*/
    display: block;
    padding: 6px 12px;
    /*font-size: 12px;*/
    line-height: 1.428571429;
    white-space: nowrap;
}
@NaWer
Copy link

NaWer commented Nov 24, 2015

And padding too : 6 4 seems okay.

@fk
Copy link
Member

fk commented Aug 29, 2016

Hey @michele-b and @NaWer!

If you take a look at the Sass (or Less) sources for .select2-results__group and compare them to the style definitions for Bootstraps "Dropdown header", you will find that we mimick the latter in terms of font-size, line-height and color (while the padding is based on Bootstraps definitions for .form-control and we do not alter the browser default styles of the <strong> tag the class is applied to).
The Bootstrap documentation describes the purpose of the "Dropdown header" as "to label sections of actions in any dropdown menu" – which is very close to the job that .select2-results__group is doing.

If you need to change the styles for .select2-results__group, just add some custom CSS, e. g.

.select2-container--bootstrap .select2-results__group {
    color: inherit;
    font-size: inherit;
    padding: 6px 4px;
}

For those who do compile their own select2-bootstrap-theme from the Sass or Less source, the next theme update will introduce a bunch of variables enabling you to change the properties in question.

@fk fk added this to the 0.1.0-beta.9 milestone Aug 29, 2016
@fk
Copy link
Member

fk commented Aug 31, 2016

As announced, 0.1.0-beta.9 provides dedicated variables.

@fk fk closed this as completed Aug 31, 2016
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

3 participants