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.

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