jquery-labelauty.css 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /*!
  2. * LABELAUTY jQuery Plugin Styles
  3. *
  4. * @file: jquery-labelauty.css
  5. * @author: Francisco Neves (@fntneves)
  6. * @site: www.francisconeves.com
  7. * @license: MIT License
  8. */
  9. /* Prevent text and blocks selection */
  10. input.labelauty + label ::selection { background-color: rgba(255, 255, 255, 0); }
  11. input.labelauty + label ::-moz-selection { background-color: rgba(255, 255, 255, 0); }
  12. /* Hide original checkboxes. They are ugly! */
  13. input.labelauty { display: none !important; }
  14. /*
  15. * Let's style the input
  16. * Feel free to work with it as you wish!
  17. */
  18. input.labelauty + label
  19. {
  20. display: inline-block;
  21. /*display: table;*/
  22. font-size: 14px;
  23. padding:20px 0;
  24. width: 100%;
  25. text-align: center;
  26. background-color: #efefef;
  27. color: #b3b3b3;
  28. cursor: pointer;
  29. border-radius: 3px 3px 3px 3px;
  30. -moz-border-radius: 3px 3px 3px 3px;
  31. -webkit-border-radius: 3px 3px 3px 3px;
  32. transition: background-color 0.25s;
  33. -moz-transition: background-color 0.25s;
  34. -webkit-transition: background-color 0.25s;
  35. -o-transition: background-color 0.25s;
  36. -moz-user-select: none;
  37. -khtml-user-select: none;
  38. -webkit-user-select: none;
  39. -o-user-select: none;
  40. }
  41. /* Stylish text inside label */
  42. input.labelauty + label > span.labelauty-unchecked,
  43. input.labelauty + label > span.labelauty-checked
  44. {
  45. display: inline-block;
  46. line-height: 16px;
  47. vertical-align: bottom;
  48. }
  49. /* Stylish icons inside label */
  50. input.labelauty + label > span.labelauty-unchecked-image,
  51. input.labelauty + label > span.labelauty-checked-image
  52. {
  53. display: inline-block;
  54. width: 16px;
  55. height: 16px;
  56. vertical-align: bottom;
  57. background-repeat: no-repeat;
  58. background-position: left center;
  59. transition: background-image 0.5s linear;
  60. -moz-transition: background-image 0.5s linear;
  61. -webkit-transition: background-image 0.5s linear;
  62. -o-transition: background-image 0.5s linear;
  63. }
  64. /* When there's a label, add a little margin to the left */
  65. input.labelauty + label > span.labelauty-unchecked-image + span.labelauty-unchecked,
  66. input.labelauty + label > span.labelauty-checked-image + span.labelauty-checked
  67. {
  68. margin-left: 7px;
  69. }
  70. /* When not Checked */
  71. input.labelauty:not(:checked):not([disabled]) + label:hover
  72. {
  73. background-color: #9e9e9e;
  74. color: #fff;
  75. }
  76. input.labelauty:not(:checked) + label > span.labelauty-checked-image
  77. {
  78. display: none;
  79. }
  80. input.labelauty:not(:checked) + label > span.labelauty-checked
  81. {
  82. display: none;
  83. }
  84. /* When Checked */
  85. input.labelauty:checked + label
  86. {
  87. background-color: #084F8E;
  88. color: #ffffff;
  89. }
  90. input.labelauty:checked:not([disabled]) + label:hover
  91. {
  92. background-color: #2677be;
  93. }
  94. input.labelauty:checked + label > span.labelauty-unchecked-image
  95. {
  96. display: none;
  97. }
  98. input.labelauty:checked + label > span.labelauty-unchecked
  99. {
  100. display: none;
  101. }
  102. input.labelauty:checked + label > span.labelauty-checked
  103. {
  104. display: inline-block;
  105. }
  106. input.labelauty.no-label:checked + label > span.labelauty-checked
  107. {
  108. display: block;
  109. }
  110. /* When Disabled */
  111. input.labelauty[disabled] + label
  112. {
  113. opacity: 0.5;
  114. }
  115. /* Add a background to (un)checked images */
  116. input.labelauty + label > span.labelauty-unchecked-image
  117. {
  118. background-image: url( ../images/input-unchecked.png );
  119. }
  120. input.labelauty + label > span.labelauty-checked-image
  121. {
  122. background-image: url( ../images/input-checked.png );
  123. }