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.

273 lines
7.4 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 0px 1px 1px rgba(0, 0, 0, 0.1), 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset;
  33. -moz-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1), 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset;
  34. box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1), 0px -2px 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 !important;
  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:before {
  75. display: none;
  76. }
  77. .ui.dropdown .menu .item .icon {
  78. margin-right: 0.75em;
  79. }
  80. .ui.dropdown .menu .item:first-child {
  81. border-top: none;
  82. }
  83. /*******************************
  84. States
  85. *******************************/
  86. .ui.dropdown.visible {
  87. border-bottom-left-radius: 0em !important;
  88. border-bottom-right-radius: 0em !important;
  89. }
  90. .ui.dropdown .menu .item:hover {
  91. background-color: rgba(0, 0, 0, 0.02);
  92. }
  93. .ui.dropdown .menu .active.item {
  94. background-color: rgba(0, 0, 0, 0.04);
  95. border-left: none;
  96. }
  97. /* Default Text */
  98. .ui.dropdown > .default.text,
  99. .ui.default.dropdown > .text {
  100. color: rgba(0, 0, 0, 0.2);
  101. }
  102. .ui.dropdown:hover > .default.text,
  103. .ui.default.dropdown:hover > .text {
  104. color: rgba(0, 0, 0, 0.4);
  105. }
  106. /*******************************
  107. Variations
  108. *******************************/
  109. /*--------------
  110. Simple
  111. ---------------*/
  112. /* Displays without javascript */
  113. .ui.simple.dropdown .menu:before,
  114. .ui.simple.dropdown .menu:after {
  115. display: none;
  116. }
  117. .ui.simple.dropdown .menu {
  118. display: block;
  119. overflow: hidden;
  120. top: 100%;
  121. height: 0px;
  122. width: 0px;
  123. position: absolute;
  124. opacity: 0;
  125. -webkit-transition: opacity 0.2s ease-out;
  126. -moz-transition: opacity 0.2s ease-out;
  127. -o-transition: opacity 0.2s ease-out;
  128. -ms-transition: opacity 0.2s ease-out;
  129. transition: opacity 0.2s ease-out;
  130. }
  131. .ui.simple.dropdown.visible .menu,
  132. .ui.simple.dropdown:hover .menu {
  133. overflow: visible;
  134. width: auto;
  135. height: auto;
  136. opacity: 1;
  137. }
  138. .ui.simple.disabled.dropdown:hover .menu {
  139. height: 0px;
  140. width: 0px;
  141. overflow: hidden;
  142. }
  143. /*--------------
  144. Selection
  145. ---------------*/
  146. /* Displays like a select box */
  147. .ui.selection.dropdown {
  148. cursor: pointer;
  149. display: inline-block;
  150. background-color: #FFFFFF;
  151. padding: 0.5em 1em;
  152. line-height: 1.33;
  153. color: rgba(0, 0, 0, 0.8);
  154. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  155. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  156. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  157. -webkit-border-radius: 0.3125em !important;
  158. -moz-border-radius: 0.3125em !important;
  159. border-radius: 0.3125em !important;
  160. }
  161. .ui.selection.dropdown > .dropdown.icon {
  162. float: right;
  163. margin: 0.2em 0em 0.2em 0.5em;
  164. }
  165. .ui.selection.dropdown,
  166. .ui.selection.dropdown .menu {
  167. top: 100%;
  168. -webkit-transition: box-shadow 0.2s ease-out;
  169. -moz-transition: box-shadow 0.2s ease-out;
  170. -o-transition: box-shadow 0.2s ease-out;
  171. -ms-transition: box-shadow 0.2s ease-out;
  172. transition: box-shadow 0.2s ease-out;
  173. }
  174. .ui.selection.dropdown .menu {
  175. -webkit-box-shadow: 0px 1px 0px 1px #EEEEEE;
  176. -moz-box-shadow: 0px 1px 0px 1px #EEEEEE;
  177. box-shadow: 0px 1px 0px 1px #EEEEEE;
  178. -moz-border-radius: 0px 0px 0.325em 0.325em;
  179. -webkit-border-radius: 0px 0px 0.325em 0.325em;
  180. border-radius: 0px 0px 0.325em 0.325em;
  181. }
  182. .ui.selection.dropdown.visible,
  183. .ui.selection.dropdown:hover,
  184. .ui.selection.dropdown.hover {
  185. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  186. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  187. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  188. -webkit-border-radius: 0.3125em 0.3125em 0em 0em !important;
  189. -moz-border-radius: 0.3125em 0.3125em 0em 0em !important;
  190. border-radius: 0.3125em 0.3125em 0em 0em !important;
  191. }
  192. .ui.selection.dropdown.visible .menu,
  193. .ui.selection.dropdown.hover .menu,
  194. .ui.selection.dropdown:hover .menu {
  195. -webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
  196. -moz-box-shadow: 0px 1px 0px 1px #D3D3D3;
  197. box-shadow: 0px 1px 0px 1px #D3D3D3;
  198. }
  199. /*--------------
  200. Fluid
  201. ---------------*/
  202. .ui.fluid.dropdown {
  203. display: block;
  204. }
  205. /*--------------
  206. Pointing
  207. ---------------*/
  208. .ui.pointing.dropdown .menu {
  209. top: 100%;
  210. margin-top: 0.75em;
  211. -moz-border-radius: 0.325em;
  212. -webkit-border-radius: 0.325em;
  213. border-radius: 0.325em;
  214. }
  215. .ui.pointing.dropdown .menu:after {
  216. position: absolute;
  217. pointer-events: none;
  218. content: " ";
  219. width: 0.5em;
  220. height: 0.5em;
  221. -moz-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  222. -webkit-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  223. box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  224. background-image: none;
  225. background-color: #FFFFFF;
  226. -webkit-transform: rotate(45deg);
  227. -moz-transform: rotate(45deg);
  228. transform: rotate(45deg);
  229. z-index: 2;
  230. }
  231. .ui.pointing.dropdown .menu .item.active:first-child {
  232. background: transparent -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  233. background: transparent -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  234. background: transparent -o-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  235. background: transparent -ms-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  236. background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  237. }
  238. /* Directions */
  239. .ui.pointing.dropdown .menu:after {
  240. top: -0.25em;
  241. left: 50%;
  242. margin: 0em 0em 0em -0.25em;
  243. }
  244. .ui.top.left.pointing.dropdown .menu:after {
  245. top: -0.25em;
  246. left: 1em;
  247. right: auto;
  248. margin: 0em;
  249. }
  250. .ui.top.right.pointing.dropdown .menu:after {
  251. top: -0.25em;
  252. left: auto;
  253. right: 1em;
  254. margin: 0em;
  255. }
  256. .ui.left.pointing.dropdown .menu:after {
  257. top: 1em;
  258. left: -0.25em;
  259. margin-top: -0.25em 0em 0em 0em;
  260. }
  261. .ui.right.pointing.dropdown .menu:after {
  262. top: 1em;
  263. left: auto;
  264. right: -0.25em;
  265. margin-top: -0.25em 0em 0em 0em;
  266. }
  267. /* States */
  268. .ui.pointing.dropdown.visible,
  269. .ui.pointing.dropdown.visible .menu {
  270. -moz-border-radius: 0.325em !important;
  271. -webkit-border-radius: 0.325em !important;
  272. border-radius: 0.325em !important;
  273. }