form.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. @import "vars";
  2. @import "mixins";
  3. .input-row {
  4. display: table !important;
  5. width: 100%;
  6. table-layout: fixed;
  7. > div {
  8. display: table-cell !important;
  9. border-right: 2px solid rgba(0,0,0,0.025);
  10. &:first-child{}
  11. &:last-child{ border: none;}
  12. }
  13. }
  14. input:invalid {
  15. box-shadow: none;
  16. }
  17. .error-note {
  18. position: absolute;
  19. top: 0;
  20. right: 0;
  21. line-height: 1;
  22. font-size: 10px;
  23. margin: 12px;
  24. color: red;
  25. margin-right: 25px;
  26. opacity: 0.7;
  27. font-weight: bold;
  28. text-transform: uppercase;
  29. }
  30. input[type=number]::-webkit-inner-spin-button,
  31. input[type=number]::-webkit-outer-spin-button {
  32. -webkit-appearance: none;
  33. margin: 0;
  34. width: 0 !important;
  35. }
  36. select {
  37. height: 40px !important;
  38. }
  39. .input {
  40. text-rendering: optimizeLegibility;
  41. @include user-select(text);
  42. display: inline-block;
  43. width: 100%;
  44. outline: none;
  45. border: none;
  46. border-radius: $radius;
  47. // padding-left: 20px;
  48. padding: 0 1em ;
  49. margin: 0px;
  50. max-width: 100%;
  51. vertical-align: middle;
  52. font-weight: 300;
  53. font-family: $main-font;
  54. font-size: $font-size;
  55. line-height: normal;
  56. //line-height: 60px;
  57. color: $dark;
  58. background-color: rgba(0,0,0,0.01);
  59. border: 1px solid rgba(0,0,0,0.1);
  60. height: 60px;
  61. text-align: left;
  62. &.input-single-line {
  63. width: 100%;
  64. line-height: 1;
  65. overflow: hidden;
  66. text-overflow: ellipsis;
  67. white-space: nowrap;
  68. }
  69. &.input-darken {
  70. background-color: rgba(0,0,0,0.05) !important;
  71. }
  72. &.input-round {
  73. border-radius: 70px !important;
  74. }
  75. &.input-nude {
  76. padding: 0px !important;
  77. background-color: transparent !important;
  78. border: none !important;
  79. }
  80. &.input-block {
  81. width: 100%;
  82. display: block;
  83. }
  84. &.input-md {
  85. height: 44px;
  86. line-height: 44px;
  87. font-size: 15px !important;
  88. padding-left: 12px;
  89. }
  90. &.input-sm {
  91. height: 44px;
  92. line-height: 44px;
  93. font-size: 16px;
  94. }
  95. &.text-center {text-align: center !important; padding: 0px !important;}
  96. &.text-right {text-align: right !important; padding-right: 20px !important; padding-left: 0 !important;}
  97. &.input-white {
  98. background-color: white;
  99. color: $medium;
  100. box-shadow: inset 0 0 1px 1px rgba(0, 0, 0, 0.05), inset 0 0px 4px rgba(0, 0, 0, 0.1);
  101. }
  102. &.input-light {
  103. background-color: $light;
  104. color: $medium;
  105. }
  106. &.input-dark {
  107. background-color: $darker;
  108. color: $medium;
  109. }
  110. &.input-lighten {
  111. background-color: rgba(255,255,255,0.05);
  112. color: $medium !important;
  113. }
  114. &.input-darken {
  115. background-color: rgba(0,0,0,0.05);
  116. color: $medium;
  117. }
  118. &.input-transparent {
  119. background-color: transparent;
  120. color: $medium;
  121. }
  122. // &:focus {color: white; }
  123. &:invalid {
  124. // background-color: rgba(198,101,84,0.05);
  125. // color: rgba(198,101,84,0.75)
  126. &:after {
  127. }
  128. }
  129. @include input-focus();
  130. @include placeholder();
  131. &[disabled],
  132. &[readonly],
  133. fieldset[disabled] & {
  134. // cursor: not-allowed;
  135. cursor: default;
  136. // background-color: rgba(255,255,255,0.02);
  137. // color: #555;
  138. opacity: 1; // iOS fix for unreadable disabled content
  139. }
  140. }
  141. input[type=text],
  142. span.input{ cursor: text !important;}
  143. input[type=number],
  144. input[type=number]:hover {
  145. -webkit-appearance: none !important;
  146. -moz-appearance: textfield !important;
  147. box-shadow:none;
  148. &::-webkit-inner-spin-button {
  149. -webkit-appearance: none;
  150. cursor:pointer;
  151. display:block;
  152. width:8px;
  153. color: #333;
  154. text-align:center;
  155. position:relative;
  156. }
  157. }
  158. textarea.input {
  159. resize: none;
  160. padding: 15px 20px;
  161. overflow: auto;
  162. min-height: 120px;
  163. line-height: 30px !important;
  164. }
  165. .tab-switch {
  166. display: block;
  167. position: relative;
  168. width: 100%;
  169. @include clearfix;
  170. background-color: rgba(0,0,0,0.025);
  171. border-radius: $radius*2;
  172. cursor: pointer;
  173. box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.025);
  174. border: 2px solid rgba(0, 0, 0, 0.025);
  175. &.round {
  176. border-radius: 100px;
  177. .option-highlight {
  178. border-top-left-radius: 100px;
  179. border-bottom-left-radius: 100px;
  180. }
  181. &.option-2 .option-highlight {
  182. border-top-left-radius: $radius*2;
  183. border-bottom-left-radius: $radius*2;
  184. border-top-right-radius: 100px;
  185. border-bottom-right-radius: 100px;
  186. }
  187. &.options-3 {
  188. .option-highlight {
  189. border-top-left-radius: 100px;
  190. border-bottom-left-radius: 100px;
  191. }
  192. &.option-2 .option-highlight {
  193. border-top-left-radius: $radius*2;
  194. border-bottom-left-radius: $radius*2;
  195. border-top-right-radius: $radius*2;
  196. border-bottom-right-radius: $radius*2;
  197. }
  198. &.option-3 .option-highlight {
  199. border-top-left-radius: $radius*2;
  200. border-bottom-left-radius: $radius*2;
  201. border-top-right-radius: 100px;
  202. border-bottom-right-radius: 100px;
  203. }
  204. }
  205. }
  206. &.options-3 {
  207. .option-highlight,
  208. .option {width: 33.333%; }
  209. &.option-2 .option-highlight {left: 33.333%; }
  210. &.option-3 .option-highlight {left: 66.666%; }
  211. }
  212. &.option-2 .option-highlight {
  213. left: 50%;
  214. }
  215. .options {
  216. display: block;
  217. }
  218. .option {
  219. &:first-child {border-left: none !important;}
  220. &:last-child {border-right: none !important;}
  221. display: block;
  222. width: 50%;
  223. float: left;
  224. height: 44px;
  225. line-height: 44px;
  226. border-radius: $radius;
  227. text-align: center;
  228. z-index: 10;
  229. position: relative;
  230. font-size: 13px;
  231. text-transform: capitalize;
  232. border-right: 1px solid rgba(0, 0, 0, 0.025);
  233. border-left: 1px solid rgba(0, 0, 0, 0.025);
  234. color: $dark;
  235. &:hover {color: $darker; }
  236. }
  237. .option-highlight {
  238. height: 44px;
  239. width: 50%;
  240. left: 0;
  241. @include transition(all 0.1s ease-in-out);
  242. position: absolute;
  243. background-color: white;
  244. z-index: 0;
  245. border-radius: $radius*2;
  246. border: 4px solid transparent;
  247. background-clip: content-box;
  248. }
  249. }
  250. .input-switch {
  251. border-radius: 60px;
  252. height: 44px;
  253. line-height: 44px;
  254. display: inline-block;
  255. width: 75px;
  256. overflow: hidden;
  257. background-color: rgba(0,0,0,0.05);
  258. position: relative;
  259. cursor: pointer;
  260. background-clip: content-box;
  261. border: 7px solid transparent;
  262. margin-top: -7px;
  263. margin-bottom: -7px;
  264. margin-right: -7px;
  265. .input-switch-slide {
  266. height: 30px;
  267. line-height: 30px;
  268. white-space: nowrap;
  269. font-size: 0;
  270. width: 44*3px;
  271. }
  272. &.on {
  273. > .input-switch-slide {
  274. margin-left: -30px;
  275. background-color: $green;
  276. }
  277. }
  278. span {
  279. display: inline-block;
  280. float: left;
  281. line-height: 30px;
  282. margin-left: 0px;
  283. height: 30px;
  284. width: 44*2px;
  285. vertical-align: middle;
  286. text-align: center;
  287. @include transition(all 0.1s ease-in-out);
  288. &.off { text-align: right; padding-right: 4px;}
  289. &.on { text-align: left; padding-left: 4px; color: white; }
  290. &.off,
  291. &.on {
  292. @include transition(all 0.1s ease-in-out);
  293. font-size: 12px;
  294. font-weight: bold;
  295. width: 30px;
  296. }
  297. &.handle {
  298. width: 30px;
  299. background-color: white;
  300. border-radius: 100%;
  301. background-clip: content-box;
  302. border: 5px solid transparent;
  303. z-index: 10;
  304. @include transition(all 0.1s ease-in-out);
  305. }
  306. }
  307. }
  308. /*
  309. .editable,
  310. [contentEditable=true] {
  311. cursor: text;
  312. }
  313. */
  314. .input-focus-dark {
  315. &:empty:focus{color: $darker !important; }
  316. &:focus{color: $darker !important; }
  317. }
  318. .input-prefix {
  319. line-height: 60px;
  320. &:before {
  321. content:attr(data-placeholder);
  322. color: $medium;
  323. text-transform: capitalize;
  324. opacity: 0.5;
  325. }
  326. &:after {
  327. content: ".";
  328. opacity: 0;
  329. }
  330. }
  331. .input.input-transitional {
  332. line-height: 1.7 !important;
  333. display: block;
  334. height: auto !important;
  335. font-size: 15px !important;
  336. // max-width: 200px;
  337. min-height: 60px;
  338. padding: 8px 20px;
  339. padding-top: 12px;
  340. position: relative;
  341. text-align: left;
  342. height: auto;
  343. @include transition( all 0.1s ease-in-out);
  344. &.input-lg {
  345. font-size: 20px !important;
  346. }
  347. &:before {
  348. @include transform-origin(top left);
  349. -webkit-transform: scale(1);
  350. -ms-transform: scale(1);
  351. transform: scale(1);
  352. content:attr(data-placeholder);
  353. @include transition( all 0.1s ease-in-out);
  354. left: 0;
  355. top: 0;
  356. position: absolute;
  357. height: 60px;
  358. line-height: 60px;
  359. font-size: 15px;
  360. padding: 0 20px;
  361. margin-top: 0px;
  362. color: $medium;
  363. text-transform: capitalize;
  364. }
  365. // &:empty:not(:focus):before{opacity: 0.5; }
  366. &:empty:focus:before{
  367. opacity: 1;
  368. color: $darker !important;
  369. }
  370. &:empty {padding-top: 20px; }
  371. &:not(:empty) {padding-top: 25px; }
  372. &:not(:empty):before {
  373. opacity: 1;
  374. height: 35px;
  375. line-height: 35px;
  376. font-size: 11px;
  377. }
  378. }
  379. .editable:empty:before,
  380. [data-placeholder][contentEditable=true]:empty:not(:focus):before{
  381. content:attr(data-placeholder);
  382. opacity: 0.6;
  383. }
  384. [data-placeholder][contentEditable=true]:empty:focus:before{
  385. content:attr(data-placeholder);
  386. opacity: 0.6;
  387. }
  388. form {
  389. @include clearfix();
  390. .alert {
  391. margin-top: 10px;
  392. text-align: center !important;
  393. }
  394. }
  395. .form-set {
  396. .form-group {
  397. padding: 25px;
  398. border-bottom: 2px solid rgba(0,0,0,0.05);
  399. margin: 0;
  400. }
  401. }
  402. .labels-inline .form-group {
  403. display: table !important;
  404. width: 100%;
  405. margin-bottom: 15px;
  406. > .input-wrapper,
  407. > .input,
  408. > .label {
  409. display: table-cell !important;
  410. &:first-child{
  411. width: 130px;
  412. vertical-align: top;
  413. padding-top: 5px;
  414. }
  415. &:last-child{
  416. width: 100%;
  417. }
  418. }
  419. }
  420. .inverted {
  421. a {color: $blue-lighter; cursor: pointer;
  422. &:hover {color: $light; }
  423. }
  424. .label {color: $light; }
  425. .input {color: $light; border-color: $blue-light;
  426. @include placeholder_inverted();
  427. }
  428. .btn-link {color: $light !important; }
  429. }
  430. .fieldset {
  431. padding: 20px 30px;
  432. padding-bottom: 30px;
  433. background-color: rgba(255,255,255,0.04);
  434. margin-bottom: 30px;
  435. }
  436. .form-group {
  437. @include clearfix();
  438. display: block;
  439. margin-bottom: 30px;
  440. position: relative;
  441. &:last-child {margin-bottom: 0px; }
  442. small {
  443. float: left;
  444. width: 100%;
  445. display: block;
  446. margin-top: 5px;
  447. color: #444;
  448. margin-bottom: -20px;
  449. }
  450. &.tight {
  451. margin-bottom: 5px;
  452. }
  453. .flag {
  454. // position: absolute;
  455. // display: block;
  456. // left: 0;
  457. // top: 50%;
  458. // height: 30px;
  459. // width: 30px;
  460. // margin-top: -15px;
  461. // border-radius: 100%;
  462. background-size: cover;
  463. background-position: center;
  464. &.england { background-image: url('../images/flags/england.svg');}
  465. &.italy { background-image: url('../images/flags/italy.svg');}
  466. &.germany { background-image: url('../images/flags/germany.svg');}
  467. &.france { background-image: url('../images/flags/france.svg');}
  468. &.spain { background-image: url('../images/flags/spain.svg');}
  469. }
  470. }
  471. .tight .form-group {
  472. margin: 0px;
  473. padding: 0px;
  474. &:first-child {
  475. > .input{
  476. border-top-left-radius: $radius;
  477. border-top-right-radius: $radius;
  478. }
  479. }
  480. &:last-child {
  481. margin-bottom: 30px;
  482. > .input{
  483. border-bottom-left-radius: $radius;
  484. border-bottom-right-radius: $radius;
  485. }
  486. }
  487. & + .form-group {
  488. > .input{
  489. border-top: 0px !important;
  490. }
  491. }
  492. > .input{
  493. border-radius: 0px;
  494. }
  495. }
  496. .label {
  497. margin-bottom: 10px;
  498. display: block;
  499. font-size: 13px;
  500. line-height: 1;
  501. color: $dark;
  502. font-family: $main-font;
  503. width: 100%;
  504. white-space: nowrap;
  505. &.label-sm {
  506. font-size: 12px;
  507. // text-transform: uppercase;
  508. // letter-spacing: 0.05em;
  509. text-align: center;
  510. }
  511. &.label-range {
  512. margin-bottom: -13px !important;
  513. font-size: 11px;
  514. text-align: left;
  515. }
  516. }
  517. .message {
  518. display: block;
  519. font-size: 13px;
  520. margin-top: 5px;
  521. opacity: 0.5;
  522. }
  523. .input-unit {
  524. width: 44px;
  525. text-align: center;
  526. display: inline-block;
  527. line-height: 60px;
  528. height: 60px;
  529. font-size: 12px;
  530. opacity: 0.5;
  531. text-transform: uppercase;
  532. color: $medium;
  533. vertical-align: middle;
  534. position: absolute;
  535. right: 0;
  536. bottom: 0;
  537. }
  538. .input-drag {
  539. vertical-align: middle;
  540. position: absolute !important;
  541. left: 0;
  542. bottom: 0;
  543. // opacity: 0.5;
  544. width: 44px;
  545. min-width: 44px !important;
  546. z-index: 100;
  547. color: #c7c7c7;
  548. cursor: ns-resize !important;
  549. &.btn-md {
  550. width: 44px;
  551. min-width: 44px !important;
  552. }
  553. .icon {
  554. width: 44px;
  555. &:after,
  556. &:before {
  557. width: 44px;
  558. }
  559. }
  560. &:active {opacity: 1; }
  561. * {
  562. pointer-events: none;
  563. }
  564. }
  565. .input-overlay-wrapper{
  566. position: relative;
  567. .input-overlay {
  568. display: block;
  569. width: 100%;
  570. padding-left: 20px;
  571. max-width: 100%;
  572. font-weight: 300;
  573. font-family: $main-font;
  574. font-size: 22px;
  575. line-height: 60px;
  576. color: $medium;
  577. height: 60px;
  578. position: absolute;
  579. bottom: 0;
  580. left: 0;
  581. pointer-events: none;
  582. opacity: 0.25;
  583. }
  584. #user-slug{padding-left: 183px; }
  585. }
  586. // .form-group {
  587. // .input {
  588. // &:first-child {
  589. // border-top-left-radius: $radius;
  590. // border-top-right-radius: $radius;
  591. // }
  592. // &:last-child {
  593. // border-bottom-left-radius: $radius;
  594. // border-bottom-right-radius: $radius;
  595. // }
  596. // &:first-child:last-child {
  597. // border-radius: $radius;
  598. // }
  599. // &:not(:last-child) {
  600. // border-bottom: none;
  601. // }
  602. // border-radius: 0;
  603. // }
  604. // }