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.

621 lines
13 KiB

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