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.

RadioCard.css 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. .radio-card {
  21. display: flex;
  22. flex-direction: column;
  23. width: 450px;
  24. min-height: 210px;
  25. background-color: #fff;
  26. border: solid 1px var(--barBorderColor);
  27. border-radius: 3px;
  28. box-sizing: border-box;
  29. margin-right: calc(2 * var(--gridSize));
  30. transition: all 0.2s ease;
  31. }
  32. .radio-card.animated {
  33. height: 0;
  34. border-width: 0;
  35. overflow: hidden;
  36. }
  37. .radio-card.animated.open {
  38. height: 210px;
  39. border-width: 1px;
  40. }
  41. .radio-card.highlight {
  42. box-shadow: var(--defaultShadow);
  43. }
  44. .radio-card:last-child {
  45. margin-right: 0;
  46. }
  47. .radio-card:focus {
  48. outline: none;
  49. }
  50. .radio-card-vertical {
  51. width: 100%;
  52. min-height: auto;
  53. }
  54. .radio-card-actionable {
  55. cursor: pointer;
  56. }
  57. .radio-card-actionable:not(.disabled):hover {
  58. box-shadow: var(--defaultShadow);
  59. transform: translateY(-2px);
  60. }
  61. .radio-card-actionable.selected {
  62. border-color: var(--darkBlue);
  63. }
  64. /*
  65. * Disabled transform property because it moves the element to a new stacking context
  66. * creating z-index conflicts with other components.
  67. * This is a problem with a vertical list of RadioCards where a select might be above another RadioCard
  68. */
  69. .radio-card-actionable.radio-card-vertical:not(.disabled):hover {
  70. box-shadow: none;
  71. transform: none;
  72. }
  73. .radio-card-actionable.radio-card-vertical:not(.selected):not(.disabled):hover {
  74. border-color: var(--lightBlue);
  75. }
  76. .radio-card-actionable.selected .radio-card-recommended {
  77. border: solid 1px var(--darkBlue);
  78. border-top: none;
  79. }
  80. .radio-card-actionable.disabled {
  81. cursor: not-allowed;
  82. background-color: var(--disableGrayBg);
  83. border-color: var(--disableGrayBorder);
  84. }
  85. .radio-card-actionable.disabled h2,
  86. .radio-card-actionable.disabled ul {
  87. color: var(--disableGrayText);
  88. }
  89. .radio-card-header {
  90. display: flex;
  91. justify-content: space-between;
  92. align-items: center;
  93. padding: calc(2 * var(--gridSize)) calc(2 * var(--gridSize)) 0;
  94. }
  95. .radio-card-body {
  96. flex-grow: 1;
  97. display: flex;
  98. flex-direction: column;
  99. justify-content: space-between;
  100. padding: 0 calc(2 * var(--gridSize)) calc(2 * var(--gridSize));
  101. }
  102. .radio-card-body .alert {
  103. margin-bottom: 0;
  104. }
  105. .radio-card-recommended {
  106. position: relative;
  107. padding: 6px calc(var(--gridSize) * 2);
  108. left: -1px;
  109. bottom: -1px;
  110. width: 450px;
  111. color: #fff;
  112. background-color: var(--blue);
  113. border-radius: 0 0 3px 3px;
  114. box-sizing: border-box;
  115. font-size: var(--smallFontSize);
  116. }