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.

459 lines
11 KiB

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