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.

Checkbox.css 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2021 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. .icon-checkbox {
  21. display: inline-block;
  22. line-height: 1;
  23. vertical-align: top;
  24. padding: 1px 2px;
  25. box-sizing: border-box;
  26. }
  27. a.icon-checkbox {
  28. border-bottom: none;
  29. }
  30. .icon-checkbox:focus {
  31. outline: none;
  32. }
  33. .icon-checkbox:before {
  34. content: ' ';
  35. display: inline-block;
  36. width: 10px;
  37. height: 10px;
  38. border: 1px solid var(--darkBlue);
  39. border-radius: 2px;
  40. transition: border-color 0.2s ease, background-color 0.2s ease, background-image 0.2s ease,
  41. box-shadow 0.4s ease;
  42. }
  43. .icon-checkbox:not(.icon-checkbox-disabled):focus:before,
  44. .link-checkbox:not(.disabled):focus:focus .icon-checkbox:before {
  45. box-shadow: 0 0 0 3px rgba(35, 106, 151, 0.25);
  46. }
  47. .icon-checkbox-checked:before {
  48. background-color: var(--blue);
  49. background-image: url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2014%2014%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M12%204.665c0%20.172-.06.318-.18.438l-5.55%205.55c-.12.12-.266.18-.438.18s-.318-.06-.438-.18L2.18%207.438C2.06%207.317%202%207.17%202%207s.06-.318.18-.44l.878-.876c.12-.12.267-.18.44-.18.17%200%20.317.06.437.18l1.897%201.903%204.233-4.24c.12-.12.266-.18.438-.18s.32.06.44.18l.876.88c.12.12.18.265.18.438z%22%20fill%3D%22%23fff%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E');
  50. border-color: var(--blue);
  51. }
  52. .icon-checkbox-checked.icon-checkbox-single:before {
  53. background-image: url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2014%2014%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20stroke-linejoin%3D%22round%22%20stroke-miterlimit%3D%221.414%22%3E%3Cpath%20d%3D%22M10%204.698C10%204.312%209.688%204%209.302%204H4.698C4.312%204%204%204.312%204%204.698v4.604c0%20.386.312.698.698.698h4.604c.386%200%20.698-.312.698-.698V4.698z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E');
  54. }
  55. .icon-checkbox-disabled:before {
  56. border: 1px solid var(--disableGrayText);
  57. cursor: not-allowed;
  58. }
  59. .icon-checkbox-disabled.icon-checkbox-checked:before {
  60. background-color: var(--disableGrayText);
  61. }
  62. .icon-checkbox-invisible {
  63. visibility: hidden;
  64. }
  65. .link-checkbox {
  66. color: inherit;
  67. border-bottom: none;
  68. }
  69. .link-checkbox.disabled,
  70. .link-checkbox.disabled:hover,
  71. .link-checkbox.disabled label {
  72. color: var(--secondFontColor);
  73. cursor: not-allowed;
  74. }
  75. .link-checkbox:hover,
  76. .link-checkbox:active,
  77. .link-checkbox:focus {
  78. color: inherit;
  79. }