settings.css 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * Copyright 2018 The Rust Project Developers. See the COPYRIGHT
  3. * file at the top-level directory of this distribution and at
  4. * http://rust-lang.org/COPYRIGHT.
  5. *
  6. * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
  7. * http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
  8. * <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
  9. * option. This file may not be copied, modified, or distributed
  10. * except according to those terms.
  11. */
  12. .setting-line {
  13. padding: 5px;
  14. }
  15. .setting-line > div {
  16. max-width: calc(100% - 74px);
  17. display: inline-block;
  18. vertical-align: top;
  19. font-size: 17px;
  20. padding-top: 2px;
  21. }
  22. .toggle {
  23. position: relative;
  24. display: inline-block;
  25. width: 45px;
  26. height: 27px;
  27. margin-right: 20px;
  28. }
  29. .toggle input {
  30. display: none;
  31. }
  32. .slider {
  33. position: absolute;
  34. cursor: pointer;
  35. top: 0;
  36. left: 0;
  37. right: 0;
  38. bottom: 0;
  39. background-color: #ccc;
  40. -webkit-transition: .3s;
  41. transition: .3s;
  42. }
  43. .slider:before {
  44. position: absolute;
  45. content: "";
  46. height: 19px;
  47. width: 19px;
  48. left: 4px;
  49. bottom: 4px;
  50. background-color: white;
  51. -webkit-transition: .3s;
  52. transition: .3s;
  53. }
  54. input:checked + .slider {
  55. background-color: #2196F3;
  56. }
  57. input:focus + .slider {
  58. box-shadow: 0 0 1px #2196F3;
  59. }
  60. input:checked + .slider:before {
  61. -webkit-transform: translateX(19px);
  62. -ms-transform: translateX(19px);
  63. transform: translateX(19px);
  64. }