forms.styl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. @import 'nib'
  2. select,
  3. textarea,
  4. input:not([type=file]),
  5. button
  6. box-sizing: border-box
  7. background-color: #ebebeb
  8. border: 1px solid #ccc
  9. border-radius: 3px
  10. display: block
  11. margin-bottom: 12px
  12. min-height: 34px
  13. padding: 7px
  14. &.full
  15. width: 100%
  16. &.input-error
  17. background-color: #ece9e9
  18. border-color: #ba1212
  19. &:focus
  20. outline: 0
  21. input[type="file"]
  22. margin-bottom: 16px
  23. input[type="radio"]
  24. -webkit-appearance: radio
  25. min-height: inherit
  26. input[type="text"],
  27. input[type="password"],
  28. input[type="email"]
  29. transition: background 85ms ease-in,
  30. border-color 85ms ease-in
  31. width: 250px
  32. &.inline-input
  33. background: none
  34. border: 0
  35. margin: 0
  36. padding: 2px
  37. min-height: 0
  38. height: 18px
  39. width: 200px
  40. &.full-line
  41. width: 100%
  42. input[type="email"]:invalid
  43. box-shadow: none
  44. input[type="text"],
  45. input[type="password"],
  46. input[type="email"],
  47. textarea
  48. &:hover
  49. border-color: #999
  50. &.input-error
  51. border-color: #ba1212
  52. &:focus
  53. background: #fff
  54. border-color: #318ec4
  55. box-shadow: 0 0 2px #318ec4
  56. &.input-error
  57. background-color: #f8f7f7
  58. border-color: #ba1212
  59. box-shadow: 0 0 2px #d11515
  60. &:disabled
  61. background-color: #dcdcdc
  62. border-color: #bfbfbf
  63. color: #8c8c8c
  64. -webkit-touch-callout: none
  65. user-select: none
  66. select
  67. max-height: 300px
  68. width: 256px
  69. margin-bottom: 8px
  70. &.inline
  71. width: 100%
  72. option[disabled]
  73. color: #8c8c8c
  74. textarea
  75. height: 150px
  76. transition: background 85ms ease-in,
  77. border-color 85ms ease-in
  78. resize: vertical
  79. width: 100%
  80. &.editor
  81. resize: none
  82. padding-bottom: 22px
  83. .button
  84. border-radius: 3px
  85. text-decoration: none
  86. position: relative
  87. input[type="submit"],
  88. button
  89. background: #cfcfcf
  90. background: linear-gradient(#cfcfcf, #c2c2c2)
  91. border: none
  92. cursor: pointer
  93. display: inline-block
  94. font-weight: 700
  95. line-height: 22px
  96. padding: 7px 20px
  97. text-align: center
  98. .wide
  99. padding-left: 30px
  100. padding-right: 30px
  101. &:hover,
  102. &:focus
  103. background: #c2c2c2
  104. background: linear-gradient(#c2c2c2, #b5b5b5)
  105. &:active
  106. background: #b5b5b5
  107. background: linear-gradient(#b5b5b5, #a8a8a8)
  108. box-shadow: inset 0 3px 6px rgba(0, 0, 0, .1)
  109. &:hover,
  110. &:focus,
  111. &:active
  112. background: #e6e6e6
  113. background: linear-gradient(#e6e6e6, #e6e6e6)
  114. &.primary
  115. background: #005377
  116. box-shadow: 0 1px 0 #4d4d4d
  117. color: white
  118. &:hover,
  119. &:focus
  120. background: #004766
  121. &:active
  122. background: #01628C
  123. &.negate
  124. &:hover,
  125. &:focus
  126. background: #990f0f
  127. background: linear-gradient(#990f0f, #7d0c0c)
  128. box-shadow: 0 1px 0 #4d4d4d
  129. color: #fff
  130. &:active
  131. background: #7d0c0c
  132. box-shadow: 0 1px 0 #4d4d4d
  133. color: #fff
  134. i.fa
  135. margin-right: 10px
  136. input[type="submit"].disabled,
  137. input[type="submit"]:disabled,
  138. input[type="button"].disabled,
  139. button.disabled,
  140. .button.disabled
  141. &,
  142. &:hover,
  143. &:active
  144. background: #cfcfcf
  145. cursor: default
  146. box-shadow: none
  147. color: #a8a8a8
  148. fieldset
  149. border: 1px solid #bfbfbf
  150. padding: 15px
  151. margin-bottom: 15px
  152. input[type="hidden"]
  153. display: none
  154. .radio-div,
  155. .check-div
  156. display: block
  157. margin: 0 0 4px 20px
  158. min-height: 20px
  159. position: relative
  160. input
  161. left: -18px
  162. min-height: 0
  163. margin: 0
  164. padding: 0
  165. position: absolute
  166. top: 2px
  167. label
  168. font-weight: 400
  169. label
  170. display: block
  171. font-weight: 700
  172. margin-bottom: 4px
  173. &.form-error
  174. color: #ba1212
  175. input,
  176. textarea
  177. &::-webkit-input-placeholder,
  178. &::-moz-placeholder
  179. color: #8c8c8c
  180. .edit-controls,
  181. .add-controls
  182. display: flex
  183. align-items: center
  184. margin-top: 0px
  185. margin-bottom: 12px
  186. button[type=submit]
  187. input[type=button]
  188. float: left
  189. height: 32px
  190. margin-bottom: 0px
  191. .fa-times-thin
  192. font-size: 26px
  193. margin: 3px 10px
  194. // Material Design checkboxes
  195. [type="checkbox"]:not(:checked),
  196. [type="checkbox"]:checked
  197. position: absolute
  198. left: -9999px
  199. visibility: hidden
  200. display: none
  201. .materialCheckBox
  202. position: relative
  203. width: 13px
  204. height: @width
  205. z-index: 0
  206. border: 2px solid #5a5a5a
  207. border-radius: 1px
  208. transition: .2s
  209. margin: 0
  210. cursor: pointer
  211. &.is-checked
  212. top: -4px
  213. left: -3px
  214. width: 7px
  215. height: 15px
  216. margin-right: 6px
  217. border-top: 2px solid transparent
  218. border-left: 2px solid transparent
  219. transform: rotate(40deg)
  220. -webkit-backface-visibility: hidden
  221. transform-origin: 100% 100%
  222. .button-link
  223. background: #fff
  224. background: linear-gradient(#fff, #f5f5f5)
  225. border-radius: 3px
  226. box-sizing: border-box
  227. user-select: none
  228. border: 1px solid #e3e3e3
  229. border-bottom-color: #c2c2c2
  230. cursor: pointer
  231. display: block
  232. font-weight: 700
  233. height: 34px
  234. margin-top: 6px
  235. max-width: 300px
  236. padding: 7px
  237. position: relative
  238. text-decoration: none
  239. overflow: ellipsis
  240. .on
  241. background: #48b512
  242. background: linear-gradient(#48b512, #3d990f)
  243. border-radius: 3px
  244. color: #fff
  245. display: none
  246. font-size: 12px
  247. font-weight: 700
  248. height: 17px
  249. line-height: @height
  250. margin: 0
  251. padding: 2px 4px
  252. position: absolute
  253. right: 5px
  254. top: 5px
  255. text-align: center
  256. &.is-on
  257. padding-right: 30px
  258. max-width: 196px
  259. .on
  260. display: block
  261. &.inline
  262. color: #666
  263. padding: 2px 14px
  264. margin-left: 4px
  265. &.setting
  266. height: 52px
  267. float: left
  268. position: relative
  269. margin-top: 0
  270. &.disabled
  271. background: #fff
  272. border-color: #e9e9e9
  273. color: #8c8c8c
  274. cursor: default
  275. select
  276. display: none
  277. &:hover .label
  278. color: #8c8c8c
  279. &,
  280. &:hover,
  281. &:active,
  282. &.primary,
  283. &.primary:hover,
  284. &.primary:active
  285. background: #cfcfcf
  286. border-color: #c2c2c2
  287. border-bottom-color: #b5b5b5
  288. cursor: default
  289. box-shadow: none
  290. color: #a8a8a8
  291. .label
  292. color: #8c8c8c
  293. display: block
  294. font-size: 12px
  295. line-height: 14px
  296. margin-bottom: 0
  297. &:hover .label
  298. color: #eee
  299. .value
  300. display: block
  301. font-size: 18px
  302. line-height: 24px
  303. overflow: hidden
  304. text-overflow: ellipsis
  305. label
  306. display: none
  307. select
  308. border: none
  309. cursor: pointer
  310. height: 50px
  311. left: 0
  312. margin: 0
  313. opacity: 0
  314. position: absolute
  315. top: 0
  316. z-index: 2
  317. width: 100%
  318. &:hover
  319. background: #318ec4
  320. background: linear-gradient(#318ec4, #2b7cab)
  321. border-color: #2e85b8
  322. color: #fff
  323. .on
  324. background-image: none
  325. background-color: rgba(255, 255, 255, .3)
  326. border-color: transparent
  327. &:active
  328. background: #2e85b8
  329. background: linear-gradient(#2e85b8, #28739f)
  330. border-color: #2b7cab
  331. color: #fff
  332. .button-link.negate
  333. &:hover
  334. background: #990f0f
  335. background: linear-gradient(#990f0f, #7d0c0c)
  336. border-color: @background
  337. &:active
  338. background: #7d0c0c
  339. border-color: #990f0f
  340. &.primary
  341. background: #48b512
  342. background: linear-gradient(#48b512, #3d990f)
  343. border: 1px solid
  344. border-color: #3d990f
  345. color: #fff
  346. &:hover
  347. background: #3d990f
  348. background: linear-gradient(#3d990f, #327d0c)
  349. border-color: #3d990f
  350. &.danger
  351. background: #ba1212
  352. background: linear-gradient(#ba1212, #8b0e0e)
  353. border: 1px solid
  354. border-color: #a21010
  355. color: #fff
  356. &:hover
  357. background: #a21010
  358. background: linear-gradient(#a21010, #740b0b)
  359. border-color: #8b0e0e
  360. button
  361. &.quiet-button,
  362. &.loud-text-button
  363. background: none
  364. text-align: left
  365. line-height: normal
  366. border: none
  367. box-shadow: none
  368. &:active
  369. color: #4d4d4d
  370. background: #d3d3d3
  371. box-shadow: none
  372. &.quiet-button
  373. font-weight: 400
  374. text-decoration: underline
  375. &.loud-text-button
  376. width: 100%
  377. &:hover
  378. color: #111
  379. .emphasis-button,
  380. .quiet-button
  381. border-radius: 3px
  382. user-select: none
  383. color: #8c8c8c
  384. display: block
  385. margin: 2px 0
  386. padding: 6px 8px
  387. position: relative
  388. &.w-img
  389. padding-left: 28px
  390. &:hover
  391. color: #4d4d4d
  392. background: #dcdcdc
  393. &:active
  394. color: #4d4d4d
  395. background: #d3d3d3
  396. .quiet-button-large
  397. padding: 16px 24px
  398. .emphasis-button
  399. color: #74663e
  400. background: #ecdfbb
  401. &:hover
  402. color: #53492d
  403. background: #e7d6a7
  404. &:active
  405. color: #53492d
  406. background: #e1cc93
  407. .is-editable
  408. cursor: pointer
  409. .big-link
  410. border-radius: 3px
  411. display: block
  412. margin: 6px 0 6px 40px
  413. padding: 11px
  414. position: relative
  415. text-decoration: none
  416. font-size: 16px
  417. line-height: 20px
  418. .text
  419. text-decoration: underline
  420. &:hover
  421. background: #dcdcdc
  422. &.options
  423. padding-right: 41px
  424. .option
  425. height: 30px
  426. width: @height
  427. position: absolute
  428. right: 6px
  429. top: 6px
  430. &.none
  431. color: #8c8c8c
  432. text-decoration: none
  433. &:hover
  434. background: transparent
  435. &.avatar-changer
  436. padding-right: 51px
  437. .member
  438. border: 1px solid #ccc
  439. border-radius: 3px
  440. height: 40px
  441. width: @height
  442. position: absolute
  443. right: 0
  444. top: 0
  445. .member-avatar
  446. height: 40px
  447. width: @height
  448. .member-initials
  449. font-size: 16px
  450. height: 40px
  451. line-height: @height
  452. max-height: @height
  453. .show-more
  454. border-radius: 3px
  455. color: #8c8c8c
  456. display: block
  457. padding: 16px 8px 16px 40px
  458. margin: 8px 0
  459. &:hover
  460. background: #dcdcdc
  461. text-decoration: underline
  462. &.compact
  463. padding: 12px 8px
  464. margin: 8px 0 0
  465. text-align: center
  466. .board-widget .show-more
  467. padding: 12px 8px 12px 40px
  468. .uploader
  469. clear: both
  470. cursor: pointer
  471. position: relative
  472. height: 34px
  473. width: 100%
  474. .realfile
  475. cursor: pointer
  476. height: 34px
  477. line-height: @height
  478. position: absolute
  479. top: 0
  480. left: 0
  481. width: 100%
  482. z-index: 2
  483. font-size: 23px
  484. input[type="file"]
  485. cursor: pointer
  486. height: 34px
  487. line-height: @height
  488. margin: 0
  489. opacity: 0
  490. padding: 0
  491. width: 100%
  492. z-index: 2
  493. font-size: 23px
  494. &:hover .fakefile
  495. background: #318ec4
  496. background: linear-gradient(#318ec4, #2b7cab)
  497. border-color: #2e85b8
  498. color: #fff
  499. .dropdown-menu
  500. border-radius: 2px
  501. overflow: hidden
  502. li
  503. border-top: none
  504. a
  505. padding: 4px 12px 4px 8px
  506. img
  507. width: 18px
  508. height: @width
  509. margin-right: 5px
  510. vertical-align: middle
  511. .minicard-label
  512. width: 11px
  513. height: @width
  514. border-radius: 2px
  515. margin: 2px 7px -2px -2px
  516. display: inline-block
  517. &.active
  518. background: #005377
  519. a, .quiet
  520. color: white
  521. // Material Design Toggle Switch
  522. .material-toggle-switch
  523. display: flex
  524. .toggle-label
  525. position: relative
  526. display: block
  527. height: 20px
  528. width: 44px
  529. background-color: #a6a6a6
  530. border-radius: 100px
  531. cursor: pointer
  532. transition: all 0.3s ease
  533. &:after
  534. position: absolute
  535. left: -2px
  536. top: -3px
  537. display: block
  538. width: 26px
  539. height: 26px
  540. border-radius: 100px
  541. background-color: #fff
  542. box-shadow: 0px 3px 3px rgba(0,0,0,0.05)
  543. content: ''
  544. transition: all 0.3s ease
  545. &:active
  546. &:after
  547. transform: scale(1.15, 0.85)
  548. .toggle-switch:checked ~ .toggle-label
  549. background-color: #6fbeb5
  550. &:after
  551. left: 20px
  552. background-color: #179588
  553. .toggle-switch:checked:disabled ~ .toggle-label
  554. background-color: #d5d5d5
  555. pointer-events: none
  556. &:after
  557. background-color: #bcbdbc
  558. .toggle-switch
  559. display: none
  560. .toggle-switch-title
  561. margin: 0 0.5em
  562. display: flex
  563. @media screen and (max-width: 800px)
  564. .edit-controls,
  565. .add-controls
  566. .fa-times-thin
  567. margin: 3px 20px