Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Toggle.css 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. .button.boolean-toggle {
  21. display: inline-block;
  22. vertical-align: middle;
  23. width: 48px;
  24. height: var(--controlHeight);
  25. padding: 1px;
  26. border: 1px solid var(--gray80);
  27. border-radius: var(--controlHeight);
  28. box-sizing: border-box;
  29. background-color: #fff;
  30. cursor: pointer;
  31. transition: all 0.3s ease;
  32. }
  33. .button.boolean-toggle:hover {
  34. background-color: #fff;
  35. }
  36. .button.boolean-toggle:focus {
  37. border-color: var(--blue);
  38. background-color: #f6f6f6;
  39. }
  40. .boolean-toggle-handle {
  41. display: flex;
  42. justify-content: center;
  43. align-items: center;
  44. width: 20px;
  45. height: 20px;
  46. border: 1px solid var(--gray80);
  47. border-radius: 22px;
  48. box-sizing: border-box;
  49. background-color: #f6f6f6;
  50. transition: transform 0.3s cubic-bezier(0.87, -0.41, 0.19, 1.44), border 0.3s ease;
  51. }
  52. .boolean-toggle-handle > * {
  53. opacity: 0;
  54. transition: opacity 0.3s ease;
  55. }
  56. .button.boolean-toggle-on {
  57. border-color: var(--darkBlue);
  58. background-color: var(--darkBlue);
  59. color: var(--darkBlue);
  60. }
  61. .button.boolean-toggle-on:hover {
  62. background-color: var(--darkBlue);
  63. }
  64. .button.boolean-toggle-on:focus {
  65. background-color: var(--darkBlue);
  66. }
  67. .button.boolean-toggle-on .boolean-toggle-handle {
  68. border-color: #f6f6f6;
  69. transform: translateX(var(--controlHeight));
  70. }
  71. .button.boolean-toggle-on .boolean-toggle-handle > * {
  72. opacity: 1;
  73. }