forms.styl 12 KB

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