checkbox.less 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .checkbox {
  2. &.highlight {
  3. // padding: 4px;
  4. & + .checkbox.highlight {
  5. margin-top: -5px;
  6. }
  7. & label.checkbox-custom {
  8. padding: 4px 4px 4px 24px;
  9. //margin-left: -8px;
  10. }
  11. &.checked label.checkbox-custom {
  12. background: #e9e9e9;
  13. border-radius: @baseBorderRadius;
  14. }
  15. }
  16. /* for keyboard tabbing */
  17. input[type="checkbox"]:focus + .checkbox-label,
  18. input[type="checkbox"]:hover + .checkbox-label,
  19. .checkbox-label:hover
  20. {
  21. color: @grayLight;
  22. }
  23. input[type="checkbox"]:disabled:focus + .checkbox-label,
  24. input[type="checkbox"]:disabled:hover + .checkbox-label,
  25. &.disabled label:hover
  26. {
  27. color: inherit;
  28. }
  29. }
  30. .form-horizontal .checkbox-inline {
  31. padding-top: 0;
  32. }
  33. .input-group-addon.checkbox-custom.checkbox-inline:before {
  34. left: 11px;
  35. top: 9px;
  36. }
  37. .checkbox-custom {
  38. position: relative;
  39. &:before {
  40. .iconBaseStyles("Glyphicons Halflings");
  41. border: 1px solid #adadad;
  42. border-radius: @baseBorderRadius;
  43. color: #fff;
  44. content: " ";
  45. font-size: 9px;
  46. height: 14px;
  47. left: 0px;
  48. padding: 1px 0 0 1px;
  49. position: absolute;
  50. top: 3px;
  51. width: 14px;
  52. }
  53. /* for keyboard tabbing */
  54. &:active:before, &:focus:before {
  55. color: @text-color;
  56. color: rgb(91, 157, 217);
  57. cursor: pointer;
  58. outline-color: rgb(91, 157, 217);
  59. outline-offset: -2px;
  60. outline-style: auto;
  61. outline-width: 5px;
  62. }
  63. &.highlight {
  64. &:before {
  65. left: 4px;
  66. top: 6px;
  67. }
  68. }
  69. &.checked {
  70. &:before {
  71. background: #39b3d7;
  72. border-color: #39b3d7;
  73. content: "\e013";
  74. }
  75. }
  76. &.disabled {
  77. cursor: not-allowed;
  78. &:before
  79. {
  80. cursor: not-allowed;
  81. opacity: .5;
  82. }
  83. }
  84. &.checkbox-inline {
  85. &:before {
  86. left: 0;
  87. top: 3px;
  88. }
  89. &.highlight {
  90. padding: 4px 4px 4px 24px;
  91. left: -4px;
  92. &:before {
  93. left: 4px;
  94. top: 7px;
  95. }
  96. &.checked {
  97. background: #e9e9e9;
  98. border-radius: @baseBorderRadius;
  99. }
  100. }
  101. }
  102. /* for keyboard tabbing */
  103. input[type="checkbox"]:focus + .checkbox-label {
  104. color: @grayLight;
  105. }
  106. }
  107. label.checkbox-custom.checkbox-inline {
  108. padding-left: 20px;
  109. }