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.

506 lines
10 KiB

  1. /*
  2. * # Semantic Dropdown
  3. * http://github.com/quirkyinc/semantic
  4. *
  5. *
  6. * Copyright 2013 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. * Released: April 17 2013
  11. */
  12. /*******************************
  13. Dropdown
  14. *******************************/
  15. .ui.dropdown {
  16. position: relative;
  17. display: inline-block;
  18. line-height: 1;
  19. -webkit-transition:
  20. border-radius 0.1s ease,
  21. width 0.2s ease
  22. ;
  23. -moz-transition:
  24. border-radius 0.1s ease,
  25. width 0.2s ease
  26. ;
  27. -o-transition:
  28. border-radius 0.1s ease,
  29. width 0.2s ease
  30. ;
  31. -ms-transition:
  32. border-radius 0.1s ease,
  33. width 0.2s ease
  34. ;
  35. transition:
  36. border-radius 0.1s ease,
  37. width 0.2s ease
  38. ;
  39. }
  40. .ui.dropdown .menu {
  41. position: absolute;
  42. display: none;
  43. top: 100%;
  44. margin: 0em;
  45. background-color: #FFFFFF;
  46. min-width: 100%;
  47. white-space: nowrap;
  48. font-size: 0.875em;
  49. text-shadow: none;
  50. -webkit-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1);
  51. -moz-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1);
  52. box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.1);
  53. -moz-border-radius: 0px 0px 0.325em 0.325em;
  54. -webkit-border-radius: 0px 0px 0.325em 0.325em;
  55. border-radius: 0px 0px 0.325em 0.325em;
  56. -webkit-transition: opacity 0.2s ease;
  57. -moz-transition: opacity 0.2s ease;
  58. -o-transition: opacity 0.2s ease;
  59. -ms-transition: opacity 0.2s ease;
  60. transition: opacity 0.2s ease;
  61. z-index: 11;
  62. }
  63. /* Dropdown Icon */
  64. .ui.dropdown > .dropdown.icon {
  65. width: auto;
  66. }
  67. /* Dropdown Text */
  68. .ui.dropdown > .text {
  69. cursor: pointer;
  70. display: inline-block;
  71. -webkit-transition: color 0.2s ease;
  72. -moz-transition: color 0.2s ease;
  73. -o-transition: color 0.2s ease;
  74. -ms-transition: color 0.2s ease;
  75. transition: color 0.2s ease;
  76. }
  77. /* Flyout Direction */
  78. .ui.dropdown .menu {
  79. left: 0px;
  80. }
  81. .ui.menu .dropdown:last-child .menu,
  82. .ui > .ui.dropdown:last-child .menu {
  83. left: auto;
  84. right: 0px;
  85. }
  86. /* Sub Menu Position */
  87. .ui.dropdown .menu .menu {
  88. top: 0% !important;
  89. left: 100% !important;
  90. margin: 0em !important;
  91. border-radius: 0 0.325em 0.325em 0em !important;
  92. }
  93. .ui.dropdown .menu .menu:after {
  94. display: none;
  95. }
  96. .ui.dropdown .menu .item {
  97. cursor: pointer;
  98. border: none;
  99. border-top: 1px solid rgba(0, 0, 0, 0.05);
  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. background-color: #FFFFFF;
  215. padding: 0.5em 1em;
  216. line-height: 1.33;
  217. color: rgba(0, 0, 0, 0.8);
  218. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  219. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  220. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  221. -webkit-border-radius: 0.3125em !important;
  222. -moz-border-radius: 0.3125em !important;
  223. border-radius: 0.3125em !important;
  224. }
  225. .ui.selection.dropdown > .dropdown.icon {
  226. float: right;
  227. opacity: 0.7;
  228. margin: 0.2em 0em 0.2em 1.25em;
  229. -webkit-transition: opacity 0.2s ease-out;
  230. -moz-transition: opacity 0.2s ease-out;
  231. -o-transition: opacity 0.2s ease-out;
  232. -ms-transition: opacity 0.2s ease-out;
  233. transition: opacity 0.2s ease-out;
  234. }
  235. .ui.selection.dropdown,
  236. .ui.selection.dropdown .menu {
  237. top: 100%;
  238. -webkit-transition: box-shadow 0.2s ease-out;
  239. -moz-transition: box-shadow 0.2s ease-out;
  240. -o-transition: box-shadow 0.2s ease-out;
  241. -ms-transition: box-shadow 0.2s ease-out;
  242. transition: box-shadow 0.2s ease-out;
  243. }
  244. .ui.selection.dropdown .menu {
  245. max-height: 312px;
  246. overflow-x: hidden;
  247. overflow-y: auto;
  248. -webkit-box-shadow: 0px 1px 0px 1px #EEEEEE;
  249. -moz-box-shadow: 0px 1px 0px 1px #EEEEEE;
  250. box-shadow: 0px 1px 0px 1px #EEEEEE;
  251. -moz-border-radius: 0px 0px 0.325em 0.325em;
  252. -webkit-border-radius: 0px 0px 0.325em 0.325em;
  253. border-radius: 0px 0px 0.325em 0.325em;
  254. }
  255. .ui.selection.dropdown .menu:after,
  256. .ui.selection.dropdown .menu:before {
  257. display: none;
  258. }
  259. .ui.selection.dropdown .menu img {
  260. height: 2.5em;
  261. display: inline-block;
  262. vertical-align: middle;
  263. margin-right: 0.5em;
  264. }
  265. /* Hover */
  266. .ui.selection.dropdown:hover,
  267. .ui.selection.dropdown.hover {
  268. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  269. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  270. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  271. }
  272. .ui.selection.dropdown:hover > .dropdown.icon {
  273. opacity: 1;
  274. }
  275. /* Visible */
  276. .ui.selection.active.dropdown {
  277. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  278. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  279. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  280. -webkit-border-radius: 0.3125em 0.3125em 0em 0em !important;
  281. -moz-border-radius: 0.3125em 0.3125em 0em 0em !important;
  282. border-radius: 0.3125em 0.3125em 0em 0em !important;
  283. }
  284. .ui.selection.active.dropdown > .dropdown.icon {
  285. opacity: 1;
  286. }
  287. .ui.selection.active.dropdown .menu {
  288. -webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
  289. -moz-box-shadow: 0px 1px 0px 1px #D3D3D3;
  290. box-shadow: 0px 1px 0px 1px #D3D3D3;
  291. }
  292. /*--------------
  293. Fluid
  294. ---------------*/
  295. .ui.fluid.dropdown {
  296. display: block;
  297. }
  298. /*--------------
  299. Inline
  300. ---------------*/
  301. .ui.inline.dropdown {
  302. cursor: pointer;
  303. display: inline-block;
  304. color: inherit;
  305. }
  306. .ui.inline.dropdown .dropdown.icon {
  307. margin: 0em 0.5em 0em 0.25em;
  308. }
  309. .ui.inline.dropdown .text {
  310. font-weight: bold;
  311. }
  312. .ui.inline.dropdown .menu {
  313. cursor: auto;
  314. margin-top: 0.25em;
  315. -webkit-border-radius: 0.325em;
  316. -moz-border-radius: 0.325em;
  317. border-radius: 0.325em;
  318. }
  319. /*--------------
  320. Floating
  321. ---------------*/
  322. .ui.floating.dropdown .menu {
  323. left: 0;
  324. right: auto;
  325. margin-top: 0.5em;
  326. -webkit-border-radius: 0.325em;
  327. -moz-border-radius: 0.325em;
  328. border-radius: 0.325em;
  329. }
  330. /*--------------
  331. Pointing
  332. ---------------*/
  333. .ui.pointing.dropdown .menu {
  334. top: 100%;
  335. margin-top: 0.75em;
  336. -moz-border-radius: 0.325em;
  337. -webkit-border-radius: 0.325em;
  338. border-radius: 0.325em;
  339. }
  340. .ui.pointing.dropdown .menu:after {
  341. display: block;
  342. position: absolute;
  343. pointer-events: none;
  344. content: " ";
  345. visibility: visible;
  346. width: 0.5em;
  347. height: 0.5em;
  348. -moz-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  349. -webkit-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  350. box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  351. background-image: none;
  352. background-color: #FFFFFF;
  353. -webkit-transform: rotate(45deg);
  354. -moz-transform: rotate(45deg);
  355. transform: rotate(45deg);
  356. z-index: 2;
  357. }
  358. .ui.pointing.dropdown .menu .item.active:first-child {
  359. background: transparent -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  360. background: transparent -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  361. background: transparent -o-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  362. background: transparent -ms-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  363. background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  364. }
  365. /* Directions */
  366. .ui.pointing.dropdown .menu:after {
  367. top: -0.25em;
  368. left: 50%;
  369. margin: 0em 0em 0em -0.25em;
  370. }
  371. .ui.top.left.pointing.dropdown .menu {
  372. top: 100%;
  373. bottom: auto;
  374. left: 0%;
  375. right: auto;
  376. margin: 0.75em 0em 0em;
  377. }
  378. .ui.top.left.pointing.dropdown .menu:after {
  379. top: -0.25em;
  380. left: 1.25em;
  381. right: auto;
  382. margin: 0em;
  383. -webkit-transform: rotate(45deg);
  384. -moz-transform: rotate(45deg);
  385. transform: rotate(45deg);
  386. }
  387. .ui.top.right.pointing.dropdown .menu {
  388. top: 100%;
  389. bottom: auto;
  390. right: 0%;
  391. left: auto;
  392. margin: 0.75em 0em 0em;
  393. }
  394. .ui.top.right.pointing.dropdown .menu:after {
  395. top: -0.25em;
  396. left: auto;
  397. right: 1.25em;
  398. margin: 0em;
  399. -webkit-transform: rotate(45deg);
  400. -moz-transform: rotate(45deg);
  401. transform: rotate(45deg);
  402. }
  403. .ui.left.pointing.dropdown .menu {
  404. top: 0%;
  405. left: 100%;
  406. right: auto;
  407. margin: 0em 0em 0em 0.75em;
  408. }
  409. .ui.left.pointing.dropdown .menu:after {
  410. top: 1em;
  411. left: -0.25em;
  412. margin: 0em 0em 0em 0em;
  413. -webkit-transform: rotate(-45deg);
  414. -moz-transform: rotate(-45deg);
  415. transform: rotate(-45deg);
  416. }
  417. .ui.right.pointing.dropdown .menu {
  418. top: 0%;
  419. left: auto;
  420. right: 100%;
  421. margin: 0em 0.75em 0em 0em;
  422. }
  423. .ui.right.pointing.dropdown .menu:after {
  424. top: 1em;
  425. left: auto;
  426. right: -0.25em;
  427. margin: 0em 0em 0em 0em;
  428. -webkit-transform: rotate(135deg);
  429. -moz-transform: rotate(135deg);
  430. transform: rotate(135deg);
  431. }