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.

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