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.

784 lines
14 KiB

  1. $no-columns-breakpoint: 600px;
  2. code {
  3. font-family: $font-monospace, monospace;
  4. font-weight: 400;
  5. }
  6. .form-container {
  7. max-width: 400px;
  8. padding: 20px;
  9. margin: 0 auto;
  10. }
  11. .simple_form {
  12. .input {
  13. margin-bottom: 15px;
  14. overflow: hidden;
  15. &.hidden {
  16. margin: 0;
  17. }
  18. &.radio_buttons {
  19. .radio {
  20. margin-bottom: 15px;
  21. &:last-child {
  22. margin-bottom: 0;
  23. }
  24. }
  25. .radio > label {
  26. position: relative;
  27. padding-left: 28px;
  28. input {
  29. position: absolute;
  30. top: -2px;
  31. left: 0;
  32. }
  33. }
  34. }
  35. &.boolean {
  36. position: relative;
  37. margin-bottom: 0;
  38. .label_input > label {
  39. font-family: inherit;
  40. font-size: 14px;
  41. padding-top: 5px;
  42. color: $primary-text-color;
  43. display: block;
  44. width: auto;
  45. }
  46. .label_input,
  47. .hint {
  48. padding-left: 28px;
  49. }
  50. .label_input__wrapper {
  51. position: static;
  52. }
  53. label.checkbox {
  54. position: absolute;
  55. top: 2px;
  56. left: 0;
  57. }
  58. }
  59. }
  60. .row {
  61. display: flex;
  62. margin: 0 -5px;
  63. .input {
  64. box-sizing: border-box;
  65. flex: 1 1 auto;
  66. width: 50%;
  67. padding: 0 5px;
  68. }
  69. }
  70. .hint {
  71. color: $darker-text-color;
  72. a {
  73. color: $highlight-text-color;
  74. }
  75. code {
  76. border-radius: 3px;
  77. padding: 0.2em 0.4em;
  78. background: darken($ui-base-color, 12%);
  79. }
  80. }
  81. span.hint {
  82. display: block;
  83. font-size: 12px;
  84. margin-top: 4px;
  85. }
  86. p.hint {
  87. margin-bottom: 15px;
  88. color: $darker-text-color;
  89. &.subtle-hint {
  90. text-align: center;
  91. font-size: 12px;
  92. line-height: 18px;
  93. margin-top: 15px;
  94. margin-bottom: 0;
  95. }
  96. }
  97. .card {
  98. margin-bottom: 15px;
  99. }
  100. strong {
  101. font-weight: 500;
  102. @each $lang in $cjk-langs {
  103. &:lang(#{$lang}) {
  104. font-weight: 700;
  105. }
  106. }
  107. }
  108. .input.with_floating_label {
  109. .label_input {
  110. display: flex;
  111. & > label {
  112. font-family: inherit;
  113. font-size: 14px;
  114. color: $primary-text-color;
  115. font-weight: 500;
  116. min-width: 150px;
  117. flex: 0 0 auto;
  118. }
  119. input,
  120. select {
  121. flex: 1 1 auto;
  122. }
  123. }
  124. &.select .hint {
  125. margin-top: 6px;
  126. margin-left: 150px;
  127. }
  128. }
  129. .input.with_label {
  130. .label_input > label {
  131. font-family: inherit;
  132. font-size: 14px;
  133. color: $primary-text-color;
  134. display: block;
  135. margin-bottom: 8px;
  136. word-wrap: break-word;
  137. font-weight: 500;
  138. }
  139. .hint {
  140. margin-top: 6px;
  141. }
  142. ul {
  143. flex: 390px;
  144. }
  145. }
  146. .input.with_block_label {
  147. max-width: none;
  148. & > label {
  149. font-family: inherit;
  150. font-size: 16px;
  151. color: $primary-text-color;
  152. display: block;
  153. font-weight: 500;
  154. padding-top: 5px;
  155. }
  156. .hint {
  157. margin-bottom: 15px;
  158. }
  159. ul {
  160. columns: 2;
  161. }
  162. }
  163. .required abbr {
  164. text-decoration: none;
  165. color: lighten($error-value-color, 12%);
  166. }
  167. .fields-group {
  168. margin-bottom: 25px;
  169. .input:last-child {
  170. margin-bottom: 0;
  171. }
  172. }
  173. .fields-row {
  174. display: flex;
  175. margin: 0 -10px;
  176. padding-top: 5px;
  177. margin-bottom: 25px;
  178. .input {
  179. max-width: none;
  180. }
  181. &__column {
  182. box-sizing: border-box;
  183. padding: 0 10px;
  184. flex: 1 1 auto;
  185. min-height: 1px;
  186. &-6 {
  187. max-width: 50%;
  188. }
  189. }
  190. .fields-group:last-child,
  191. .fields-row__column.fields-group {
  192. margin-bottom: 0;
  193. }
  194. @media screen and (max-width: $no-columns-breakpoint) {
  195. display: block;
  196. margin-bottom: 0;
  197. &__column {
  198. max-width: none;
  199. }
  200. .fields-group:last-child,
  201. .fields-row__column.fields-group,
  202. .fields-row__column {
  203. margin-bottom: 25px;
  204. }
  205. }
  206. }
  207. .input.radio_buttons .radio label {
  208. margin-bottom: 5px;
  209. font-family: inherit;
  210. font-size: 14px;
  211. color: $primary-text-color;
  212. display: block;
  213. width: auto;
  214. }
  215. .check_boxes {
  216. .checkbox {
  217. label {
  218. font-family: inherit;
  219. font-size: 14px;
  220. color: $primary-text-color;
  221. display: inline-block;
  222. width: auto;
  223. position: relative;
  224. padding-top: 5px;
  225. padding-left: 25px;
  226. flex: 1 1 auto;
  227. }
  228. input[type=checkbox] {
  229. position: absolute;
  230. left: 0;
  231. top: 5px;
  232. margin: 0;
  233. }
  234. }
  235. }
  236. input[type=text],
  237. input[type=number],
  238. input[type=email],
  239. input[type=password],
  240. textarea {
  241. box-sizing: border-box;
  242. font-size: 16px;
  243. color: $primary-text-color;
  244. display: block;
  245. width: 100%;
  246. outline: 0;
  247. font-family: inherit;
  248. resize: vertical;
  249. background: darken($ui-base-color, 10%);
  250. border: 1px solid darken($ui-base-color, 14%);
  251. border-radius: 4px;
  252. padding: 10px;
  253. &:invalid {
  254. box-shadow: none;
  255. }
  256. &:focus:invalid {
  257. border-color: lighten($error-red, 12%);
  258. }
  259. &:required:valid {
  260. border-color: $valid-value-color;
  261. }
  262. &:hover {
  263. border-color: darken($ui-base-color, 20%);
  264. }
  265. &:active,
  266. &:focus {
  267. border-color: $highlight-text-color;
  268. background: darken($ui-base-color, 8%);
  269. }
  270. }
  271. .input.field_with_errors {
  272. label {
  273. color: lighten($error-red, 12%);
  274. }
  275. input[type=text],
  276. input[type=number],
  277. input[type=email],
  278. input[type=password],
  279. textarea,
  280. select {
  281. border-color: lighten($error-red, 12%);
  282. }
  283. .error {
  284. display: block;
  285. font-weight: 500;
  286. color: lighten($error-red, 12%);
  287. margin-top: 4px;
  288. }
  289. }
  290. .actions {
  291. margin-top: 30px;
  292. display: flex;
  293. &.actions--top {
  294. margin-top: 0;
  295. margin-bottom: 30px;
  296. }
  297. }
  298. button,
  299. .button,
  300. .block-button {
  301. display: block;
  302. width: 100%;
  303. border: 0;
  304. border-radius: 4px;
  305. background: $ui-highlight-color;
  306. color: $primary-text-color;
  307. font-size: 18px;
  308. line-height: inherit;
  309. height: auto;
  310. padding: 10px;
  311. text-transform: uppercase;
  312. text-decoration: none;
  313. text-align: center;
  314. box-sizing: border-box;
  315. cursor: pointer;
  316. font-weight: 500;
  317. outline: 0;
  318. margin-bottom: 10px;
  319. margin-right: 10px;
  320. &:last-child {
  321. margin-right: 0;
  322. }
  323. &:hover {
  324. background-color: lighten($ui-highlight-color, 5%);
  325. }
  326. &:active,
  327. &:focus {
  328. background-color: darken($ui-highlight-color, 5%);
  329. }
  330. &.negative {
  331. background: $error-value-color;
  332. &:hover {
  333. background-color: lighten($error-value-color, 5%);
  334. }
  335. &:active,
  336. &:focus {
  337. background-color: darken($error-value-color, 5%);
  338. }
  339. }
  340. }
  341. select {
  342. appearance: none;
  343. box-sizing: border-box;
  344. font-size: 16px;
  345. color: $primary-text-color;
  346. display: block;
  347. width: 100%;
  348. outline: 0;
  349. font-family: inherit;
  350. resize: vertical;
  351. background: darken($ui-base-color, 10%) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14.933 18.467' height='19.698' width='15.929'><path d='M3.467 14.967l-3.393-3.5H14.86l-3.392 3.5c-1.866 1.925-3.666 3.5-4 3.5-.335 0-2.135-1.575-4-3.5zm.266-11.234L7.467 0 11.2 3.733l3.733 3.734H0l3.733-3.734z' fill='#{hex-color(lighten($ui-base-color, 12%))}'/></svg>") no-repeat right 8px center / auto 16px;
  352. border: 1px solid darken($ui-base-color, 14%);
  353. border-radius: 4px;
  354. padding: 10px;
  355. padding-right: 30px;
  356. height: 41px;
  357. }
  358. .label_input {
  359. &__wrapper {
  360. position: relative;
  361. }
  362. &__append {
  363. position: absolute;
  364. right: 3px;
  365. top: 1px;
  366. padding: 10px;
  367. padding-bottom: 9px;
  368. font-size: 16px;
  369. color: $dark-text-color;
  370. font-family: inherit;
  371. pointer-events: none;
  372. cursor: default;
  373. max-width: 140px;
  374. white-space: nowrap;
  375. overflow: hidden;
  376. &::after {
  377. content: '';
  378. display: block;
  379. position: absolute;
  380. top: 0;
  381. right: 0;
  382. bottom: 1px;
  383. width: 5px;
  384. background-image: linear-gradient(to right, rgba(darken($ui-base-color, 10%), 0), darken($ui-base-color, 10%));
  385. }
  386. }
  387. }
  388. }
  389. .flash-message {
  390. background: lighten($ui-base-color, 8%);
  391. color: $darker-text-color;
  392. border-radius: 4px;
  393. padding: 15px 10px;
  394. margin-bottom: 30px;
  395. text-align: center;
  396. &.notice {
  397. border: 1px solid rgba($valid-value-color, 0.5);
  398. background: rgba($valid-value-color, 0.25);
  399. color: $valid-value-color;
  400. }
  401. &.alert {
  402. border: 1px solid rgba($error-value-color, 0.5);
  403. background: rgba($error-value-color, 0.25);
  404. color: $error-value-color;
  405. }
  406. p {
  407. margin-bottom: 15px;
  408. }
  409. .oauth-code {
  410. outline: 0;
  411. box-sizing: border-box;
  412. display: block;
  413. width: 100%;
  414. border: none;
  415. padding: 10px;
  416. font-family: $font-monospace, monospace;
  417. background: $ui-base-color;
  418. color: $primary-text-color;
  419. font-size: 14px;
  420. margin: 0;
  421. &::-moz-focus-inner {
  422. border: 0;
  423. }
  424. &::-moz-focus-inner,
  425. &:focus,
  426. &:active {
  427. outline: 0 !important;
  428. }
  429. &:focus {
  430. background: lighten($ui-base-color, 4%);
  431. }
  432. }
  433. strong {
  434. font-weight: 500;
  435. @each $lang in $cjk-langs {
  436. &:lang(#{$lang}) {
  437. font-weight: 700;
  438. }
  439. }
  440. }
  441. @media screen and (max-width: 740px) and (min-width: 441px) {
  442. margin-top: 40px;
  443. }
  444. }
  445. .form-footer {
  446. margin-top: 30px;
  447. text-align: center;
  448. a {
  449. color: $darker-text-color;
  450. text-decoration: none;
  451. &:hover {
  452. text-decoration: underline;
  453. }
  454. }
  455. }
  456. .quick-nav {
  457. list-style: none;
  458. margin-bottom: 25px;
  459. font-size: 14px;
  460. li {
  461. display: inline-block;
  462. margin-right: 10px;
  463. }
  464. a {
  465. color: $highlight-text-color;
  466. text-transform: uppercase;
  467. text-decoration: none;
  468. font-weight: 700;
  469. &:hover,
  470. &:focus,
  471. &:active {
  472. color: lighten($highlight-text-color, 8%);
  473. }
  474. }
  475. }
  476. .oauth-prompt,
  477. .follow-prompt {
  478. margin-bottom: 30px;
  479. color: $darker-text-color;
  480. h2 {
  481. font-size: 16px;
  482. margin-bottom: 30px;
  483. text-align: center;
  484. }
  485. strong {
  486. color: $secondary-text-color;
  487. font-weight: 500;
  488. @each $lang in $cjk-langs {
  489. &:lang(#{$lang}) {
  490. font-weight: 700;
  491. }
  492. }
  493. }
  494. @media screen and (max-width: 740px) and (min-width: 441px) {
  495. margin-top: 40px;
  496. }
  497. }
  498. .qr-wrapper {
  499. display: flex;
  500. flex-wrap: wrap;
  501. align-items: flex-start;
  502. }
  503. .qr-code {
  504. flex: 0 0 auto;
  505. background: $simple-background-color;
  506. padding: 4px;
  507. margin: 0 10px 20px 0;
  508. box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
  509. display: inline-block;
  510. svg {
  511. display: block;
  512. margin: 0;
  513. }
  514. }
  515. .qr-alternative {
  516. margin-bottom: 20px;
  517. color: $secondary-text-color;
  518. flex: 150px;
  519. samp {
  520. display: block;
  521. font-size: 14px;
  522. }
  523. }
  524. .table-form {
  525. p {
  526. margin-bottom: 15px;
  527. strong {
  528. font-weight: 500;
  529. @each $lang in $cjk-langs {
  530. &:lang(#{$lang}) {
  531. font-weight: 700;
  532. }
  533. }
  534. }
  535. }
  536. }
  537. .simple_form,
  538. .table-form {
  539. .warning {
  540. box-sizing: border-box;
  541. background: rgba($error-value-color, 0.5);
  542. color: $primary-text-color;
  543. text-shadow: 1px 1px 0 rgba($base-shadow-color, 0.3);
  544. box-shadow: 0 2px 6px rgba($base-shadow-color, 0.4);
  545. border-radius: 4px;
  546. padding: 10px;
  547. margin-bottom: 15px;
  548. a {
  549. color: $primary-text-color;
  550. text-decoration: underline;
  551. &:hover,
  552. &:focus,
  553. &:active {
  554. text-decoration: none;
  555. }
  556. }
  557. strong {
  558. font-weight: 600;
  559. display: block;
  560. margin-bottom: 5px;
  561. @each $lang in $cjk-langs {
  562. &:lang(#{$lang}) {
  563. font-weight: 700;
  564. }
  565. }
  566. .fa {
  567. font-weight: 400;
  568. }
  569. }
  570. }
  571. }
  572. .action-pagination {
  573. display: flex;
  574. flex-wrap: wrap;
  575. align-items: center;
  576. .actions,
  577. .pagination {
  578. flex: 1 1 auto;
  579. }
  580. .actions {
  581. padding: 30px 0;
  582. padding-right: 20px;
  583. flex: 0 0 auto;
  584. }
  585. }
  586. .post-follow-actions {
  587. text-align: center;
  588. color: $darker-text-color;
  589. div {
  590. margin-bottom: 4px;
  591. }
  592. }
  593. .alternative-login {
  594. margin-top: 20px;
  595. margin-bottom: 20px;
  596. h4 {
  597. font-size: 16px;
  598. color: $primary-text-color;
  599. text-align: center;
  600. margin-bottom: 20px;
  601. border: 0;
  602. padding: 0;
  603. }
  604. .button {
  605. display: block;
  606. }
  607. }
  608. .scope-danger {
  609. color: $warning-red;
  610. }
  611. .form_admin_settings_site_short_description,
  612. .form_admin_settings_site_description,
  613. .form_admin_settings_site_extended_description,
  614. .form_admin_settings_site_terms,
  615. .form_admin_settings_custom_css,
  616. .form_admin_settings_closed_registrations_message {
  617. textarea {
  618. font-family: $font-monospace, monospace;
  619. }
  620. }
  621. .input-copy {
  622. background: darken($ui-base-color, 10%);
  623. border: 1px solid darken($ui-base-color, 14%);
  624. border-radius: 4px;
  625. display: flex;
  626. align-items: center;
  627. padding-right: 4px;
  628. position: relative;
  629. top: 1px;
  630. transition: border-color 300ms linear;
  631. &__wrapper {
  632. flex: 1 1 auto;
  633. }
  634. input[type=text] {
  635. background: transparent;
  636. border: 0;
  637. padding: 10px;
  638. font-size: 14px;
  639. font-family: $font-monospace, monospace;
  640. }
  641. button {
  642. flex: 0 0 auto;
  643. margin: 4px;
  644. text-transform: none;
  645. font-weight: 400;
  646. font-size: 14px;
  647. padding: 7px 18px;
  648. padding-bottom: 6px;
  649. width: auto;
  650. transition: background 300ms linear;
  651. }
  652. &.copied {
  653. border-color: $valid-value-color;
  654. transition: none;
  655. button {
  656. background: $valid-value-color;
  657. transition: none;
  658. }
  659. }
  660. }