idealradiocheck.styl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // Ideal Radio & Check
  2. //---------------------------------------
  3. form.idealforms
  4. .ideal-radiocheck-label
  5. display: inline-block
  6. padding: .25em 0 !important
  7. cursor: pointer
  8. if group-horizontal
  9. margin: .15em 10px !important
  10. input
  11. float: left
  12. if radiocheck-sprite
  13. .ideal-check, .ideal-radio
  14. float: left
  15. margin-right: 10px !important
  16. width: 20px
  17. height: 20px
  18. background: url(../img/radiocheck.png) 0 0
  19. .ideal-check.focus
  20. background-position: -20px 0
  21. .ideal-check.checked
  22. background-position: -40px 0
  23. .ideal-check.checked.focus
  24. background-position: -60px 0
  25. .ideal-radio
  26. background-position: 0 bottom
  27. .ideal-radio.focus
  28. background-position: -20px bottom
  29. .ideal-radio.checked
  30. background-position: -40px bottom
  31. .ideal-radio.checked.focus
  32. background-position: -60px bottom
  33. else
  34. .ideal-check, .ideal-radio
  35. position: relative
  36. float: left
  37. margin-right: 10px !important
  38. width: radiocheck-size
  39. height: radiocheck-size
  40. background: linear-gradient(white, #eee)
  41. border: 1px solid #aaa
  42. border-radius: 4px
  43. box-shadow: 0 1px 1px rgba(black, .2)
  44. &:after
  45. display: none
  46. .ideal-radio
  47. border-radius: 18px
  48. .ideal-check.focus, .ideal-radio.focus
  49. border-color: valid
  50. box-shadow: 0 1px 1px rgba(black, .2), 0 0 3px rgba(valid, .75)
  51. .ideal-check:after, .ideal-radio:after
  52. content: "×"
  53. font-family: Arial, sans-serif
  54. position: absolute
  55. left: 50%
  56. width: radiocheck-size
  57. margin-left: -(radiocheck-size/2)
  58. line-height: radiocheck-size
  59. text-align: center
  60. font-size: radiocheck-size
  61. color: #888
  62. text-shadow: 1px 1px 0 white
  63. .ideal-radio:after
  64. size = (radiocheck-size/4)
  65. content: ""
  66. height: size
  67. width: size
  68. top: 50%
  69. left: 50%
  70. margin-top: -(size/2)
  71. margin-left: -(size/2)
  72. border-radius: size
  73. background: #888
  74. .ideal-check.checked
  75. .ideal-check.checked.focus
  76. .ideal-radio.checked
  77. .ideal-radio.checked.focus
  78. &:after
  79. display: block