Skip to content

Commit

Permalink
Port changes from 2aed9e and 26c88a to Less; fix Less patch and path …
Browse files Browse the repository at this point in the history
…to Less source.
  • Loading branch information
Florian Kissling committed Jun 17, 2015
1 parent 3b588ad commit 3e86f34
Show file tree
Hide file tree
Showing 3 changed files with 636 additions and 17 deletions.
56 changes: 40 additions & 16 deletions src/select2-bootstrap.less
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,22 @@
}
}

/**
* Clear the selection.
*/

.select2-selection__clear {
color: @clear-selection-color;
cursor: pointer;
float: right;
font-weight: bold;
margin-right: 10px;

&:hover {
color: #333;
}
}

/**
* Address disabled Select2 styles.
*
Expand Down Expand Up @@ -331,22 +347,6 @@
line-height: @line-height-base;
padding: @padding-base-vertical @padding-base-horizontal + @caret-width-base*3 @padding-base-vertical @padding-base-horizontal;

/**
* Clear the selection.
*/

.select2-selection__clear {
color: @clear-selection-color;
cursor: pointer;
float: right;
font-weight: bold;
margin-right: 10px;

&:hover {
color: #333;
}
}

/**
* Adjust the single Select2's dropdown arrow button appearance.
*/
Expand Down Expand Up @@ -453,6 +453,14 @@
color: #333;
}
}

/**
* Clear the selection.
*/

.select2-selection__clear {
margin-top: @padding-base-vertical;
}
}


Expand Down Expand Up @@ -510,6 +518,10 @@
height: @input-height-small - 2;
line-height: @line-height-small;
}

.select2-selection__clear {
margin-top: @padding-small-vertical;
}
}
}

Expand Down Expand Up @@ -553,6 +565,10 @@
height: @input-height-large - 2;
line-height: @line-height-large;
}

.select2-selection__clear {
margin-top: @padding-large-vertical;
}
}
}

Expand Down Expand Up @@ -702,6 +718,14 @@
}
}

/**
* Inline forms
*/

.input-group .select2-container--bootstrap:not(:first-child):not(:last-child) .select2-selection {
border-radius: 0;
}

/**
* Adjust alignment of Bootstrap buttons in Bootstrap Input Groups to address
* Multi Select2's height which - depending on how many elements have been selected -
Expand Down
2 changes: 1 addition & 1 deletion tests/less_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports.compileLess = function(test){

child = grunt.util.spawn({
cmd: 'lessc',
args: ['--verbose', 'src/select2-bootstrap.less', 'tmp/'+filename]
args: ['--verbose', 'src/build.less', 'tmp/'+filename]
}, function() {
var readFile = function(name) { return fs.readFileSync(name, {encoding: 'utf8'}) },
orig = readFile('dist/'+filename),
Expand Down
Loading

0 comments on commit 3e86f34

Please sign in to comment.