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.

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