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.

348 lines
9.1 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. text-shadow: none;
  33. -webkit-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1), 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset;
  34. -moz-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1), 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset;
  35. box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1), 0px -2px 0px 0px rgba(0, 0, 0, 0.1) inset;
  36. -moz-border-radius: 0px 0px 0.325em 0.325em;
  37. -webkit-border-radius: 0px 0px 0.325em 0.325em;
  38. border-radius: 0px 0px 0.325em 0.325em;
  39. -webkit-transition: opacity 0.2s ease;
  40. -moz-transition: opacity 0.2s ease;
  41. -o-transition: opacity 0.2s ease;
  42. -ms-transition: opacity 0.2s ease;
  43. transition: opacity 0.2s ease;
  44. z-index: 11;
  45. }
  46. .ui.dropdown > .dropdown.icon {
  47. width: auto;
  48. }
  49. .ui.dropdown > .text {
  50. display: inline-block;
  51. -webkit-transition: color 0.2s ease;
  52. -moz-transition: color 0.2s ease;
  53. -o-transition: color 0.2s ease;
  54. -ms-transition: color 0.2s ease;
  55. transition: color 0.2s ease;
  56. }
  57. /* Flyout Direction */
  58. .ui.dropdown .menu {
  59. left: 0px;
  60. }
  61. .ui.menu .dropdown:last-child .menu,
  62. .ui > .ui.dropdown:last-child .menu {
  63. left: auto;
  64. right: 0px;
  65. }
  66. .ui.dropdown .menu .item {
  67. cursor: pointer;
  68. border: none;
  69. border-top: 1px solid rgba(0, 0, 0, 0.05);
  70. font-size: 0.875em;
  71. display: block;
  72. color: rgba(0, 0, 0, 0.75);
  73. padding: 0.85em 1em !important;
  74. font-size: 0.9rem;
  75. text-transform: none;
  76. font-weight: normal;
  77. text-align: left;
  78. -webkit-touch-callout: none;
  79. }
  80. .ui.dropdown .menu .item:before {
  81. display: none;
  82. }
  83. .ui.dropdown .menu .item .icon {
  84. margin-right: 0.75em;
  85. }
  86. .ui.dropdown .menu .item:first-child {
  87. border-top: none;
  88. }
  89. /*******************************
  90. States
  91. *******************************/
  92. .ui.dropdown.visible {
  93. border-bottom-left-radius: 0em !important;
  94. border-bottom-right-radius: 0em !important;
  95. }
  96. .ui.dropdown.visible .menu {
  97. display: block;
  98. }
  99. .ui.dropdown .menu .item:hover {
  100. background-color: rgba(0, 0, 0, 0.02);
  101. z-index: 12;
  102. }
  103. .ui.dropdown .menu .active.item {
  104. background-color: rgba(0, 0, 0, 0.04);
  105. border-left: none;
  106. z-index: 12;
  107. }
  108. /* Default Text */
  109. .ui.dropdown > .default.text,
  110. .ui.default.dropdown > .text {
  111. color: rgba(0, 0, 0, 0.5);
  112. }
  113. .ui.dropdown:hover > .default.text,
  114. .ui.default.dropdown:hover > .text {
  115. color: rgba(0, 0, 0, 0.8);
  116. }
  117. /*******************************
  118. Variations
  119. *******************************/
  120. /*--------------
  121. Simple
  122. ---------------*/
  123. /* Displays without javascript */
  124. .ui.simple.dropdown .menu:before,
  125. .ui.simple.dropdown .menu:after {
  126. display: none;
  127. }
  128. .ui.simple.dropdown .menu {
  129. display: block;
  130. overflow: hidden;
  131. top: -9999px !important;
  132. position: absolute;
  133. opacity: 0;
  134. -webkit-transition: opacity 0.2s ease-out;
  135. -moz-transition: opacity 0.2s ease-out;
  136. -o-transition: opacity 0.2s ease-out;
  137. -ms-transition: opacity 0.2s ease-out;
  138. transition: opacity 0.2s ease-out;
  139. }
  140. .ui.simple.dropdown.visible,
  141. .ui.simple.dropdown:hover {
  142. border-bottom-left-radius: 0em !important;
  143. border-bottom-right-radius: 0em !important;
  144. }
  145. .ui.simple.dropdown.visible .menu,
  146. .ui.simple.dropdown:hover .menu {
  147. overflow: visible;
  148. width: auto;
  149. height: auto;
  150. top: 100% !important;
  151. opacity: 1;
  152. }
  153. .ui.simple.disabled.dropdown:hover .menu {
  154. height: 0px;
  155. width: 0px;
  156. overflow: hidden;
  157. }
  158. /*--------------
  159. Selection
  160. ---------------*/
  161. /* Displays like a select box */
  162. .ui.selection.dropdown {
  163. cursor: pointer;
  164. display: inline-block;
  165. background-color: #FFFFFF;
  166. padding: 0.5em 1em;
  167. line-height: 1.33;
  168. color: rgba(0, 0, 0, 0.8);
  169. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  170. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  171. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  172. -webkit-border-radius: 0.3125em !important;
  173. -moz-border-radius: 0.3125em !important;
  174. border-radius: 0.3125em !important;
  175. }
  176. .ui.selection.dropdown > .dropdown.icon {
  177. float: right;
  178. opacity: 0.7;
  179. margin: 0.2em 0em 0.2em 1.25em;
  180. -webkit-transition: opacity 0.2s ease-out;
  181. -moz-transition: opacity 0.2s ease-out;
  182. -o-transition: opacity 0.2s ease-out;
  183. -ms-transition: opacity 0.2s ease-out;
  184. transition: opacity 0.2s ease-out;
  185. }
  186. .ui.selection.dropdown,
  187. .ui.selection.dropdown .menu {
  188. top: 100%;
  189. -webkit-transition: box-shadow 0.2s ease-out;
  190. -moz-transition: box-shadow 0.2s ease-out;
  191. -o-transition: box-shadow 0.2s ease-out;
  192. -ms-transition: box-shadow 0.2s ease-out;
  193. transition: box-shadow 0.2s ease-out;
  194. }
  195. .ui.selection.dropdown .menu {
  196. max-height: 312px;
  197. overflow-x: hidden;
  198. overflow-y: auto;
  199. -webkit-box-shadow: 0px 1px 0px 1px #EEEEEE;
  200. -moz-box-shadow: 0px 1px 0px 1px #EEEEEE;
  201. box-shadow: 0px 1px 0px 1px #EEEEEE;
  202. -moz-border-radius: 0px 0px 0.325em 0.325em;
  203. -webkit-border-radius: 0px 0px 0.325em 0.325em;
  204. border-radius: 0px 0px 0.325em 0.325em;
  205. }
  206. .ui.selection.dropdown .menu img {
  207. height: 2.5em;
  208. display: inline-block;
  209. vertical-align: middle;
  210. margin-right: 0.5em;
  211. }
  212. /* Hover */
  213. .ui.selection.dropdown:hover,
  214. .ui.selection.dropdown.hover {
  215. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  216. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  217. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  218. }
  219. .ui.selection.dropdown:hover > .dropdown.icon {
  220. opacity: 1;
  221. }
  222. /* Visible */
  223. .ui.selection.dropdown.visible {
  224. -webkit-border-radius: 0.3125em 0.3125em 0em 0em !important;
  225. -moz-border-radius: 0.3125em 0.3125em 0em 0em !important;
  226. border-radius: 0.3125em 0.3125em 0em 0em !important;
  227. }
  228. .ui.selection.dropdown.visible > .dropdown.icon {
  229. opacity: 1;
  230. }
  231. .ui.selection.dropdown.visible .menu {
  232. -webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
  233. -moz-box-shadow: 0px 1px 0px 1px #D3D3D3;
  234. box-shadow: 0px 1px 0px 1px #D3D3D3;
  235. }
  236. /*--------------
  237. Fluid
  238. ---------------*/
  239. .ui.fluid.dropdown {
  240. display: block;
  241. }
  242. /*--------------
  243. Pointing
  244. ---------------*/
  245. .ui.pointing.dropdown .menu {
  246. top: 100%;
  247. margin-top: 0.75em;
  248. -moz-border-radius: 0.325em;
  249. -webkit-border-radius: 0.325em;
  250. border-radius: 0.325em;
  251. }
  252. .ui.pointing.dropdown .menu:after {
  253. position: absolute;
  254. pointer-events: none;
  255. content: " ";
  256. width: 0.5em;
  257. height: 0.5em;
  258. -moz-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  259. -webkit-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  260. box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  261. background-image: none;
  262. background-color: #FFFFFF;
  263. -webkit-transform: rotate(45deg);
  264. -moz-transform: rotate(45deg);
  265. transform: rotate(45deg);
  266. z-index: 2;
  267. }
  268. .ui.pointing.dropdown .menu .item.active:first-child {
  269. background: transparent -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  270. background: transparent -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  271. background: transparent -o-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  272. background: transparent -ms-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  273. background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  274. }
  275. /* Directions */
  276. .ui.pointing.dropdown .menu:after {
  277. top: -0.25em;
  278. left: 50%;
  279. margin: 0em 0em 0em -0.25em;
  280. }
  281. .ui.top.left.pointing.dropdown .menu {
  282. top: 100%;
  283. bottom: auto;
  284. left: 0%;
  285. right: auto;
  286. margin: 0.75em 0em 0em;
  287. }
  288. .ui.top.left.pointing.dropdown .menu:after {
  289. top: -0.25em;
  290. left: 1em;
  291. right: auto;
  292. margin: 0em;
  293. -webkit-transform: rotate(45deg);
  294. -moz-transform: rotate(45deg);
  295. transform: rotate(45deg);
  296. }
  297. .ui.top.right.pointing.dropdown .menu {
  298. top: 100%;
  299. bottom: auto;
  300. right: 0%;
  301. left: auto;
  302. margin: 0.75em 0em 0em;
  303. }
  304. .ui.top.right.pointing.dropdown .menu:after {
  305. top: -0.25em;
  306. left: auto;
  307. right: 1em;
  308. margin: 0em;
  309. -webkit-transform: rotate(45deg);
  310. -moz-transform: rotate(45deg);
  311. transform: rotate(45deg);
  312. }
  313. .ui.left.pointing.dropdown .menu {
  314. top: 0%;
  315. left: 100%;
  316. right: auto;
  317. margin: 0em 0em 0em 0.75em;
  318. }
  319. .ui.left.pointing.dropdown .menu:after {
  320. top: 1em;
  321. left: -0.25em;
  322. margin: -0.1em 0em 0em 0em;
  323. -webkit-transform: rotate(-45deg);
  324. -moz-transform: rotate(-45deg);
  325. transform: rotate(-45deg);
  326. }
  327. .ui.right.pointing.dropdown .menu {
  328. top: 0%;
  329. left: auto;
  330. right: 100%;
  331. margin: 0em 0.75em 0em 0em;
  332. }
  333. .ui.right.pointing.dropdown .menu:after {
  334. top: 1em;
  335. left: auto;
  336. right: -0.25em;
  337. margin: -0.1em 0em 0em 0em;
  338. -webkit-transform: rotate(135deg);
  339. -moz-transform: rotate(135deg);
  340. transform: rotate(135deg);
  341. }
  342. /* States */
  343. .ui.pointing.dropdown.visible,
  344. .ui.pointing.dropdown.visible .menu {
  345. -moz-border-radius: 0.325em !important;
  346. -webkit-border-radius: 0.325em !important;
  347. border-radius: 0.325em !important;
  348. }