Switch.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. Copyright (C) 2017 Cloudbase Solutions SRL
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. @import '../variables.scss';
  15. .root {
  16. display: flex;
  17. align-items: center;
  18. position: relative;
  19. .label {
  20. margin-left: 16px;
  21. color: $gray-dark;
  22. font-weight: $weight-light;
  23. }
  24. input[type="checkbox"] {
  25. width: 32px;
  26. height: 16px;
  27. cursor: pointer;
  28. }
  29. input[type="checkbox"]:global(.tinyswitch.ios-switch) + div {
  30. width: 30px;
  31. height: 14px;
  32. background-color: $task-gray-light;
  33. border: 1px solid $task-gray-light;
  34. }
  35. input[type="checkbox"]:global(.ios-switch):checked + div {
  36. background-color: $blue;
  37. border: 1px solid $blue;
  38. box-shadow: none;
  39. }
  40. input[type="checkbox"]:global(.ios-switch) + div {
  41. transition-duration: 0.2s;
  42. }
  43. input[type="checkbox"]:global(.ios-switch) + div > div {
  44. transition-timing-function: ease;
  45. transition-duration: 0.2s;
  46. }
  47. input[type="checkbox"]:global(.tinyswitch.ios-switch) + div > div {
  48. height: 14px;
  49. width: 14px;
  50. margin-left: 0px;
  51. margin-top: 0px;
  52. box-shadow: none;
  53. }
  54. }