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.

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