materialize.css 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. /*!
  2. * Materialize v0.97.7 (http://materializecss.com)
  3. * Copyright 2014-2015 Materialize
  4. * MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
  5. */
  6. /* Radio Buttons
  7. ========================================================================== */
  8. [type="radio"]:not(:checked),
  9. [type="radio"]:checked {
  10. position: absolute;
  11. left: -9999px;
  12. opacity: 0;
  13. }
  14. [type="radio"]:not(:checked) + label,
  15. [type="radio"]:checked + label {
  16. position: relative;
  17. padding-left: 35px;
  18. cursor: pointer;
  19. display: inline-block;
  20. height: 25px;
  21. line-height: 25px;
  22. font-size: 1rem;
  23. transition: .28s ease;
  24. /* webkit (konqueror) browsers */
  25. -webkit-user-select: none;
  26. -moz-user-select: none;
  27. -ms-user-select: none;
  28. user-select: none;
  29. }
  30. [type="radio"] + label:before,
  31. [type="radio"] + label:after {
  32. content: '';
  33. position: absolute;
  34. left: 0;
  35. top: 0;
  36. margin: 4px;
  37. width: 16px;
  38. height: 16px;
  39. z-index: 0;
  40. transition: .28s ease;
  41. }
  42. /* Unchecked styles */
  43. [type="radio"]:not(:checked) + label:before,
  44. [type="radio"]:not(:checked) + label:after,
  45. [type="radio"]:checked + label:before,
  46. [type="radio"]:checked + label:after,
  47. [type="radio"].with-gap:checked + label:before,
  48. [type="radio"].with-gap:checked + label:after {
  49. border-radius: 50%;
  50. }
  51. [type="radio"]:not(:checked) + label:before,
  52. [type="radio"]:not(:checked) + label:after {
  53. border: 2px solid #5a5a5a;
  54. }
  55. [type="radio"]:not(:checked) + label:after {
  56. z-index: -1;
  57. -webkit-transform: scale(0);
  58. transform: scale(0);
  59. }
  60. /* Checked styles */
  61. [type="radio"]:checked + label:before {
  62. border: 2px solid transparent;
  63. }
  64. [type="radio"]:checked + label:after,
  65. [type="radio"].with-gap:checked + label:before,
  66. [type="radio"].with-gap:checked + label:after {
  67. border: 2px solid #26a69a;
  68. }
  69. [type="radio"]:checked + label:after,
  70. [type="radio"].with-gap:checked + label:after {
  71. background-color: #26a69a;
  72. z-index: 0;
  73. }
  74. [type="radio"]:checked + label:after {
  75. -webkit-transform: scale(1.02);
  76. transform: scale(1.02);
  77. }
  78. /* Radio With gap */
  79. [type="radio"].with-gap:checked + label:after {
  80. -webkit-transform: scale(0.5);
  81. transform: scale(0.5);
  82. }
  83. /* Focused styles */
  84. [type="radio"].tabbed:focus + label:before {
  85. box-shadow: 0 0 0 10px rgba(0, 0, 0, 0.1);
  86. }
  87. /* Disabled Radio With gap */
  88. [type="radio"].with-gap:disabled:checked + label:before {
  89. border: 2px solid rgba(0, 0, 0, 0.26);
  90. }
  91. [type="radio"].with-gap:disabled:checked + label:after {
  92. border: none;
  93. background-color: rgba(0, 0, 0, 0.26);
  94. }
  95. /* Disabled style */
  96. [type="radio"]:disabled:not(:checked) + label:before,
  97. [type="radio"]:disabled:checked + label:before {
  98. background-color: transparent;
  99. border-color: rgba(0, 0, 0, 0.26);
  100. }
  101. [type="radio"]:disabled + label {
  102. color: rgba(0, 0, 0, 0.26);
  103. }
  104. [type="radio"]:disabled:not(:checked) + label:before {
  105. border-color: rgba(0, 0, 0, 0.26);
  106. }
  107. [type="radio"]:disabled:checked + label:after {
  108. background-color: rgba(0, 0, 0, 0.26);
  109. border-color: #BDBDBD;
  110. }
  111. /* Checkboxes
  112. ========================================================================== */
  113. /* CUSTOM CSS CHECKBOXES */
  114. form p {
  115. margin-bottom: 10px;
  116. text-align: left;
  117. }
  118. form p:last-child {
  119. margin-bottom: 0;
  120. }
  121. /* Remove default checkbox */
  122. [type="checkbox"]:not(:checked),
  123. [type="checkbox"]:checked {
  124. position: absolute;
  125. left: -9999px;
  126. opacity: 0;
  127. }
  128. [type="checkbox"] {
  129. /* checkbox aspect */
  130. }
  131. [type="checkbox"] + label {
  132. position: relative;
  133. padding-left: 35px;
  134. cursor: pointer;
  135. display: inline-block;
  136. height: 25px;
  137. line-height: 25px;
  138. font-size: 1rem;
  139. -webkit-user-select: none;
  140. /* webkit (safari, chrome) browsers */
  141. -moz-user-select: none;
  142. /* mozilla browsers */
  143. -khtml-user-select: none;
  144. /* webkit (konqueror) browsers */
  145. -ms-user-select: none;
  146. /* IE10+ */
  147. }
  148. [type="checkbox"] + label:before,
  149. [type="checkbox"]:not(.filled-in) + label:after {
  150. content: '';
  151. position: absolute;
  152. top: 0;
  153. left: 0;
  154. width: 18px;
  155. height: 18px;
  156. z-index: 0;
  157. border: 2px solid #5a5a5a;
  158. border-radius: 1px;
  159. margin-top: 2px;
  160. transition: .2s;
  161. }
  162. [type="checkbox"]:not(.filled-in) + label:after {
  163. border: 0;
  164. -webkit-transform: scale(0);
  165. transform: scale(0);
  166. }
  167. [type="checkbox"]:not(:checked):disabled + label:before {
  168. border: none;
  169. background-color: rgba(0, 0, 0, 0.26);
  170. }
  171. [type="checkbox"].tabbed:focus + label:after {
  172. -webkit-transform: scale(1);
  173. transform: scale(1);
  174. border: 0;
  175. border-radius: 50%;
  176. box-shadow: 0 0 0 10px rgba(0, 0, 0, 0.1);
  177. background-color: rgba(0, 0, 0, 0.1);
  178. }
  179. [type="checkbox"]:checked + label:before {
  180. top: -4px;
  181. left: -5px;
  182. width: 12px;
  183. height: 22px;
  184. border-top: 2px solid transparent;
  185. border-left: 2px solid transparent;
  186. border-right: 2px solid #26a69a;
  187. border-bottom: 2px solid #26a69a;
  188. -webkit-transform: rotate(40deg);
  189. transform: rotate(40deg);
  190. -webkit-backface-visibility: hidden;
  191. backface-visibility: hidden;
  192. -webkit-transform-origin: 100% 100%;
  193. transform-origin: 100% 100%;
  194. }
  195. [type="checkbox"]:checked:disabled + label:before {
  196. border-right: 2px solid rgba(0, 0, 0, 0.26);
  197. border-bottom: 2px solid rgba(0, 0, 0, 0.26);
  198. }
  199. /* Indeterminate checkbox */
  200. [type="checkbox"]:indeterminate + label:before {
  201. top: -11px;
  202. left: -12px;
  203. width: 10px;
  204. height: 22px;
  205. border-top: none;
  206. border-left: none;
  207. border-right: 2px solid #26a69a;
  208. border-bottom: none;
  209. -webkit-transform: rotate(90deg);
  210. transform: rotate(90deg);
  211. -webkit-backface-visibility: hidden;
  212. backface-visibility: hidden;
  213. -webkit-transform-origin: 100% 100%;
  214. transform-origin: 100% 100%;
  215. }
  216. [type="checkbox"]:indeterminate:disabled + label:before {
  217. border-right: 2px solid rgba(0, 0, 0, 0.26);
  218. background-color: transparent;
  219. }
  220. [type="checkbox"].filled-in + label:after {
  221. border-radius: 2px;
  222. }
  223. [type="checkbox"].filled-in + label:before,
  224. [type="checkbox"].filled-in + label:after {
  225. content: '';
  226. left: 0;
  227. position: absolute;
  228. /* .1s delay is for check animation */
  229. transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s;
  230. z-index: 1;
  231. }
  232. [type="checkbox"].filled-in:not(:checked) + label:before {
  233. width: 0;
  234. height: 0;
  235. border: 3px solid transparent;
  236. left: 6px;
  237. top: 10px;
  238. -webkit-transform: rotateZ(37deg);
  239. transform: rotateZ(37deg);
  240. -webkit-transform-origin: 20% 40%;
  241. transform-origin: 100% 100%;
  242. }
  243. [type="checkbox"].filled-in:not(:checked) + label:after {
  244. height: 20px;
  245. width: 20px;
  246. background-color: transparent;
  247. border: 2px solid #5a5a5a;
  248. top: 0px;
  249. z-index: 0;
  250. }
  251. [type="checkbox"].filled-in:checked + label:before {
  252. top: 0;
  253. left: 1px;
  254. width: 8px;
  255. height: 13px;
  256. border-top: 2px solid transparent;
  257. border-left: 2px solid transparent;
  258. border-right: 2px solid #fff;
  259. border-bottom: 2px solid #fff;
  260. -webkit-transform: rotateZ(37deg);
  261. transform: rotateZ(37deg);
  262. -webkit-transform-origin: 100% 100%;
  263. transform-origin: 100% 100%;
  264. }
  265. [type="checkbox"].filled-in:checked + label:after {
  266. top: 0;
  267. width: 20px;
  268. height: 20px;
  269. border: 2px solid #26a69a;
  270. background-color: #26a69a;
  271. z-index: 0;
  272. }
  273. [type="checkbox"].filled-in.tabbed:focus + label:after {
  274. border-radius: 2px;
  275. border-color: #5a5a5a;
  276. background-color: rgba(0, 0, 0, 0.1);
  277. }
  278. [type="checkbox"].filled-in.tabbed:checked:focus + label:after {
  279. border-radius: 2px;
  280. background-color: #26a69a;
  281. border-color: #26a69a;
  282. }
  283. [type="checkbox"].filled-in:disabled:not(:checked) + label:before {
  284. background-color: transparent;
  285. border: 2px solid transparent;
  286. }
  287. [type="checkbox"].filled-in:disabled:not(:checked) + label:after {
  288. border-color: transparent;
  289. background-color: #BDBDBD;
  290. }
  291. [type="checkbox"].filled-in:disabled:checked + label:before {
  292. background-color: transparent;
  293. }
  294. [type="checkbox"].filled-in:disabled:checked + label:after {
  295. background-color: #BDBDBD;
  296. border-color: #BDBDBD;
  297. }
  298. /* Switch
  299. ========================================================================== */
  300. .switch,
  301. .switch * {
  302. -webkit-user-select: none;
  303. -moz-user-select: none;
  304. -khtml-user-select: none;
  305. -ms-user-select: none;
  306. }
  307. .switch label {
  308. cursor: pointer;
  309. }
  310. .switch label input[type=checkbox] {
  311. opacity: 0;
  312. width: 0;
  313. height: 0;
  314. }
  315. .switch label input[type=checkbox]:checked + .lever {
  316. background-color: #84c7c1;
  317. }
  318. .switch label input[type=checkbox]:checked + .lever:after {
  319. background-color: #26a69a;
  320. left: 24px;
  321. }
  322. .switch label .lever {
  323. content: "";
  324. display: inline-block;
  325. position: relative;
  326. width: 40px;
  327. height: 15px;
  328. background-color: #818181;
  329. border-radius: 15px;
  330. margin-right: 10px;
  331. transition: background 0.3s ease;
  332. vertical-align: middle;
  333. margin: 0 16px;
  334. }
  335. .switch label .lever:after {
  336. content: "";
  337. position: absolute;
  338. display: inline-block;
  339. width: 21px;
  340. height: 21px;
  341. background-color: #F1F1F1;
  342. border-radius: 21px;
  343. box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4);
  344. left: -5px;
  345. top: -3px;
  346. transition: left 0.3s ease, background .3s ease, box-shadow 0.1s ease;
  347. }
  348. input[type=checkbox]:checked:not(:disabled) ~ .lever:active::after,
  349. input[type=checkbox]:checked:not(:disabled).tabbed:focus ~ .lever::after {
  350. box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(38, 166, 154, 0.1);
  351. }
  352. input[type=checkbox]:not(:disabled) ~ .lever:active:after,
  353. input[type=checkbox]:not(:disabled).tabbed:focus ~ .lever::after {
  354. box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(0, 0, 0, 0.08);
  355. }
  356. .switch input[type=checkbox][disabled] + .lever {
  357. cursor: default;
  358. }
  359. .switch label input[type=checkbox][disabled] + .lever:after,
  360. .switch label input[type=checkbox][disabled]:checked + .lever:after {
  361. background-color: #BDBDBD;
  362. }