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.

415 lines
10 KiB

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