form-checkbox.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. @import "vars";
  2. @import "mixins";
  3. @import "unicode";
  4. .checkbox.checked:before { opacity: 1; @extend .icon-input-checkbox-checked:before;}
  5. .radio.checked:before { opacity: 1; @extend .icon-input-radio-checked:before;}
  6. .checkbox:hover:before { @extend .icon-input-checkbox-checked:before;}
  7. .radio:hover:before { @extend .icon-input-radio-checked:before;}
  8. .checkbox:active:before { opacity: 1; @extend .icon-input-checkbox-checked:before; }
  9. .radio:active:before { opacity: 1; @extend .icon-input-radio-checked:before; }
  10. .checkbox:hover:before { @extend .icon-input-checkbox-checked:before; }
  11. .radio:hover:before { @extend .icon-input-radio-checked:before; }
  12. .checkbox:active { color: white; }
  13. .radio:active { color: white; }
  14. @media screen and (-webkit-min-device-pixel-ratio:0) {}
  15. .radio,
  16. .checkbox {
  17. @include user-select(none);
  18. display: inline-block !important;
  19. padding: 20px 10px;
  20. padding-left: 35px;
  21. line-height: 1.5;
  22. width: 100%;
  23. text-align: left;
  24. color: $medium;
  25. font-weight: normal;
  26. cursor: pointer;
  27. border-radius: $radius;
  28. vertical-align: middle;
  29. position: relative;
  30. input {
  31. padding: 0;
  32. margin:0;
  33. vertical-align: bottom;
  34. *overflow: hidden;
  35. cursor: pointer;
  36. position: absolute;
  37. left: 14px;
  38. top: 50%;
  39. margin-top: -5px;
  40. width: 14px;
  41. height: 14px;
  42. display: none;
  43. }
  44. &:before {
  45. opacity: 0.25;
  46. @include icon;
  47. @extend .icon-input-radio:before;
  48. margin-left: -18px;
  49. // margin-top: -8px;
  50. line-height: 60px;
  51. position: absolute;
  52. left: 0;
  53. top: 0;
  54. }
  55. &.plain {
  56. background-color: transparent;
  57. margin: 0;
  58. margin-top: -6px;
  59. padding: 0px;
  60. line-height: 44px;
  61. padding-left: 33px;
  62. width: 100%;
  63. input {
  64. margin-top: -7px;
  65. left: 6px;
  66. }
  67. &:after {
  68. background-color: #121212;
  69. -webkit-box-shadow: 0 0 0 4px #121212;
  70. box-shadow: 0 0 0 4px #121212;
  71. }
  72. }
  73. &.only {
  74. margin: 0;
  75. width: 100%;
  76. text-align: left;
  77. line-height: 60px !important;
  78. vertical-align: middle;
  79. position: relative;
  80. background-color: transparent;
  81. padding: 0px !important;
  82. font-size: 0px;
  83. width: 60px;
  84. height: 60px;
  85. input {
  86. float: none;
  87. margin: 0px;
  88. position: absolute;
  89. top: 50%;
  90. left: 50%;
  91. margin: -7px;
  92. }
  93. &:before {
  94. margin-top: 0px;
  95. margin-left: 0px;
  96. }
  97. }
  98. &.input-lg {
  99. padding: 22px;
  100. padding-left: 50px;
  101. font-size: 16px;
  102. height: 65px;
  103. line-height: 20px;
  104. height: 65px;
  105. font-weight: 300;
  106. input {
  107. margin-top: -8px;
  108. left: 20px;
  109. }
  110. &:after {
  111. margin-top: -12px;
  112. margin-left: 16px;
  113. }
  114. }
  115. }
  116. .checkbox-group > * {
  117. display: inline-block !important;
  118. width: auto !important;
  119. padding-right: 15px !important;
  120. }