forms.styl 12 KB

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