Browse Source

Fixing min-height issues

pull/2209/head
jlukic 9 years ago
parent
commit
586ff85796
2 changed files with 14 additions and 10 deletions
  1. 8
      src/definitions/modules/dropdown.js
  2. 16
      src/themes/default/modules/dropdown.variables

8
src/definitions/modules/dropdown.js

@ -1230,6 +1230,9 @@ $.fn.dropdown = function(parameters) {
query: function() {
return $.trim($search.val());
},
searchWidth: function(characterCount) {
return (characterCount * settings.glyphWidth) + 'em';
},
selectionCount: function() {
var
values = module.get.values()
@ -1596,8 +1599,8 @@ $.fn.dropdown = function(parameters) {
? module.get.query()
: '',
hasSearchValue = (typeof searchValue === 'string' && searchValue.length > 0),
searchWidth = (searchValue.length * settings.glyphWidth) + 'em',
valueIsSet = $input.val() !== ''
searchWidth = module.get.searchWidth(searchValue.length),
valueIsSet = searchValue !== ''
;
if(isMultiple && hasSearchValue) {
module.verbose('Adjusting input width', searchWidth, settings.glyphWidth);
@ -2034,6 +2037,7 @@ $.fn.dropdown = function(parameters) {
searchTerm: function() {
module.verbose('Cleared search term');
$search.val('');
module.set.filtered();
},
selected: function(value) {
var

16
src/themes/default/modules/dropdown.variables

@ -91,7 +91,7 @@
@menuInputPadding: @menuInputVerticalPadding @menuInputHorizontalPadding;
/* Menu Image */
@menuImageMaxHeight: 2.5em;
@menuImageMaxHeight: 2em;
/* Item Sub-Element */
@itemElementFloat: none;
@ -227,14 +227,14 @@
/* Multiple */
/* Split Actual Padding Between Child and Group (allows for label spacing) */
@multipleSelectionVerticalPadding: (@searchSelectionVerticalPadding * (4/9));
/* Split Actual Padding Between Child and Parent (allows for label spacing) */
@multipleSelectionVerticalPadding: (@searchSelectionVerticalPadding * (1/3));
@multipleSelectionLeftPadding: (@selectionHorizontalPadding - @labelHorizontalPadding);
@multipleSelectionRightPadding: @selectionIconDistance;
@multipleSelectionPadding: @multipleSelectionVerticalPadding @multipleSelectionRightPadding @multipleSelectionVerticalPadding @multipleSelectionLeftPadding;
/* Child Elements */
@multipleSelectionChildVerticalMargin: (@searchSelectionVerticalPadding * (5/9));
@multipleSelectionChildVerticalMargin: (@searchSelectionVerticalPadding * (2/3));
@multipleSelectionChildSpacing: 0.4285em;
@multipleSelectionChildMargin: @multipleSelectionChildVerticalMargin 0em @multipleSelectionChildVerticalMargin @multipleSelectionChildSpacing;
@multipleSelectionChildLineHeight: @searchSelectionLineHeight;
@ -245,13 +245,13 @@
@multipleSelectionDropdownIconPadding: 0.5em;
/* Selection Label */
@labelSize: @relativeSmall;
@labelHorizontalSpacing: 0.46153em; /* 6px @ 13px/em */
@labelVerticalSpacing: (0.46153em / 2);
@labelSize: @relativeMedium;
@labelHorizontalSpacing: 0.2857142rem; /* 4px @ 14px/rem */
@labelVerticalSpacing: (0.2857142em / 2);
@labelMargin: @labelVerticalSpacing @labelHorizontalSpacing @labelVerticalSpacing 0em;
@labelBoxShadow: 0px 0px 0px 1px @borderColor inset;
@labelVerticalPadding: 0.3846em; /* 5px @ 13px/em */
@labelVerticalPadding: 0.35714em; /* 5px @ 14px/em */
@labelHorizontalPadding: @relativeMini;
@labelPadding: @labelVerticalPadding @labelHorizontalPadding;

Loading…
Cancel
Save