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.

503 lines
9.7 KiB

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