Brak opisu

_checkboxes-radio.scss 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. .form-check{
  2. margin-top: .5rem;
  3. padding-left: 0;
  4. }
  5. .form-check .form-check-label{
  6. display: inline-block;
  7. position: relative;
  8. cursor: pointer;
  9. padding-left: 25px;
  10. line-height: 18px;
  11. margin-bottom: 0;
  12. -webkit-transition: color 0.3s linear;
  13. -moz-transition: color 0.3s linear;
  14. -o-transition: color 0.3s linear;
  15. -ms-transition: color 0.3s linear;
  16. transition: color 0.3s linear;
  17. }
  18. .radio .form-check-sign{
  19. padding-left: 28px;
  20. }
  21. .form-check-radio.form-check-inline .form-check-label {
  22. padding-left: 5px;
  23. margin-right: 10px;
  24. }
  25. .form-check .form-check-sign::before,
  26. .form-check .form-check-sign::after{
  27. content: " ";
  28. display: inline-block;
  29. position: absolute;
  30. width: 17px;
  31. height: 17px;
  32. left: 0;
  33. cursor: pointer;
  34. border-radius: 3px;
  35. top: 0;
  36. border: 1px solid darken($dark-gray,10%);
  37. -webkit-transition: opacity 0.3s linear;
  38. -moz-transition: opacity 0.3s linear;
  39. -o-transition: opacity 0.3s linear;
  40. -ms-transition: opacity 0.3s linear;
  41. transition: opacity 0.3s linear;
  42. }
  43. .form-check input[type="checkbox"]:checked + .form-check-sign::before,
  44. .form-check input[type="checkbox"]:checked + .form-check-sign::before{
  45. border: none;
  46. background-color: $primary;
  47. }
  48. .form-check .form-check-sign::after{
  49. font-family: 'nucleo';
  50. content: "\ea1b";
  51. top: 0px;
  52. text-align: center;
  53. font-size: 14px;
  54. opacity: 0;
  55. color: $white;
  56. font-weight: $font-weight-bold;
  57. border: 0;
  58. background-color: inherit;
  59. }
  60. .form-check.disabled .form-check-label,
  61. .form-check.disabled .form-check-label {
  62. color: $dark-gray;
  63. opacity: .5;
  64. cursor: not-allowed;
  65. }
  66. .form-check input[type="checkbox"],
  67. .radio input[type="radio"]{
  68. opacity: 0;
  69. position: absolute;
  70. visibility: hidden;
  71. }
  72. .form-check input[type="checkbox"]:checked + .form-check-sign::after{
  73. opacity: 1;
  74. font-size: 10px;
  75. margin-top: 0;
  76. }
  77. .form-check input[type="checkbox"]+ .form-check-sign::after{
  78. opacity: 0;
  79. font-size: 10px;
  80. margin-top: 0;
  81. }
  82. .form-control input[type="checkbox"]:disabled + .form-check-sign::before,
  83. .checkbox input[type="checkbox"]:disabled + .form-check-sign::after{
  84. cursor: not-allowed;
  85. }
  86. .form-check input[type="checkbox"]:disabled + .form-check-sign,
  87. .form-check input[type="radio"]:disabled + .form-check-sign{
  88. pointer-events: none;
  89. }
  90. .form-check-radio .form-check-label{
  91. padding-top: 3px;
  92. }
  93. .form-check-radio .form-check-sign::before,
  94. .form-check-radio .form-check-sign::after{
  95. content: " ";
  96. width: 18px;
  97. height: 18px;
  98. border-radius: 50%;
  99. border: 1px solid darken($dark-gray,10%);
  100. display: inline-block;
  101. position: absolute;
  102. left: 0px;
  103. top: 3px;
  104. padding: 1px;
  105. -webkit-transition: opacity 0.3s linear;
  106. -moz-transition: opacity 0.3s linear;
  107. -o-transition: opacity 0.3s linear;
  108. -ms-transition: opacity 0.3s linear;
  109. transition: opacity 0.3s linear;
  110. }
  111. .form-check-radio input[type="radio"] + .form-check-sign:after,
  112. .form-check-radio input[type="radio"] {
  113. opacity: 0;
  114. }
  115. .form-check-radio input[type="radio"]:checked + .form-check-sign::after {
  116. width: 6px;
  117. height: 6px;
  118. background-color: $primary;
  119. border-color: $primary;
  120. top: 9px;
  121. left: 6px;
  122. opacity: 1;
  123. }
  124. .form-check-radio input[type="radio"]:checked + .form-check-sign::before {
  125. border-color: $primary;
  126. }
  127. .form-check-radio input[type="radio"]:checked + .form-check-sign::after{
  128. opacity: 1;
  129. }
  130. .form-check-radio input[type="radio"]:disabled + .form-check-sign {
  131. color: $dark-gray;
  132. }
  133. .form-check-radio input[type="radio"]:disabled + .form-check-sign::before,
  134. .form-check-radio input[type="radio"]:disabled + .form-check-sign::after {
  135. color: $dark-gray;
  136. }