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.

508 lines
11 KiB

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