logo

searx

My custom branche(s) on searx, a meta-search engine git clone https://hacktivis.me/git/searx.git

typeahead.less (4072B)


  1. /*
  2. * typehead.js-bootstrap3.less
  3. * @version 0.2.3
  4. * https://github.com/hyspace/typeahead.js-bootstrap3.less
  5. *
  6. * Licensed under the MIT license:
  7. * http://www.opensource.org/licenses/MIT
  8. */
  9. //custom mixin for .form-control-validation
  10. .typeahead-form-control(@border-color: #ccc;) {
  11. border-color: @border-color;
  12. .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
  13. &:focus {
  14. border-color: darken(@border-color, 10%);
  15. @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
  16. .box-shadow(@shadow);
  17. }
  18. }
  19. //main styles for control
  20. .tt-input,
  21. .tt-hint {
  22. .twitter-typeahead &{
  23. //validation states
  24. .has-warning &{
  25. .typeahead-form-control(@state-warning-text);
  26. }
  27. .has-error &{
  28. .typeahead-form-control(@state-danger-text);
  29. }
  30. .has-success &{
  31. .typeahead-form-control(@state-success-text);
  32. }
  33. }
  34. //border
  35. .input-group .twitter-typeahead:first-child &{
  36. .border-left-radius(@border-radius-base);
  37. }
  38. .input-group .twitter-typeahead:last-child &{
  39. .border-right-radius(@border-radius-base);
  40. }
  41. //sizing - small:size and border
  42. .input-group.input-group-sm .twitter-typeahead &{
  43. .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
  44. }
  45. .input-group.input-group-sm .twitter-typeahead:not(:first-child):not(:last-child) &{
  46. border-radius: 0;
  47. }
  48. .input-group.input-group-sm .twitter-typeahead:first-child &{
  49. .border-left-radius(@border-radius-small);
  50. .border-right-radius(0);
  51. }
  52. .input-group.input-group-sm .twitter-typeahead:last-child &{
  53. .border-left-radius(0);
  54. .border-right-radius(@border-radius-small);
  55. }
  56. //sizing - large:size and border
  57. .input-group.input-group-lg .twitter-typeahead &{
  58. .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
  59. }
  60. .input-group.input-group-lg .twitter-typeahead:not(:first-child):not(:last-child) &{
  61. border-radius: 0;
  62. }
  63. .input-group.input-group-lg .twitter-typeahead:first-child &{
  64. .border-left-radius(@border-radius-large);
  65. .border-right-radius(0);
  66. }
  67. .input-group.input-group-lg .twitter-typeahead:last-child &{
  68. .border-left-radius(0);
  69. .border-right-radius(@border-radius-large);
  70. }
  71. }
  72. //for wrapper
  73. .twitter-typeahead {
  74. width: 100%;
  75. .input-group &{
  76. //overwrite `display:inline-block` style
  77. display: table-cell!important;
  78. float: left;
  79. }
  80. }
  81. //particular style for each other
  82. .twitter-typeahead .tt-hint {
  83. color: @text-muted;//color - hint
  84. }
  85. .twitter-typeahead .tt-input {
  86. z-index: 2;
  87. //disabled status
  88. //overwrite inline styles of .tt-query
  89. &[disabled],
  90. &[readonly],
  91. fieldset[disabled] & {
  92. cursor: not-allowed;
  93. //overwirte inline style
  94. background-color: @input-bg-disabled!important;
  95. }
  96. }
  97. //dropdown styles
  98. .tt-dropdown-menu {
  99. //dropdown menu
  100. position: absolute;
  101. top: 100%;
  102. left: 0;
  103. z-index: @zindex-dropdown;
  104. min-width: 160px;
  105. width: 100%;
  106. padding: 5px 0;
  107. margin: 2px 0 0;
  108. list-style: none;
  109. font-size: @font-size-base;
  110. background-color: @dropdown-bg;
  111. border: 1px solid @dropdown-fallback-border;
  112. border: 1px solid @dropdown-border;
  113. border-radius: @border-radius-base;
  114. .box-shadow(0 6px 12px rgba(0,0,0,.175));
  115. background-clip: padding-box;
  116. *border-right-width: 2px;
  117. *border-bottom-width: 2px;
  118. .tt-suggestion {
  119. //item
  120. display: block;
  121. padding: 3px 20px;
  122. clear: both;
  123. font-weight: normal;
  124. line-height: @line-height-base;
  125. color: @dropdown-link-color;
  126. white-space: nowrap;
  127. text-align: left;
  128. cursor: pointer !important;
  129. &.tt-cursor {
  130. //item selected
  131. text-decoration: none;
  132. outline: 0;
  133. background-color: @dropdown-link-hover-bg;
  134. color: @dropdown-link-hover-color;
  135. a {
  136. //link in item selected
  137. color: @dropdown-link-hover-color;
  138. }
  139. }
  140. p {
  141. margin: 0;
  142. }
  143. }
  144. }