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.

170 lines
4.8 KiB

  1. /*
  2. * # Semantic Dropdown
  3. * http://github.com/quirkyinc/semantic
  4. *
  5. *
  6. * Copyright 2013 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. * Released: April 17 2013
  11. */
  12. /*******************************
  13. Dropdown
  14. *******************************/
  15. .ui.dropdown {
  16. position: relative;
  17. display: inline-block;
  18. line-height: 1;
  19. -webkit-transition: border-radius 0.1s ease, width 0.2s ease;
  20. -moz-transition: border-radius 0.1s ease, width 0.2s ease;
  21. -o-transition: border-radius 0.1s ease, width 0.2s ease;
  22. -ms-transition: border-radius 0.1s ease, width 0.2s ease;
  23. transition: border-radius 0.1s ease, width 0.2s ease;
  24. }
  25. .ui.dropdown .menu {
  26. position: absolute;
  27. display: none;
  28. top: 100%;
  29. background-color: #FFFFFF;
  30. min-width: 100%;
  31. white-space: nowrap;
  32. -webkit-box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1), 1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, -1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset;
  33. -moz-box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1), 1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, -1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset;
  34. box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1), 1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, -1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset;
  35. -moz-border-radius: 0px 0px 0.325em 0.325em;
  36. -webkit-border-radius: 0px 0px 0.325em 0.325em;
  37. border-radius: 0px 0px 0.325em 0.325em;
  38. -webkit-transition: opacity 0.2s ease;
  39. -moz-transition: opacity 0.2s ease;
  40. -o-transition: opacity 0.2s ease;
  41. -ms-transition: opacity 0.2s ease;
  42. transition: opacity 0.2s ease;
  43. z-index: 11;
  44. }
  45. .ui.dropdown > .dropdown.icon {
  46. width: auto;
  47. }
  48. .ui.dropdown > .text {
  49. display: inline-block;
  50. }
  51. /* Flyout Direction */
  52. .ui.dropdown .menu {
  53. left: 0px;
  54. }
  55. .ui.menu .dropdown:last-child .menu,
  56. .ui > .ui.dropdown:last-child .menu {
  57. left: auto;
  58. right: 0px;
  59. }
  60. .ui.dropdown .menu .item {
  61. cursor: pointer;
  62. border: none;
  63. border-top: 1px solid rgba(0, 0, 0, 0.05);
  64. font-size: 0.9em;
  65. display: block;
  66. color: rgba(0, 0, 0, 0.75);
  67. padding: 0.85em 1em;
  68. font-size: 0.9rem;
  69. text-transform: none;
  70. font-weight: normal;
  71. text-align: left;
  72. -webkit-touch-callout: none;
  73. }
  74. .ui.dropdown .menu .item .icon {
  75. margin-right: 0.75em;
  76. }
  77. .ui.dropdown .menu .item:first-child {
  78. border-top: none;
  79. }
  80. /*******************************
  81. States
  82. *******************************/
  83. .ui.dropdown.visible {
  84. border-bottom-left-radius: 0em !important;
  85. border-bottom-right-radius: 0em !important;
  86. }
  87. .ui.dropdown .menu .item:hover {
  88. background-color: rgba(0, 0, 0, 0.02);
  89. }
  90. .ui.dropdown .menu .active.item {
  91. border-top: 1px solid rgba(0, 0, 0, 0.05);
  92. font-weight: bold;
  93. }
  94. /*******************************
  95. Variations
  96. *******************************/
  97. /*--------------
  98. Simple
  99. ---------------*/
  100. /* Displays without javascript */
  101. .ui.simple.dropdown .menu {
  102. display: block;
  103. overflow: hidden;
  104. height: 0px;
  105. width: 0px;
  106. position: absolute;
  107. opacity: 0;
  108. -webkit-transition: opacity 0.2s ease-out;
  109. -moz-transition: opacity 0.2s ease-out;
  110. -o-transition: opacity 0.2s ease-out;
  111. -ms-transition: opacity 0.2s ease-out;
  112. transition: opacity 0.2s ease-out;
  113. }
  114. .ui.simple.dropdown.visible .menu,
  115. .ui.simple.dropdown:hover .menu {
  116. overflow: visible;
  117. width: auto;
  118. height: auto;
  119. opacity: 1;
  120. }
  121. .ui.simple.disabled.dropdown:hover .menu {
  122. height: 0px;
  123. width: 0px;
  124. overflow: hidden;
  125. }
  126. /*--------------
  127. Selection
  128. ---------------*/
  129. /* Displays like a select box */
  130. .ui.selection.dropdown {
  131. cursor: pointer;
  132. display: inline-block;
  133. background-color: #FFFFFF;
  134. padding: 0.5em 1em;
  135. line-height: 1.33;
  136. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  137. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  138. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  139. -webkit-border-radius: 0.3125em;
  140. -moz-border-radius: 0.3125em;
  141. border-radius: 0.3125em;
  142. }
  143. .ui.selection.dropdown > .dropdown.icon {
  144. float: right;
  145. margin: 0.2em 0em 0.2em 0.5em;
  146. }
  147. .ui.selection.dropdown,
  148. .ui.selection.dropdown .menu {
  149. -webkit-transition: box-shadow 0.2s ease-out;
  150. -moz-transition: box-shadow 0.2s ease-out;
  151. -o-transition: box-shadow 0.2s ease-out;
  152. -ms-transition: box-shadow 0.2s ease-out;
  153. transition: box-shadow 0.2s ease-out;
  154. }
  155. .ui.selection.dropdown .menu {
  156. -webkit-box-shadow: 0px 1px 0px 1px #EEEEEE;
  157. -moz-box-shadow: 0px 1px 0px 1px #EEEEEE;
  158. box-shadow: 0px 1px 0px 1px #EEEEEE;
  159. }
  160. .ui.selection.dropdown:hover,
  161. .ui.selection.dropdown.hover {
  162. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  163. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  164. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  165. }
  166. .ui.selection.dropdown:hover .menu {
  167. -webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
  168. -moz-box-shadow: 0px 1px 0px 1px #D3D3D3;
  169. box-shadow: 0px 1px 0px 1px #D3D3D3;
  170. }