You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

205 lines
5.2 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. /*******************************
  2. Dropdown
  3. *******************************/
  4. /*-------------------
  5. Element
  6. --------------------*/
  7. @lineHeight: 1;
  8. @transition:
  9. border-radius 0.1s ease,
  10. width 0.2s ease
  11. ;
  12. @borderRadius: 0.325em;
  13. /*-------------------
  14. Content
  15. --------------------*/
  16. /* Icon */
  17. @dropdownIconMargin: 0em 0em 0em 1em;
  18. /* Current Text */
  19. @textTransition: color 0.2s @defaultEasing;
  20. /* Menu */
  21. @menuBackground: #FFFFFF;
  22. @menuMargin: 0em;
  23. @menuPadding: 0em 0em;
  24. @menuTop: 100%;
  25. @menuWrap: nowrap;
  26. @menuTextAlign: left;
  27. @menuTransition: none;
  28. @menuBorder: 1px solid @borderColor;
  29. @menuBoxShadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.15);
  30. @menuBorderRadius: 0em 0em @borderRadius @borderRadius;
  31. @menuTransition: opacity 0.2s ease;
  32. @menuZIndex: 11;
  33. /* Menu Item */
  34. @itemFontSize: 1rem;
  35. @itemBorder: none;
  36. @itemHeight: auto;
  37. @itemDivider: none;
  38. @itemColor: @textColor;
  39. @itemVerticalPadding: 0.65rem;
  40. @itemHorizontalPadding: 1.25rem;
  41. @itemFontWeight: normal;
  42. @itemLineHeight: 1.2;
  43. @itemTextTransform: none;
  44. @itemBoxShadow: none;
  45. /* Menu Header */
  46. @menuHeaderColor: @darkTextColor;
  47. @menuHeaderFontSize: 0.8em;
  48. @menuHeaderFontWeight: bold;
  49. @menuHeaderTextTransform: uppercase;
  50. @menuHeaderMargin: 1rem 0rem 0.75rem;
  51. @menuHeaderPadding: 0em @itemHorizontalPadding;
  52. /* Menu Divider */
  53. @menuDividerMargin: 0.5em 0em;
  54. @menuDividerColor: rgba(0, 0, 0, 0.05);
  55. @menuDividerSize: 1px;
  56. @menuDividerBorder: @menuDividerSize solid @menuDividerColor;
  57. /* Menu Input */
  58. @menuInputMargin: 0.75rem @itemHorizontalPadding 0.25rem;
  59. @menuInputMinWidth: 200px;
  60. @menuInputPadding: 0.5em 1em;
  61. /* Menu Image */
  62. @menuImageMaxHeight: 2.5em;
  63. /* Sub Menu Pointer Icon */
  64. @dropdownSubMenuIconFloat: right;
  65. @dropdownSubMenuIconMargin: (@itemLineHeight - 1em) 0em 0em 0.5em;
  66. /* Menu Item Icon */
  67. @itemIconMargin: 0em 0.75em 0em 0em;
  68. @itemLabelMargin: @itemIconMargin;
  69. @itemFlagMargin: @itemIconMargin;
  70. @itemImageMargin: @itemIconMargin;
  71. /* Sub Menu */
  72. @subMenuTop: 0%;
  73. @subMenuLeft: 100%;
  74. @subMenuRight: auto;
  75. @subMenuDistanceAway: -0.5em;
  76. @subMenuMargin: 0em 0em 0em @subMenuDistanceAway;
  77. @subMenuBorderRadius: 0em @borderRadius @borderRadius 0em;
  78. /*-------------------
  79. b Types
  80. --------------------*/
  81. /* Selection */
  82. @selectionMinWidth: 180px;
  83. @selectionBackground: @white;
  84. @selectionDisplay: inline-block;
  85. @selectionItemDivider: 1px solid rgba(0, 0, 0, 0.05);
  86. @selectionVerticalPadding: 0.8em;
  87. @selectionHorizontalPadding: 1.1em;
  88. @selectionPadding: @selectionVerticalPadding @selectionHorizontalPadding;
  89. @selectionZIndex: 10;
  90. @selectionTextIconDistance: 2em;
  91. @selectionTextColor: @textColor;
  92. @selectionBoxShadow: none;
  93. @selectionBorder: 1px solid @borderColor;
  94. @selectionBorderRadius: @borderRadius;
  95. @selectionIconOpacity: 0.8;
  96. @selectionIconTransition: opacity 0.2s ease;
  97. @selectionMenuMaxHeight: 245px;
  98. @selectionMenuBoxShadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.08);
  99. @selectionMenuItemBoxShadow: none;
  100. @selectionTransition:
  101. @transition,
  102. box-shadow 0.2s @defaultEasing,
  103. border 0.2s @defaultEasing
  104. ;
  105. @selectionMenuTransition:
  106. box-shadow 0.2s @defaultEasing,
  107. border 0.2s @defaultEasing
  108. ;
  109. /* Hover */
  110. @selectionHoverBorderColor: @selectedBorderColor;
  111. @selectionHoverBoxShadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.05);
  112. /* Visible */
  113. @selectionVisibleBorderColor: @borderColor;
  114. @selectionVisibleBoxShadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
  115. @selectionVisibleTextFontWeight: normal;
  116. @selectionVisibleTextColor: @hoveredTextColor;
  117. /* Visible Hover */
  118. @selectionVisibleHoverBorderColor: @selectedBorderColor;
  119. @selectionVisibleHoverBoxShadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
  120. @selectionVisibleHoverMenuBorder: 1px solid @selectedBorderColor;
  121. @selectionVisibleHoverMenuBoxShadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.08);
  122. @selectionVisibleConnectingBorder: 0em;
  123. @selectionVisibleIconOpacity: 1;
  124. /* Inline */
  125. @inlineIconMargin: 0em 0.5em 0em 0.25em;
  126. @inlineTextColor: inherit;
  127. @inlineTextFontWeight: bold;
  128. @inlineMenuDistance: 0.25em;
  129. @inlineMenuBorderRadius: @borderRadius;
  130. /*-------------------
  131. States
  132. --------------------*/
  133. @hoveredItemBackground: @transparentBlack;
  134. @hoveredItemColor: @selectedTextColor;
  135. /* Default Text */
  136. @defaultTextColor: rgba(179, 179, 179, 0.7);
  137. @defaultTextHoverColor: rgba(140, 140, 140, 0.7);
  138. /* Active Menu Item */
  139. @activeItemBackground: transparent;
  140. @activeItemZIndex: @menuZIndex + 1;
  141. @activeItemBoxShadow: none;
  142. @activeItemFontWeight: bold;
  143. @activeItemColor: @selectedTextColor;
  144. @selectedBackground: @subtleTransparentBlack;
  145. @selectedColor: @selectedTextColor;
  146. /* Error */
  147. @errorItemTextColor: #D95C5C;
  148. @errorItemHoverBackground: #FFF2F2;
  149. @errorItemActiveBackground: #FDCFCF;
  150. /*-------------------
  151. Variations
  152. --------------------*/
  153. /* Simple */
  154. @simpleTransitionDuration: 0.2s;
  155. @simpleTransition: opacity @simpleTransitionDuration @defaultEasing;
  156. /* Floating */
  157. @floatingMenuDistance: 0.5em;
  158. @floatingMenuBoxShadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.15);
  159. @floatingMenuBorderRadius: @borderRadius;
  160. /* Pointing */
  161. @pointingArrowOffset: -0.25em;
  162. @pointingArrowDistanceFromEdge: 1em;
  163. @pointingArrowBackground: @white;
  164. @pointingArrowZIndex: 2;
  165. @pointingArrowBoxShadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.1);
  166. @pointingArrowSize: 0.5em;
  167. @pointingMenuDistance: 0.75em;
  168. @pointingMenuBorderRadius: @borderRadius;