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.

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