You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

594 lines
9.5 KiB

  1. code {
  2. font-family: 'mastodon-font-monospace', monospace;
  3. font-weight: 400;
  4. }
  5. .form-container {
  6. max-width: 400px;
  7. padding: 20px;
  8. margin: 0 auto;
  9. }
  10. .simple_form {
  11. .input {
  12. margin-bottom: 15px;
  13. overflow: hidden;
  14. }
  15. .row {
  16. display: flex;
  17. margin: 0 -5px;
  18. .input {
  19. box-sizing: border-box;
  20. flex: 1 1 auto;
  21. width: 50%;
  22. padding: 0 5px;
  23. }
  24. }
  25. span.hint {
  26. display: block;
  27. color: $darker-text-color;
  28. font-size: 12px;
  29. margin-top: 4px;
  30. }
  31. p.hint {
  32. margin-bottom: 15px;
  33. color: $darker-text-color;
  34. &.subtle-hint {
  35. text-align: center;
  36. font-size: 12px;
  37. line-height: 18px;
  38. margin-top: 15px;
  39. margin-bottom: 0;
  40. color: $darker-text-color;
  41. a {
  42. color: $highlight-text-color;
  43. }
  44. }
  45. }
  46. .card {
  47. margin-bottom: 15px;
  48. }
  49. strong {
  50. font-weight: 500;
  51. @each $lang in $cjk-langs {
  52. &:lang(#{$lang}) {
  53. font-weight: 700;
  54. }
  55. }
  56. }
  57. .label_input {
  58. display: flex;
  59. label {
  60. flex: 0 0 auto;
  61. }
  62. input {
  63. flex: 1 1 auto;
  64. }
  65. }
  66. .input.with_label {
  67. padding: 15px 0;
  68. margin-bottom: 0;
  69. .label_input {
  70. flex-wrap: wrap;
  71. align-items: flex-start;
  72. }
  73. &.select .label_input {
  74. align-items: initial;
  75. }
  76. .label_input > label {
  77. font-family: inherit;
  78. font-size: 16px;
  79. color: $primary-text-color;
  80. display: block;
  81. padding-top: 5px;
  82. margin-bottom: 5px;
  83. flex: 1;
  84. min-width: 150px;
  85. word-wrap: break-word;
  86. &.select {
  87. flex: 0;
  88. }
  89. & ~ * {
  90. margin-left: 10px;
  91. }
  92. }
  93. ul {
  94. flex: 390px;
  95. }
  96. &.boolean {
  97. padding: initial;
  98. margin-bottom: initial;
  99. .label_input > label {
  100. font-family: inherit;
  101. font-size: 14px;
  102. color: $primary-text-color;
  103. display: block;
  104. width: auto;
  105. }
  106. label.checkbox {
  107. position: relative;
  108. padding-left: 25px;
  109. flex: 1 1 auto;
  110. }
  111. }
  112. }
  113. .input.with_block_label {
  114. & > label {
  115. font-family: inherit;
  116. font-size: 16px;
  117. color: $primary-text-color;
  118. display: block;
  119. padding-top: 5px;
  120. }
  121. .hint {
  122. margin-bottom: 15px;
  123. }
  124. li {
  125. float: left;
  126. width: 50%;
  127. }
  128. }
  129. .fields-group {
  130. margin-bottom: 25px;
  131. }
  132. .input.radio_buttons .radio label {
  133. margin-bottom: 5px;
  134. font-family: inherit;
  135. font-size: 14px;
  136. color: $primary-text-color;
  137. display: block;
  138. width: auto;
  139. }
  140. .input.boolean {
  141. margin-bottom: 5px;
  142. label {
  143. font-family: inherit;
  144. font-size: 14px;
  145. color: $primary-text-color;
  146. display: block;
  147. width: auto;
  148. }
  149. label.checkbox {
  150. position: relative;
  151. padding-left: 25px;
  152. flex: 1 1 auto;
  153. }
  154. input[type=checkbox] {
  155. position: absolute;
  156. left: 0;
  157. top: 5px;
  158. margin: 0;
  159. }
  160. .hint {
  161. padding-left: 25px;
  162. margin-left: 0;
  163. }
  164. }
  165. .check_boxes {
  166. .checkbox {
  167. label {
  168. font-family: inherit;
  169. font-size: 14px;
  170. color: $primary-text-color;
  171. display: block;
  172. width: auto;
  173. position: relative;
  174. padding-top: 5px;
  175. padding-left: 25px;
  176. flex: 1 1 auto;
  177. }
  178. input[type=checkbox] {
  179. position: absolute;
  180. left: 0;
  181. top: 5px;
  182. margin: 0;
  183. }
  184. }
  185. }
  186. input[type=text],
  187. input[type=number],
  188. input[type=email],
  189. input[type=password],
  190. textarea {
  191. background: transparent;
  192. box-sizing: border-box;
  193. border: 0;
  194. border-bottom: 2px solid $ui-primary-color;
  195. border-radius: 2px 2px 0 0;
  196. padding: 7px 4px;
  197. font-size: 16px;
  198. color: $primary-text-color;
  199. display: block;
  200. width: 100%;
  201. outline: 0;
  202. font-family: inherit;
  203. resize: vertical;
  204. &:invalid {
  205. box-shadow: none;
  206. }
  207. &:focus:invalid {
  208. border-bottom-color: lighten($error-red, 12%);
  209. }
  210. &:required:valid {
  211. border-bottom-color: $valid-value-color;
  212. }
  213. &:active,
  214. &:focus {
  215. border-bottom-color: $highlight-text-color;
  216. background: rgba($base-overlay-background, 0.1);
  217. }
  218. }
  219. .input.field_with_errors {
  220. label {
  221. color: lighten($error-red, 12%);
  222. }
  223. input[type=text],
  224. input[type=email],
  225. input[type=password] {
  226. border-bottom-color: $valid-value-color;
  227. }
  228. .error {
  229. display: block;
  230. font-weight: 500;
  231. color: lighten($error-red, 12%);
  232. margin-top: 4px;
  233. }
  234. }
  235. .actions {
  236. margin-top: 30px;
  237. display: flex;
  238. &.actions--top {
  239. margin-top: 0;
  240. margin-bottom: 30px;
  241. }
  242. }
  243. button,
  244. .button,
  245. .block-button {
  246. display: block;
  247. width: 100%;
  248. border: 0;
  249. border-radius: 4px;
  250. background: $ui-highlight-color;
  251. color: $primary-text-color;
  252. font-size: 18px;
  253. line-height: inherit;
  254. height: auto;
  255. padding: 10px;
  256. text-transform: uppercase;
  257. text-decoration: none;
  258. text-align: center;
  259. box-sizing: border-box;
  260. cursor: pointer;
  261. font-weight: 500;
  262. outline: 0;
  263. margin-bottom: 10px;
  264. margin-right: 10px;
  265. &:last-child {
  266. margin-right: 0;
  267. }
  268. &:hover {
  269. background-color: lighten($ui-highlight-color, 5%);
  270. }
  271. &:active,
  272. &:focus {
  273. background-color: darken($ui-highlight-color, 5%);
  274. }
  275. &.negative {
  276. background: $error-value-color;
  277. &:hover {
  278. background-color: lighten($error-value-color, 5%);
  279. }
  280. &:active,
  281. &:focus {
  282. background-color: darken($error-value-color, 5%);
  283. }
  284. }
  285. }
  286. select {
  287. font-size: 16px;
  288. max-height: 29px;
  289. }
  290. .input-with-append {
  291. position: relative;
  292. .input input {
  293. padding-right: 127px;
  294. }
  295. .append {
  296. position: absolute;
  297. right: 0;
  298. top: 0;
  299. padding: 7px 4px;
  300. padding-bottom: 9px;
  301. font-size: 16px;
  302. color: $dark-text-color;
  303. font-family: inherit;
  304. pointer-events: none;
  305. cursor: default;
  306. }
  307. }
  308. }
  309. .flash-message {
  310. background: lighten($ui-base-color, 8%);
  311. color: $darker-text-color;
  312. border-radius: 4px;
  313. padding: 15px 10px;
  314. margin-bottom: 30px;
  315. box-shadow: 0 0 5px rgba($base-shadow-color, 0.2);
  316. text-align: center;
  317. p {
  318. margin-bottom: 15px;
  319. }
  320. .oauth-code {
  321. outline: 0;
  322. box-sizing: border-box;
  323. display: block;
  324. width: 100%;
  325. border: none;
  326. padding: 10px;
  327. font-family: 'mastodon-font-monospace', monospace;
  328. background: $ui-base-color;
  329. color: $primary-text-color;
  330. font-size: 14px;
  331. margin: 0;
  332. &::-moz-focus-inner {
  333. border: 0;
  334. }
  335. &::-moz-focus-inner,
  336. &:focus,
  337. &:active {
  338. outline: 0 !important;
  339. }
  340. &:focus {
  341. background: lighten($ui-base-color, 4%);
  342. }
  343. }
  344. strong {
  345. font-weight: 500;
  346. @each $lang in $cjk-langs {
  347. &:lang(#{$lang}) {
  348. font-weight: 700;
  349. }
  350. }
  351. }
  352. @media screen and (max-width: 740px) and (min-width: 441px) {
  353. margin-top: 40px;
  354. }
  355. }
  356. .form-footer {
  357. margin-top: 30px;
  358. text-align: center;
  359. a {
  360. color: $darker-text-color;
  361. text-decoration: none;
  362. &:hover {
  363. text-decoration: underline;
  364. }
  365. }
  366. }
  367. .oauth-prompt,
  368. .follow-prompt {
  369. margin-bottom: 30px;
  370. text-align: center;
  371. color: $darker-text-color;
  372. h2 {
  373. font-size: 16px;
  374. margin-bottom: 30px;
  375. }
  376. strong {
  377. color: $secondary-text-color;
  378. font-weight: 500;
  379. @each $lang in $cjk-langs {
  380. &:lang(#{$lang}) {
  381. font-weight: 700;
  382. }
  383. }
  384. }
  385. @media screen and (max-width: 740px) and (min-width: 441px) {
  386. margin-top: 40px;
  387. }
  388. }
  389. .qr-wrapper {
  390. display: flex;
  391. flex-wrap: wrap;
  392. align-items: flex-start;
  393. }
  394. .qr-code {
  395. flex: 0 0 auto;
  396. background: $simple-background-color;
  397. padding: 4px;
  398. margin: 0 10px 20px 0;
  399. box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
  400. display: inline-block;
  401. svg {
  402. display: block;
  403. margin: 0;
  404. }
  405. }
  406. .qr-alternative {
  407. margin-bottom: 20px;
  408. color: $secondary-text-color;
  409. flex: 150px;
  410. samp {
  411. display: block;
  412. font-size: 14px;
  413. }
  414. }
  415. .table-form {
  416. p {
  417. margin-bottom: 15px;
  418. strong {
  419. font-weight: 500;
  420. @each $lang in $cjk-langs {
  421. &:lang(#{$lang}) {
  422. font-weight: 700;
  423. }
  424. }
  425. }
  426. }
  427. }
  428. .simple_form,
  429. .table-form {
  430. .warning {
  431. box-sizing: border-box;
  432. background: rgba($error-value-color, 0.5);
  433. color: $primary-text-color;
  434. text-shadow: 1px 1px 0 rgba($base-shadow-color, 0.3);
  435. box-shadow: 0 2px 6px rgba($base-shadow-color, 0.4);
  436. border-radius: 4px;
  437. padding: 10px;
  438. margin-bottom: 15px;
  439. a {
  440. color: $primary-text-color;
  441. text-decoration: underline;
  442. &:hover,
  443. &:focus,
  444. &:active {
  445. text-decoration: none;
  446. }
  447. }
  448. strong {
  449. font-weight: 600;
  450. display: block;
  451. margin-bottom: 5px;
  452. @each $lang in $cjk-langs {
  453. &:lang(#{$lang}) {
  454. font-weight: 700;
  455. }
  456. }
  457. .fa {
  458. font-weight: 400;
  459. }
  460. }
  461. }
  462. }
  463. .action-pagination {
  464. display: flex;
  465. flex-wrap: wrap;
  466. align-items: center;
  467. .actions,
  468. .pagination {
  469. flex: 1 1 auto;
  470. }
  471. .actions {
  472. padding: 30px 0;
  473. padding-right: 20px;
  474. flex: 0 0 auto;
  475. }
  476. }
  477. .post-follow-actions {
  478. text-align: center;
  479. color: $darker-text-color;
  480. div {
  481. margin-bottom: 4px;
  482. }
  483. }
  484. .alternative-login {
  485. margin-top: 20px;
  486. margin-bottom: 20px;
  487. h4 {
  488. font-size: 16px;
  489. color: $primary-text-color;
  490. text-align: center;
  491. margin-bottom: 20px;
  492. border: 0;
  493. padding: 0;
  494. }
  495. .button {
  496. display: block;
  497. }
  498. }