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.

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