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.

458 lines
11 KiB

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