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.

593 lines
9.6 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. span.hint {
  16. display: block;
  17. color: $ui-primary-color;
  18. font-size: 12px;
  19. margin-top: 4px;
  20. }
  21. h4 {
  22. text-transform: uppercase;
  23. font-size: 13px;
  24. font-weight: 500;
  25. color: $ui-primary-color;
  26. padding-bottom: 8px;
  27. margin-bottom: 8px;
  28. border-bottom: 1px solid lighten($ui-base-color, 8%);
  29. }
  30. p.hint {
  31. margin-bottom: 15px;
  32. color: $ui-primary-color;
  33. &.subtle-hint {
  34. text-align: center;
  35. font-size: 12px;
  36. line-height: 18px;
  37. margin-top: 15px;
  38. margin-bottom: 0;
  39. color: $ui-primary-color;
  40. a {
  41. color: $ui-highlight-color;
  42. }
  43. }
  44. }
  45. .card {
  46. margin-bottom: 15px;
  47. }
  48. strong {
  49. font-weight: 500;
  50. @each $lang in $cjk-langs {
  51. &:lang(#{$lang}) {
  52. font-weight: 700;
  53. }
  54. }
  55. }
  56. .label_input {
  57. display: flex;
  58. label {
  59. flex: 0 0 auto;
  60. }
  61. input {
  62. flex: 1 1 auto;
  63. }
  64. }
  65. .input.with_label {
  66. padding: 15px 0;
  67. margin-bottom: 0;
  68. .label_input {
  69. flex-wrap: wrap;
  70. align-items: flex-start;
  71. }
  72. &.select .label_input {
  73. align-items: initial;
  74. }
  75. .label_input > label {
  76. font-family: inherit;
  77. font-size: 16px;
  78. color: $primary-text-color;
  79. display: block;
  80. padding-top: 5px;
  81. margin-bottom: 5px;
  82. flex: 1;
  83. min-width: 150px;
  84. word-wrap: break-word;
  85. &.select {
  86. flex: 0;
  87. }
  88. & ~ * {
  89. margin-left: 10px;
  90. }
  91. }
  92. ul {
  93. flex: 390px;
  94. }
  95. &.boolean {
  96. padding: initial;
  97. margin-bottom: initial;
  98. .label_input > label {
  99. font-family: inherit;
  100. font-size: 14px;
  101. color: $primary-text-color;
  102. display: block;
  103. width: auto;
  104. }
  105. label.checkbox {
  106. position: relative;
  107. padding-left: 25px;
  108. flex: 1 1 auto;
  109. }
  110. }
  111. }
  112. .input.with_block_label {
  113. & > label {
  114. font-family: inherit;
  115. font-size: 16px;
  116. color: $primary-text-color;
  117. display: block;
  118. padding-top: 5px;
  119. }
  120. .hint {
  121. margin-bottom: 15px;
  122. }
  123. li {
  124. float: left;
  125. width: 50%;
  126. }
  127. }
  128. .fields-group {
  129. margin-bottom: 25px;
  130. }
  131. .input.radio_buttons .radio label {
  132. margin-bottom: 5px;
  133. font-family: inherit;
  134. font-size: 14px;
  135. color: $primary-text-color;
  136. display: block;
  137. width: auto;
  138. }
  139. .input.boolean {
  140. margin-bottom: 5px;
  141. label {
  142. font-family: inherit;
  143. font-size: 14px;
  144. color: $primary-text-color;
  145. display: block;
  146. width: auto;
  147. }
  148. label.checkbox {
  149. position: relative;
  150. padding-left: 25px;
  151. flex: 1 1 auto;
  152. }
  153. input[type=checkbox] {
  154. position: absolute;
  155. left: 0;
  156. top: 5px;
  157. margin: 0;
  158. }
  159. .hint {
  160. padding-left: 25px;
  161. margin-left: 0;
  162. }
  163. }
  164. .check_boxes {
  165. .checkbox {
  166. label {
  167. font-family: inherit;
  168. font-size: 14px;
  169. color: $primary-text-color;
  170. display: block;
  171. width: auto;
  172. position: relative;
  173. padding-top: 5px;
  174. padding-left: 25px;
  175. flex: 1 1 auto;
  176. }
  177. input[type=checkbox] {
  178. position: absolute;
  179. left: 0;
  180. top: 5px;
  181. margin: 0;
  182. }
  183. }
  184. }
  185. input[type=text],
  186. input[type=number],
  187. input[type=email],
  188. input[type=password],
  189. textarea {
  190. background: transparent;
  191. box-sizing: border-box;
  192. border: 0;
  193. border-bottom: 2px solid $ui-primary-color;
  194. border-radius: 2px 2px 0 0;
  195. padding: 7px 4px;
  196. font-size: 16px;
  197. color: $primary-text-color;
  198. display: block;
  199. width: 100%;
  200. outline: 0;
  201. font-family: inherit;
  202. resize: vertical;
  203. &:invalid {
  204. box-shadow: none;
  205. }
  206. &:focus:invalid {
  207. border-bottom-color: $error-value-color;
  208. }
  209. &:required:valid {
  210. border-bottom-color: $valid-value-color;
  211. }
  212. &:active,
  213. &:focus {
  214. border-bottom-color: $ui-highlight-color;
  215. background: rgba($base-overlay-background, 0.1);
  216. }
  217. }
  218. .input.field_with_errors {
  219. label {
  220. color: $error-value-color;
  221. }
  222. input[type=text],
  223. input[type=email],
  224. input[type=password] {
  225. border-bottom-color: $error-value-color;
  226. }
  227. .error {
  228. display: block;
  229. font-weight: 500;
  230. color: $error-value-color;
  231. margin-top: 4px;
  232. }
  233. }
  234. .actions {
  235. margin-top: 30px;
  236. display: flex;
  237. &.actions--top {
  238. margin-top: 0;
  239. margin-bottom: 30px;
  240. }
  241. }
  242. button,
  243. .button,
  244. .block-button {
  245. display: block;
  246. width: 100%;
  247. border: 0;
  248. border-radius: 4px;
  249. background: $ui-highlight-color;
  250. color: $primary-text-color;
  251. font-size: 18px;
  252. line-height: inherit;
  253. height: auto;
  254. padding: 10px;
  255. text-transform: uppercase;
  256. text-decoration: none;
  257. text-align: center;
  258. box-sizing: border-box;
  259. cursor: pointer;
  260. font-weight: 500;
  261. outline: 0;
  262. margin-bottom: 10px;
  263. margin-right: 10px;
  264. &:last-child {
  265. margin-right: 0;
  266. }
  267. &:hover {
  268. background-color: lighten($ui-highlight-color, 5%);
  269. }
  270. &:active,
  271. &:focus {
  272. background-color: darken($ui-highlight-color, 5%);
  273. }
  274. &.negative {
  275. background: $error-value-color;
  276. &:hover {
  277. background-color: lighten($error-value-color, 5%);
  278. }
  279. &:active,
  280. &:focus {
  281. background-color: darken($error-value-color, 5%);
  282. }
  283. }
  284. }
  285. select {
  286. font-size: 16px;
  287. max-height: 29px;
  288. }
  289. .input-with-append {
  290. position: relative;
  291. .input input {
  292. padding-right: 127px;
  293. }
  294. .append {
  295. position: absolute;
  296. right: 0;
  297. top: 0;
  298. padding: 7px 4px;
  299. padding-bottom: 9px;
  300. font-size: 16px;
  301. color: $ui-base-lighter-color;
  302. font-family: inherit;
  303. pointer-events: none;
  304. cursor: default;
  305. }
  306. }
  307. }
  308. .flash-message {
  309. background: lighten($ui-base-color, 8%);
  310. color: $ui-primary-color;
  311. border-radius: 4px;
  312. padding: 15px 10px;
  313. margin-bottom: 30px;
  314. box-shadow: 0 0 5px rgba($base-shadow-color, 0.2);
  315. text-align: center;
  316. p {
  317. margin-bottom: 15px;
  318. }
  319. .oauth-code {
  320. color: $ui-secondary-color;
  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: $ui-primary-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: $ui-primary-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: $ui-primary-color;
  372. h2 {
  373. font-size: 16px;
  374. margin-bottom: 30px;
  375. }
  376. strong {
  377. color: $ui-secondary-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: $ui-secondary-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: $ui-primary-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: $ui-base-lighter-color;
  490. text-align: center;
  491. margin-bottom: 20px;
  492. border: 0;
  493. padding: 0;
  494. }
  495. .button {
  496. display: block;
  497. }
  498. }