_checkboxradio.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. [type="checkbox"] {
  2. + label {
  3. padding-left: 26px;
  4. height: 25px;
  5. line-height: 21px;
  6. font-size: 13px;
  7. font-weight: normal;
  8. }
  9. &:checked {
  10. + label {
  11. &:before {
  12. top: -4px;
  13. left: -2px;
  14. width: 11px;
  15. height: 19px;
  16. }
  17. }
  18. }
  19. @each $key, $val in $colors {
  20. &:checked.chk-col-#{$key} {
  21. + label {
  22. &:before {
  23. border-right: 2px solid $val;
  24. border-bottom: 2px solid $val;
  25. }
  26. }
  27. }
  28. }
  29. }
  30. [type="checkbox"].filled-in {
  31. &:checked {
  32. + label {
  33. &:after {
  34. top: 0;
  35. width: 20px;
  36. height: 20px;
  37. border: 2px solid #26a69a;
  38. background-color: #26a69a;
  39. z-index: 0;
  40. }
  41. &:before {
  42. border-right: 2px solid #fff !important;
  43. border-bottom: 2px solid #fff !important;
  44. }
  45. }
  46. }
  47. @each $key, $val in $colors {
  48. &:checked.chk-col-#{$key} {
  49. + label {
  50. &:after {
  51. border: 2px solid $val;
  52. background-color: $val;
  53. }
  54. }
  55. }
  56. }
  57. }
  58. [type="radio"] {
  59. &:not(:checked) {
  60. + label {
  61. padding-left: 26px;
  62. height: 25px;
  63. line-height: 25px;
  64. font-size: 13px;
  65. font-weight: normal;
  66. }
  67. }
  68. &:checked {
  69. + label {
  70. padding-left: 26px;
  71. height: 25px;
  72. line-height: 25px;
  73. font-size: 13px;
  74. font-weight: normal;
  75. }
  76. }
  77. }
  78. @each $key, $val in $colors {
  79. [type="radio"].radio-col-#{$key} {
  80. &:checked {
  81. + label {
  82. &:after {
  83. background-color: $val;
  84. border-color: $val;
  85. }
  86. }
  87. }
  88. }
  89. }
  90. @each $key, $val in $colors {
  91. [type="radio"].with-gap.radio-col-#{$key} {
  92. &:checked {
  93. + label {
  94. &:before {
  95. border: 2px solid $val;
  96. }
  97. &:after {
  98. background-color: $val;
  99. border: 2px solid $val;
  100. }
  101. }
  102. }
  103. }
  104. }