forms.styl 12 KB

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