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.

buttons.css 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2022 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. .button {
  21. display: inline-flex;
  22. align-items: center;
  23. justify-content: center;
  24. vertical-align: middle;
  25. height: var(--controlHeight);
  26. line-height: calc(var(--controlHeight) - 2px);
  27. padding: 0 var(--gridSize);
  28. border: 1px solid var(--darkBlue);
  29. border-radius: 2px;
  30. box-sizing: border-box;
  31. background: transparent;
  32. color: var(--darkBlue);
  33. font-weight: 600;
  34. font-size: var(--smallFontSize);
  35. text-decoration: none;
  36. cursor: pointer;
  37. outline: none;
  38. transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  39. }
  40. .button:hover,
  41. .button.selected {
  42. background: var(--darkBlue);
  43. color: var(--white);
  44. }
  45. .button-primary {
  46. background: var(--darkBlue);
  47. border-color: var(--darkBlue);
  48. color: var(--white);
  49. }
  50. .button-primary:hover {
  51. background: var(--veryDarkBlue);
  52. border-color: var(--veryDarkBlue);
  53. }
  54. .button-primary.button-light {
  55. background: var(--blue);
  56. border-color: var(--blue);
  57. color: var(--white);
  58. }
  59. .button-primary.button-light:hover {
  60. background: var(--darkBlue);
  61. border-color: var(--darkBlue);
  62. }
  63. .button.disabled {
  64. color: var(--disableGrayText) !important;
  65. border-color: var(--disableGrayBorder) !important;
  66. background: var(--disableGrayBg) !important;
  67. cursor: not-allowed !important;
  68. }
  69. /* #region .button-red */
  70. .button-red {
  71. border-color: var(--red);
  72. color: var(--red);
  73. }
  74. .button-red:hover,
  75. .button-red.active {
  76. background: var(--red);
  77. color: var(--white);
  78. }
  79. /* #endregion */
  80. /* #region .button-success */
  81. .button-success {
  82. border-color: var(--green);
  83. color: var(--green);
  84. }
  85. .button-success:hover,
  86. .button-success.active {
  87. background: var(--green);
  88. color: var(--white);
  89. }
  90. /* #endregion */
  91. /* #region .button-plain */
  92. .button-plain {
  93. box-sizing: border-box;
  94. background: inherit;
  95. color: inherit;
  96. cursor: pointer;
  97. outline: none;
  98. border: 0;
  99. }
  100. /* #endregion */
  101. /* #region .button-link */
  102. .button-link {
  103. display: inline-flex;
  104. height: auto;
  105. /* Keep this to not inherit the height from .button */
  106. line-height: 1;
  107. margin: 0;
  108. padding: 0;
  109. border: none;
  110. border-radius: 0;
  111. background: transparent;
  112. color: var(--darkBlue);
  113. border-bottom: 1px solid var(--lightBlue);
  114. font-weight: 400;
  115. font-size: inherit;
  116. transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-bottom 0.2s ease;
  117. }
  118. .dropdown .button-link {
  119. border-bottom: none;
  120. }
  121. .button-link:hover {
  122. background: transparent;
  123. color: var(--blue);
  124. }
  125. .button-link.disabled {
  126. color: var(--secondFontColor);
  127. background: transparent !important;
  128. cursor: default;
  129. }
  130. /* #endregion */
  131. .button-small {
  132. height: var(--smallControlHeight);
  133. line-height: 18px;
  134. padding: 0 6px;
  135. font-size: 11px;
  136. }
  137. .button-tiny {
  138. height: var(--tinyControlHeight);
  139. line-height: var(--tinyControlHeight);
  140. padding: 0 calc(var(--gridSize) / 2);
  141. }
  142. .button-large {
  143. height: var(--largeControlHeight);
  144. padding: 0 16px;
  145. font-size: var(--mediumFontSize);
  146. }
  147. .button-huge {
  148. flex-direction: column;
  149. padding: calc(2 * var(--gridSize)) var(--gridSize);
  150. width: 180px;
  151. height: 180px;
  152. background-color: var(--white);
  153. border: solid 1px var(--white);
  154. border-radius: 3px;
  155. transition: all 0.2s ease;
  156. }
  157. .button-huge:hover,
  158. .button-huge:focus,
  159. .button-huge:active {
  160. background-color: var(--white);
  161. color: var(--darkBlue);
  162. transform: translateY(-2px);
  163. }
  164. /* #region .button-icon */
  165. .button-icon {
  166. display: inline-flex;
  167. justify-content: center;
  168. align-items: center;
  169. vertical-align: middle;
  170. width: var(--controlHeight);
  171. height: var(--controlHeight);
  172. padding: 0;
  173. border: none;
  174. color: inherit;
  175. }
  176. .button-icon.button-small {
  177. width: var(--smallControlHeight);
  178. height: var(--smallControlHeight);
  179. padding: 0;
  180. }
  181. .button-icon.button-small svg {
  182. margin-top: 0;
  183. }
  184. .button-icon.button-tiny {
  185. width: var(--tinyControlHeight);
  186. height: var(--tinyControlHeight);
  187. padding: 0;
  188. }
  189. .button-icon.button-tiny svg {
  190. margin-top: 0;
  191. }
  192. .button-icon:hover,
  193. .button-icon:focus {
  194. background-color: currentColor;
  195. }
  196. .button-icon:not(.disabled):hover svg,
  197. .button-icon:not(.disabled):focus svg {
  198. color: var(--white);
  199. }
  200. .button.button-icon.disabled {
  201. background: transparent !important;
  202. }
  203. /* #endregion */
  204. .button-list {
  205. display: inline-flex;
  206. justify-content: space-between;
  207. height: auto;
  208. border: 1px solid var(--barBorderColor);
  209. padding: var(--gridSize);
  210. margin: calc(var(--gridSize) / 2);
  211. color: var(--secondFontColor);
  212. font-weight: normal;
  213. }
  214. .button-list:hover {
  215. background-color: white;
  216. border-color: var(--blue);
  217. color: var(--darkBlue);
  218. }
  219. .no-select {
  220. user-select: none !important;
  221. }
  222. a[download].button.disabled {
  223. pointer-events: none;
  224. }