radio-no-js.less 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .radio, .radio-inline {
  2. input[type="radio"]:not(.sr-only) {
  3. & ~ label {
  4. &:before {
  5. border-radius: 8px;
  6. z-index: 1;
  7. }
  8. }
  9. &:checked {
  10. & ~ label {
  11. &:before {
  12. background: #39b3d7; /* Old browsers */
  13. background: -moz-radial-gradient(center, ellipse cover, #ffffff 0%, #ffffff 40%, #39b3d7 41%, #39b3d7 100%); /* FF3.6+ */
  14. background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#ffffff), color-stop(40%,#ffffff), color-stop(41%,#39b3d7), color-stop(100%,#39b3d7)); /* Chrome,Safari4+ */
  15. background: -webkit-radial-gradient(center, ellipse cover, #ffffff 0%,#ffffff 40%,#39b3d7 41%,#39b3d7 100%); /* Chrome10+,Safari5.1+ */
  16. background: -o-radial-gradient(center, ellipse cover, #ffffff 0%,#ffffff 40%,#39b3d7 41%,#39b3d7 100%); /* Opera 12+ */
  17. background: -ms-radial-gradient(center, ellipse cover, #ffffff 0%,#ffffff 40%,#39b3d7 41%,#39b3d7 100%); /* IE10+ */
  18. background: radial-gradient(ellipse at center, #ffffff 0%,#ffffff 40%,#39b3d7 41%,#39b3d7 100%); /* W3C */
  19. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#39b3d7',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
  20. }
  21. }
  22. }
  23. /* for keyboard tabbing */
  24. &:hover ~ label, &:active ~ label, &:focus ~ label {
  25. &:before {
  26. outline-color: rgba(91, 157, 217, 0.7);
  27. outline-offset: -4px;
  28. outline-style: auto;
  29. outline-width: 6px;
  30. }
  31. }
  32. /* for keyboard tabbing */
  33. &:active:hover ~ label, &:focus:hover ~ label, &:focus:hover ~ label, &:checked:hover ~ label {
  34. &:before {
  35. outline-color: none;
  36. outline-offset: 0;
  37. outline-style: none;
  38. outline-width: 0;
  39. cursor: default;
  40. }
  41. &, &:hover {
  42. color: @text-color;
  43. cursor: default;
  44. }
  45. }
  46. }
  47. }