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.

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