forms.styl 12 KB

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