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.

463 lines
11 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: 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 0em 0em 1em;
  55. }
  56. .ui.dropdown > .dropdown.icon:before {
  57. content: "\f0d7";
  58. }
  59. .ui.dropdown .menu .item .dropdown.icon {
  60. width: auto;
  61. float: right;
  62. margin: 0em 0em 0em 0.5em;
  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. left: 0px;
  78. }
  79. /*--------------
  80. Sub Menu
  81. ---------------*/
  82. .ui.dropdown .menu .menu {
  83. top: 0% !important;
  84. left: 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. height: auto;
  95. border-top: 1px solid rgba(0, 0, 0, 0.1);
  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: left;
  104. -webkit-touch-callout: none;
  105. }
  106. .ui.dropdown .menu .item:before {
  107. display: none;
  108. }
  109. .ui.dropdown .menu .item .icon {
  110. margin-right: 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. left: auto;
  122. right: 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.03);
  143. z-index: 12;
  144. }
  145. /*--------------------
  146. Active
  147. ----------------------*/
  148. /* Menu Item Active */
  149. .ui.dropdown .menu .active.item {
  150. font-weight: bold;
  151. border-left: none;
  152. background-color: rgba(0, 0, 0, 0.03);
  153. -webkit-box-shadow: none;
  154. -moz-shadow: none;
  155. -webkit-box-shadow: none;
  156. box-shadow: none;
  157. z-index: 12;
  158. }
  159. /*--------------------
  160. Default Text
  161. ----------------------*/
  162. .ui.dropdown > .default.text,
  163. .ui.default.dropdown > .text {
  164. color: rgba(179, 179, 179, 0.7);
  165. }
  166. .ui.dropdown:hover > .default.text,
  167. .ui.default.dropdown:hover > .text {
  168. color: rgba(140, 140, 140, 0.7);
  169. }
  170. /*--------------------
  171. Error
  172. ----------------------*/
  173. .ui.dropdown.error,
  174. .ui.dropdown.error > .text,
  175. .ui.dropdown.error > .default.text {
  176. color: #D95C5C !important;
  177. }
  178. .ui.selection.dropdown.error {
  179. background-color: #FFFAFA;
  180. -webkit-box-shadow: 0px 0px 0px 1px #e7bebe !important;
  181. box-shadow: 0px 0px 0px 1px #e7bebe !important;
  182. }
  183. .ui.selection.dropdown.error:hover {
  184. -webkit-box-shadow: 0px 0px 0px 1px #e7bebe !important;
  185. box-shadow: 0px 0px 0px 1px #e7bebe !important;
  186. }
  187. .ui.dropdown.error > .menu,
  188. .ui.dropdown.error > .menu .menu {
  189. -webkit-box-shadow: 0px 0px 1px 1px #E7BEBE !important;
  190. box-shadow: 0px 0px 1px 1px #E7BEBE !important;
  191. }
  192. .ui.dropdown.error > .menu .item {
  193. color: #D95C5C !important;
  194. }
  195. /* Item Hover */
  196. .ui.dropdown.error > .menu .item:hover {
  197. background-color: #FFF2F2 !important;
  198. }
  199. /* Item Active */
  200. .ui.dropdown.error > .menu .active.item {
  201. background-color: #FDCFCF !important;
  202. }
  203. /*******************************
  204. Variations
  205. *******************************/
  206. /*--------------
  207. Simple
  208. ---------------*/
  209. /* Displays without javascript */
  210. .ui.simple.dropdown .menu:before,
  211. .ui.simple.dropdown .menu:after {
  212. display: none;
  213. }
  214. .ui.simple.dropdown .menu {
  215. display: block;
  216. overflow: hidden;
  217. top: -9999px !important;
  218. position: absolute;
  219. opacity: 0;
  220. width: 0;
  221. height: 0;
  222. -webkit-transition: opacity 0.2s ease-out;
  223. transition: opacity 0.2s ease-out;
  224. }
  225. .ui.simple.active.dropdown,
  226. .ui.simple.dropdown:hover {
  227. border-bottom-left-radius: 0em !important;
  228. border-bottom-right-radius: 0em !important;
  229. }
  230. .ui.simple.active.dropdown > .menu,
  231. .ui.simple.dropdown:hover > .menu {
  232. overflow: visible;
  233. width: auto;
  234. height: auto;
  235. top: 100% !important;
  236. opacity: 1;
  237. }
  238. .ui.simple.dropdown > .menu .item:active > .menu,
  239. .ui.simple.dropdown:hover > .menu .item:hover > .menu {
  240. overflow: visible;
  241. width: auto;
  242. height: auto;
  243. top: 0% !important;
  244. left: 100% !important;
  245. opacity: 1;
  246. }
  247. .ui.simple.disabled.dropdown:hover .menu {
  248. display: none;
  249. height: 0px;
  250. width: 0px;
  251. overflow: hidden;
  252. }
  253. /*--------------
  254. Selection
  255. ---------------*/
  256. /* Displays like a select box */
  257. .ui.selection.dropdown {
  258. cursor: pointer;
  259. display: inline-block;
  260. word-wrap: break-word;
  261. white-space: normal;
  262. /* Matches selection dropdown height to input height */
  263. border-top: 1px solid transparent;
  264. background-color: #FFFFFF;
  265. padding: 0.65em 1em;
  266. line-height: 1.33;
  267. color: rgba(0, 0, 0, 0.8);
  268. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) !important;
  269. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) !important;
  270. border-radius: 0.3125em !important;
  271. }
  272. .ui.selection.dropdown select {
  273. display: none;
  274. }
  275. .ui.selection.dropdown > .dropdown.icon {
  276. opacity: 0.7;
  277. margin: 0.2em 0em 0.2em 1.25em;
  278. -webkit-transition: opacity 0.2s ease-out;
  279. transition: opacity 0.2s ease-out;
  280. }
  281. .ui.selection.dropdown,
  282. .ui.selection.dropdown .menu {
  283. top: 100%;
  284. -webkit-transition: -webkit-box-shadow 0.2s ease-out;
  285. transition: box-shadow 0.2s ease-out;
  286. }
  287. .ui.selection.dropdown .menu {
  288. max-height: 312px;
  289. overflow-x: hidden;
  290. overflow-y: auto;
  291. -webkit-box-shadow: 0px 1px 0px 1px #E0E0E0;
  292. box-shadow: 0px 1px 0px 1px #E0E0E0;
  293. border-radius: 0px 0px 0.325em 0.325em;
  294. }
  295. .ui.selection.dropdown .menu:after,
  296. .ui.selection.dropdown .menu:before {
  297. display: none;
  298. }
  299. .ui.selection.dropdown .menu img {
  300. height: 2.5em;
  301. display: inline-block;
  302. vertical-align: middle;
  303. margin-right: 0.5em;
  304. }
  305. /* Hover */
  306. .ui.selection.dropdown:hover {
  307. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2) !important;
  308. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2) !important;
  309. }
  310. .ui.selection.dropdown:hover .menu {
  311. -webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
  312. box-shadow: 0px 1px 0px 1px #D3D3D3;
  313. }
  314. .ui.selection.dropdown:hover > .dropdown.icon {
  315. opacity: 1;
  316. }
  317. /* Visible */
  318. .ui.visible.selection.dropdown {
  319. border-bottom-left-radius: 0em !important;
  320. border-bottom-right-radius: 0em !important;
  321. }
  322. /* Active */
  323. .ui.active.selection.dropdown {
  324. border-radius: 0.3125em 0.3125em 0em 0em !important;
  325. }
  326. .ui.active.selection.dropdown > .dropdown.icon {
  327. opacity: 1;
  328. }
  329. /*--------------
  330. Fluid
  331. ---------------*/
  332. .ui.fluid.dropdown {
  333. display: block;
  334. }
  335. .ui.fluid.dropdown > .dropdown.icon {
  336. float: right;
  337. }
  338. /*--------------
  339. Inline
  340. ---------------*/
  341. .ui.inline.dropdown {
  342. cursor: pointer;
  343. display: inline-block;
  344. color: inherit;
  345. }
  346. .ui.inline.dropdown .dropdown.icon {
  347. margin: 0em 0.5em 0em 0.25em;
  348. }
  349. .ui.inline.dropdown .text {
  350. font-weight: bold;
  351. }
  352. .ui.inline.dropdown .menu {
  353. cursor: auto;
  354. margin-top: 0.25em;
  355. border-radius: 0.325em;
  356. }
  357. /*--------------
  358. Floating
  359. ---------------*/
  360. .ui.floating.dropdown .menu {
  361. left: 0;
  362. right: auto;
  363. margin-top: 0.5em !important;
  364. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2) inset, 0px 2px 5px 0px rgba(0, 0, 0, 0.15);
  365. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2) inset, 0px 2px 5px 0px rgba(0, 0, 0, 0.15);
  366. border-radius: 0.325em;
  367. }
  368. /*--------------
  369. Pointing
  370. ---------------*/
  371. .ui.pointing.dropdown .menu {
  372. top: 100%;
  373. margin-top: 0.75em;
  374. border-radius: 0.325em;
  375. }
  376. .ui.pointing.dropdown .menu:after {
  377. display: block;
  378. position: absolute;
  379. pointer-events: none;
  380. content: " ";
  381. visibility: visible;
  382. width: 0.5em;
  383. height: 0.5em;
  384. -webkit-box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  385. box-shadow: -1px -1px 0px 1px rgba(0, 0, 0, 0.05);
  386. background-image: none;
  387. background-color: #FFFFFF;
  388. -webkit-transform: rotate(45deg);
  389. -ms-transform: rotate(45deg);
  390. transform: rotate(45deg);
  391. z-index: 2;
  392. }
  393. .ui.pointing.dropdown .menu .active.item:first-child {
  394. background: transparent -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  395. background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.03));
  396. }
  397. /* Directions */
  398. .ui.pointing.dropdown .menu:after {
  399. top: -0.25em;
  400. left: 50%;
  401. margin: 0em 0em 0em -0.25em;
  402. }
  403. .ui.top.left.pointing.dropdown .menu {
  404. top: 100%;
  405. bottom: auto;
  406. left: 0%;
  407. right: auto;
  408. margin: 0.75em 0em 0em;
  409. }
  410. .ui.top.left.pointing.dropdown .menu:after {
  411. top: -0.25em;
  412. left: 1.25em;
  413. right: auto;
  414. margin: 0em;
  415. -webkit-transform: rotate(45deg);
  416. -ms-transform: rotate(45deg);
  417. transform: rotate(45deg);
  418. }
  419. .ui.top.right.pointing.dropdown .menu {
  420. top: 100%;
  421. bottom: auto;
  422. right: 0%;
  423. left: auto;
  424. margin: 0.75em 0em 0em;
  425. }
  426. .ui.top.right.pointing.dropdown .menu:after {
  427. top: -0.25em;
  428. left: auto;
  429. right: 1.25em;
  430. margin: 0em;
  431. -webkit-transform: rotate(45deg);
  432. -ms-transform: rotate(45deg);
  433. transform: rotate(45deg);
  434. }
  435. .ui.left.pointing.dropdown .menu {
  436. top: 0%;
  437. left: 100%;
  438. right: auto;
  439. margin: 0em 0em 0em 0.75em;
  440. }
  441. .ui.left.pointing.dropdown .menu:after {
  442. top: 1em;
  443. left: -0.25em;
  444. margin: 0em 0em 0em 0em;
  445. -webkit-transform: rotate(-45deg);
  446. -ms-transform: rotate(-45deg);
  447. transform: rotate(-45deg);
  448. }
  449. .ui.right.pointing.dropdown .menu {
  450. top: 0%;
  451. left: auto;
  452. right: 100%;
  453. margin: 0em 0.75em 0em 0em;
  454. }
  455. .ui.right.pointing.dropdown .menu:after {
  456. top: 1em;
  457. left: auto;
  458. right: -0.25em;
  459. margin: 0em 0em 0em 0em;
  460. -webkit-transform: rotate(135deg);
  461. -ms-transform: rotate(135deg);
  462. transform: rotate(135deg);
  463. }