radio.less 1.9 KB

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