Skip to content

Commit 3e86f34

Browse files
author
Florian Kissling
committed
Port changes from 2aed9e and 26c88a to Less; fix Less patch and path to Less source.
1 parent 3b588ad commit 3e86f34

File tree

3 files changed

+636
-17
lines changed

3 files changed

+636
-17
lines changed

src/select2-bootstrap.less

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,22 @@
262262
}
263263
}
264264

265+
/**
266+
* Clear the selection.
267+
*/
268+
269+
.select2-selection__clear {
270+
color: @clear-selection-color;
271+
cursor: pointer;
272+
float: right;
273+
font-weight: bold;
274+
margin-right: 10px;
275+
276+
&:hover {
277+
color: #333;
278+
}
279+
}
280+
265281
/**
266282
* Address disabled Select2 styles.
267283
*
@@ -331,22 +347,6 @@
331347
line-height: @line-height-base;
332348
padding: @padding-base-vertical @padding-base-horizontal + @caret-width-base*3 @padding-base-vertical @padding-base-horizontal;
333349

334-
/**
335-
* Clear the selection.
336-
*/
337-
338-
.select2-selection__clear {
339-
color: @clear-selection-color;
340-
cursor: pointer;
341-
float: right;
342-
font-weight: bold;
343-
margin-right: 10px;
344-
345-
&:hover {
346-
color: #333;
347-
}
348-
}
349-
350350
/**
351351
* Adjust the single Select2's dropdown arrow button appearance.
352352
*/
@@ -453,6 +453,14 @@
453453
color: #333;
454454
}
455455
}
456+
457+
/**
458+
* Clear the selection.
459+
*/
460+
461+
.select2-selection__clear {
462+
margin-top: @padding-base-vertical;
463+
}
456464
}
457465

458466

@@ -510,6 +518,10 @@
510518
height: @input-height-small - 2;
511519
line-height: @line-height-small;
512520
}
521+
522+
.select2-selection__clear {
523+
margin-top: @padding-small-vertical;
524+
}
513525
}
514526
}
515527

@@ -553,6 +565,10 @@
553565
height: @input-height-large - 2;
554566
line-height: @line-height-large;
555567
}
568+
569+
.select2-selection__clear {
570+
margin-top: @padding-large-vertical;
571+
}
556572
}
557573
}
558574

@@ -702,6 +718,14 @@
702718
}
703719
}
704720

721+
/**
722+
* Inline forms
723+
*/
724+
725+
.input-group .select2-container--bootstrap:not(:first-child):not(:last-child) .select2-selection {
726+
border-radius: 0;
727+
}
728+
705729
/**
706730
* Adjust alignment of Bootstrap buttons in Bootstrap Input Groups to address
707731
* Multi Select2's height which - depending on how many elements have been selected -

tests/less_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports.compileLess = function(test){
88

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

0 commit comments

Comments
 (0)