Skip to content

Commit

Permalink
libsass compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
angel-vladov committed Feb 13, 2022
1 parent 9e125cb commit 05c63c6
Show file tree
Hide file tree
Showing 20 changed files with 6,887 additions and 52 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v10.24.1
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.0
5 changes: 3 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ module.exports = function(grunt) {
stamp: {
options: {
banner: '/*!\n' +
' * Select2 Bootstrap Theme v<%= package.version %> (<%= package.homepage %>)\n' +
' * Copyright 2015-<%= grunt.template.today("yyyy") %> <%= package.author %> and contributors (https://github.com/select2/select2-bootstrap-theme/graphs/contributors)\n' +
' * Select2 Bootstrap 4 Theme v<%= package.version %> (<%= package.homepage %>)\n' +
' * Copyright 2018-<%= grunt.template.today("yyyy") %> <%= package.author %> and contributors (https://github.com/angel-vladov/select2-theme-bootstrap5/graphs/contributors)\n' +
' * Based on the original select2/select2-bootstrap-theme theme by Florian Kissling and contributors (https://github.com/select2/select2-bootstrap-theme/graphs/contributors)\n' +
' * Licensed under MIT (https://github.com/angel-vladov/select2-theme-bootstrap4/blob/master/LICENSE)\n' +
' */\n'
},
Expand Down
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
A [Select2](https://select2.github.io/) v4 [Theme](https://select2.github.io/examples.html#themes) for Bootstrap 4
![select2-theme-bootstrap4 version](https://img.shields.io/badge/select2--theme--bootstrap4-v1.0.0-brightgreen.svg)
# select2-theme-bootstrap4

![select2-theme-bootstrap4 version](https://img.shields.io/badge/select2--theme--bootstrap4-v1.0.1-brightgreen.svg)
[![License](http://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)

A [Select2](https://select2.github.io/) v4 [Theme](https://select2.github.io/examples.html#themes) for Bootstrap 4

Demonstrations [available](https://angel-vladov.github.io/select2-theme-bootstrap4/).

#### Compatibility
### Compatibility

Built and tested with Bootstrap v4 and Select2 v4.0.5 in latest Chrome, Firefox and Safari (Mac) and Internet Explorer 11.

#### Installation
### Installation

You can [download select2-bootstrap-theme from this GitHub repo](https://github.com/angel-vladov/select2-theme-bootstrap4/releases), install it using Bower or npm – required if you want to integrate the Sass or Less sources in your build process – or source the compiled CSS directly from CDNJS or jsDelivr.

##### Install using Bower or npm/yarn
#### Install using Bower or npm/yarn

You may install select2-bootstrap-theme with [Bower](https://bower.io/), [npm](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/):

Expand All @@ -28,13 +31,7 @@ yarn add select2-theme-bootstrap4
bower install select2-theme-bootstrap4
```

##### Source select2-bootstrap-theme from CDNJS or jsDelivr

~~select2-bootstrap-theme [is also available on CDNJS](https://cdnjs.com/libraries/select2-bootstrap-theme/) and [jsDelivr](http://www.jsdelivr.com/projects/select2-bootstrap-theme).~~

**TBD**

#### Usage
### Usage

select2-bootstrap-theme only works with Select2 v4.x. Applying the theme requires `select2-bootstrap.css` referenced after the default `select2.css` that comes with Select2:

Expand All @@ -57,7 +54,12 @@ You may also set it as the default theme for all Select2 widgets like so:
$.fn.select2.defaults.set( "theme", "bootstrap" );
```

#### Changelog
### Changelog

##### 1.0.1
* `libsass` friendly division by 2
* Added additional select2 examples
* Documentation updates

##### 1.0.0
* Dropped LESS support. _Bootstrap 4 is SASS only_
Expand Down Expand Up @@ -153,7 +155,7 @@ $.fn.select2.defaults.set( "theme", "bootstrap" );

##### 0.1.0-beta.1

#### Contributing
### Contributing

The project offers [Less](http://lesscss.org/) and [Sass](http://sass-lang.com/) sources for building `select2-bootstrap.css`; both make use of variables from either [Bootstrap](https://github.com/twbs/bootstrap) (Less) or [Bootstrap for Sass](https://github.com/twbs/bootstrap-sass). The demo pages are built using [Jekyll](http://jekyllrb.com/) and there are a bunch of [Grunt](http://gruntjs.com/) tasks to ease development.

Expand All @@ -172,11 +174,7 @@ Develop in `src/select2-bootstrap.scss` and test your changes using `grunt serve

`grunt scss2less` helps in converting the Sass source to its Less counterpart (and overwrites the existing `src/select2-bootstrap.less`), but doesn't do the full job – please review the changes to the Less source file and make the necessary adjustments.

#### TODO
* Drop LESS support and update scripts. Bootstrap 4 is SASS only.
* Add RTL version _(When Bootstrap 4 adds official support)_

#### Copyright and license
### Copyright and license

Forked and modified from [select2 Bootstrap 3 theme](https://github.com/select2/select2-bootstrap-theme). All credits go to the original authors.

Expand Down
9 changes: 5 additions & 4 deletions dist/select2-bootstrap.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*!
* Select2 Bootstrap Theme v1.0.0 (https://angel-vladov.github.io/select2-theme-bootstrap4)
* Copyright 2015-2020 Florian Kissling and contributors (https://github.com/select2/select2-bootstrap-theme/graphs/contributors)
* Select2 Bootstrap 4 Theme v1.0.1 (https://angel-vladov.github.io/select2-theme-bootstrap4)
* Copyright 2018-2022 Angel Vladov and contributors (https://github.com/angel-vladov/select2-theme-bootstrap5/graphs/contributors)
* Based on the original select2/select2-bootstrap-theme theme by Florian Kissling and contributors (https://github.com/select2/select2-bootstrap-theme/graphs/contributors)
* Licensed under MIT (https://github.com/angel-vladov/select2-theme-bootstrap4/blob/master/LICENSE)
*/

Expand Down Expand Up @@ -157,12 +158,12 @@
}

.select2-container--bootstrap .select2-results__option[aria-disabled=true] {
color: #6c757d;
color: #adb5bd;
cursor: not-allowed;
}

.select2-container--bootstrap .select2-results__option[aria-selected=true] {
background-color: #f8f9fa;
background-color: #e9ecef;
color: #16181b;
}

Expand Down
7 changes: 4 additions & 3 deletions dist/select2-bootstrap.min.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/4.0.10.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: default
version: 4.0.10
---
4 changes: 4 additions & 0 deletions docs/4.0.11.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: default
version: 4.0.11
---
4 changes: 4 additions & 0 deletions docs/4.0.12.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: default
version: 4.0.12
---
4 changes: 4 additions & 0 deletions docs/4.0.13.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: default
version: 4.0.13
---
4 changes: 4 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ versions:
- 4.0.3
- 4.0.4
- 4.0.5
- 4.0.10
- 4.0.11
- 4.0.12
- 4.0.13

title:
select2-theme-bootstrap4
2 changes: 1 addition & 1 deletion docs/_includes/footer-links.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ul class="footer-links">
<li class="version"><span class="hidden-xs">Currently</span> v1.0.0</li>
<li class="version"><span class="hidden-xs">Currently</span> v1.0.1</li>
<li>&middot;</li>
<li><a href="https://github.com/angel-vladov/select2-theme-bootstrap4">GitHub</a></li>
<li>&middot;</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ul>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="https://github.com/select2/select2-bootstrap-theme">
<a class="nav-link" href="https://github.com/angel-vladov/select2-theme-bootstrap4">
<i class="fa fa-github"></i>
GitHub
</a>
Expand Down
8 changes: 4 additions & 4 deletions docs/css/bootstrap.min.css

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions docs/css/select2-bootstrap.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*!
* Select2 Bootstrap Theme v1.0.0 (https://angel-vladov.github.io/select2-theme-bootstrap4)
* Copyright 2015-2020 Florian Kissling and contributors (https://github.com/select2/select2-bootstrap-theme/graphs/contributors)
* Select2 Bootstrap 4 Theme v1.0.1 (https://angel-vladov.github.io/select2-theme-bootstrap4)
* Copyright 2018-2022 Angel Vladov and contributors (https://github.com/angel-vladov/select2-theme-bootstrap5/graphs/contributors)
* Based on the original select2/select2-bootstrap-theme theme by Florian Kissling and contributors (https://github.com/select2/select2-bootstrap-theme/graphs/contributors)
* Licensed under MIT (https://github.com/angel-vladov/select2-theme-bootstrap4/blob/master/LICENSE)
*/

Expand Down Expand Up @@ -157,12 +158,12 @@
}

.select2-container--bootstrap .select2-results__option[aria-disabled=true] {
color: #6c757d;
color: #adb5bd;
cursor: not-allowed;
}

.select2-container--bootstrap .select2-results__option[aria-selected=true] {
background-color: #f8f9fa;
background-color: #e9ecef;
color: #16181b;
}

Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: minimal
version: 4.0.5
version: 4.0.13
---
<div class="jumbotron">
<div class="container">
Expand Down Expand Up @@ -36,7 +36,7 @@ <h1 class="jumbotron-title">Select2 Bootstrap Theme</h1>

<p class="lead">A <a href="https://select2.github.io/examples.html#themes">Select2 v4 theme</a> built with <a href="http://getbootstrap.com/">Bootstrap 4</a> variables and mixins.</p>

<a href="4.0.5.html" class="btn btn-outline btn-lg">Demonstrations</a>
<a href="4.0.13.html" class="btn btn-outline btn-lg">Demonstrations</a>
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions docs/js/bootstrap.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 05c63c6

Please sign in to comment.