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.

152 lines
4.2 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. white-space: nowrap;
  20. }
  21. .ui.dropdown .menu {
  22. position: absolute;
  23. display: none;
  24. top: 100%;
  25. background-color: #FFFFFF;
  26. min-width: 100%;
  27. -webkit-box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1), 1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, -1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset;
  28. -moz-box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1), 1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, -1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset;
  29. box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1), 1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, -1px 0px 0px 0px rgba(0, 0, 0, 0.1) inset, 0px -1px 0px 0px rgba(0, 0, 0, 0.1) inset;
  30. -moz-border-radius: 0px 0px 0.325em 0.325em;
  31. -webkit-border-radius: 0px 0px 0.325em 0.325em;
  32. border-radius: 0px 0px 0.325em 0.325em;
  33. -webkit-transition: opacity 0.2s ease-out;
  34. -moz-transition: opacity 0.2s ease-out;
  35. -o-transition: opacity 0.2s ease-out;
  36. -ms-transition: opacity 0.2s ease-out;
  37. transition: opacity 0.2s ease-out;
  38. z-index: 11;
  39. }
  40. /* Flyout Direction */
  41. .ui.dropdown .menu {
  42. left: 0px;
  43. }
  44. .ui > .ui.dropdown:last-child .menu {
  45. left: auto;
  46. right: 0px;
  47. }
  48. .ui.dropdown .menu .item {
  49. cursor: pointer;
  50. border: none;
  51. border-top: 1px solid rgba(0, 0, 0, 0.05);
  52. font-size: 0.9em;
  53. display: block;
  54. color: rgba(0, 0, 0, 0.75);
  55. padding: 0.85em 1em;
  56. font-size: 0.9rem;
  57. text-transform: none;
  58. font-weight: normal;
  59. text-align: left;
  60. -webkit-touch-callout: none;
  61. }
  62. .ui.dropdown .menu .item .icon {
  63. margin-right: 0.75em;
  64. }
  65. .ui.dropdown .menu .item:first-child {
  66. border-top: none;
  67. }
  68. /*******************************
  69. States
  70. *******************************/
  71. .ui.dropdown.visible {
  72. border-bottom-left-radius: 0em !important;
  73. border-bottom-right-radius: 0em !important;
  74. }
  75. .ui.dropdown .menu .item:hover {
  76. background-color: rgba(0, 0, 0, 0.02);
  77. }
  78. .ui.dropdown .menu .active.item {
  79. border-top: 1px solid rgba(0, 0, 0, 0.05);
  80. font-weight: bold;
  81. }
  82. /*******************************
  83. Variations
  84. *******************************/
  85. /*--------------
  86. Simple
  87. ---------------*/
  88. /* Displays without javascript */
  89. .ui.simple.dropdown .menu {
  90. overflow: hidden;
  91. height: 0px;
  92. width: 0px;
  93. position: absolute;
  94. opacity: 0;
  95. -webkit-transition: opacity 0.2s ease-out;
  96. -moz-transition: opacity 0.2s ease-out;
  97. -o-transition: opacity 0.2s ease-out;
  98. -ms-transition: opacity 0.2s ease-out;
  99. transition: opacity 0.2s ease-out;
  100. }
  101. .ui.simple.dropdown:hover .menu {
  102. display: block;
  103. overflow: visible;
  104. min-width: 210px;
  105. width: 100%;
  106. height: auto;
  107. opacity: 1;
  108. }
  109. /*--------------
  110. Selection
  111. ---------------*/
  112. .ui.selection.dropdown {
  113. cursor: pointer;
  114. display: inline-block;
  115. background-color: #FFFFFF;
  116. padding: 0.5em 1em;
  117. line-height: 1.33;
  118. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  119. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  120. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);
  121. -webkit-border-radius: 0.3125em;
  122. -moz-border-radius: 0.3125em;
  123. border-radius: 0.3125em;
  124. }
  125. .ui.selection.dropdown > .dropdown.icon {
  126. float: right;
  127. margin: 0.2em 0em 0.2em 0.5em;
  128. }
  129. .ui.selection.dropdown,
  130. .ui.selection.dropdown .menu {
  131. -webkit-transition: box-shadow 0.2s ease-out;
  132. -moz-transition: box-shadow 0.2s ease-out;
  133. -o-transition: box-shadow 0.2s ease-out;
  134. -ms-transition: box-shadow 0.2s ease-out;
  135. transition: box-shadow 0.2s ease-out;
  136. }
  137. .ui.selection.dropdown .menu {
  138. -webkit-box-shadow: 0px 1px 0px 1px #EEEEEE;
  139. -moz-box-shadow: 0px 1px 0px 1px #EEEEEE;
  140. box-shadow: 0px 1px 0px 1px #EEEEEE;
  141. }
  142. .ui.selection.dropdown:hover,
  143. .ui.selection.dropdown.hover {
  144. -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  145. -moz-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  146. box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
  147. }
  148. .ui.selection.dropdown:hover .menu {
  149. -webkit-box-shadow: 0px 1px 0px 1px #D3D3D3;
  150. -moz-box-shadow: 0px 1px 0px 1px #D3D3D3;
  151. box-shadow: 0px 1px 0px 1px #D3D3D3;
  152. }