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.

765 lines
13 KiB

  1. .modal-container--preloader {
  2. background: lighten($ui-base-color, 8%);
  3. }
  4. .modal-root {
  5. position: relative;
  6. transition: opacity 0.3s linear;
  7. will-change: opacity;
  8. z-index: 9999;
  9. }
  10. .modal-root__overlay {
  11. position: fixed;
  12. top: 0;
  13. left: 0;
  14. right: 0;
  15. bottom: 0;
  16. background: rgba($base-overlay-background, 0.7);
  17. }
  18. .modal-root__container {
  19. position: fixed;
  20. top: 0;
  21. left: 0;
  22. width: 100%;
  23. height: 100%;
  24. display: flex;
  25. flex-direction: column;
  26. align-items: center;
  27. justify-content: center;
  28. align-content: space-around;
  29. z-index: 9999;
  30. pointer-events: none;
  31. user-select: none;
  32. }
  33. .modal-root__modal {
  34. pointer-events: auto;
  35. display: flex;
  36. z-index: 9999;
  37. }
  38. .onboarding-modal,
  39. .error-modal,
  40. .embed-modal {
  41. background: $ui-secondary-color;
  42. color: $inverted-text-color;
  43. border-radius: 8px;
  44. overflow: hidden;
  45. display: flex;
  46. flex-direction: column;
  47. }
  48. .onboarding-modal__pager {
  49. height: 80vh;
  50. width: 80vw;
  51. max-width: 520px;
  52. max-height: 470px;
  53. .react-swipeable-view-container > div {
  54. width: 100%;
  55. height: 100%;
  56. box-sizing: border-box;
  57. display: none;
  58. flex-direction: column;
  59. align-items: center;
  60. justify-content: center;
  61. display: flex;
  62. user-select: text;
  63. }
  64. }
  65. .error-modal__body {
  66. height: 80vh;
  67. width: 80vw;
  68. max-width: 520px;
  69. max-height: 420px;
  70. position: relative;
  71. & > div {
  72. position: absolute;
  73. top: 0;
  74. left: 0;
  75. width: 100%;
  76. height: 100%;
  77. box-sizing: border-box;
  78. padding: 25px;
  79. display: none;
  80. flex-direction: column;
  81. align-items: center;
  82. justify-content: center;
  83. display: flex;
  84. opacity: 0;
  85. user-select: text;
  86. }
  87. }
  88. .error-modal__body {
  89. display: flex;
  90. flex-direction: column;
  91. justify-content: center;
  92. align-items: center;
  93. text-align: center;
  94. }
  95. @media screen and (max-width: 550px) {
  96. .onboarding-modal {
  97. width: 100%;
  98. height: 100%;
  99. border-radius: 0;
  100. }
  101. .onboarding-modal__pager {
  102. width: 100%;
  103. height: auto;
  104. max-width: none;
  105. max-height: none;
  106. flex: 1 1 auto;
  107. }
  108. }
  109. .onboarding-modal__paginator,
  110. .error-modal__footer {
  111. flex: 0 0 auto;
  112. background: darken($ui-secondary-color, 8%);
  113. display: flex;
  114. padding: 25px;
  115. & > div {
  116. min-width: 33px;
  117. }
  118. .onboarding-modal__nav,
  119. .error-modal__nav {
  120. color: $lighter-text-color;
  121. border: 0;
  122. font-size: 14px;
  123. font-weight: 500;
  124. padding: 10px 25px;
  125. line-height: inherit;
  126. height: auto;
  127. margin: -10px;
  128. border-radius: 4px;
  129. background-color: transparent;
  130. &:hover,
  131. &:focus,
  132. &:active {
  133. color: darken($lighter-text-color, 4%);
  134. background-color: darken($ui-secondary-color, 16%);
  135. }
  136. &.onboarding-modal__done,
  137. &.onboarding-modal__next {
  138. color: $inverted-text-color;
  139. &:hover,
  140. &:focus,
  141. &:active {
  142. color: lighten($inverted-text-color, 4%);
  143. }
  144. }
  145. }
  146. }
  147. .error-modal__footer {
  148. justify-content: center;
  149. }
  150. .onboarding-modal__dots {
  151. flex: 1 1 auto;
  152. display: flex;
  153. align-items: center;
  154. justify-content: center;
  155. }
  156. .onboarding-modal__dot {
  157. width: 14px;
  158. height: 14px;
  159. border-radius: 14px;
  160. background: darken($ui-secondary-color, 16%);
  161. margin: 0 3px;
  162. cursor: pointer;
  163. &:hover {
  164. background: darken($ui-secondary-color, 18%);
  165. }
  166. &.active {
  167. cursor: default;
  168. background: darken($ui-secondary-color, 24%);
  169. }
  170. }
  171. .onboarding-modal__page__wrapper {
  172. pointer-events: none;
  173. padding: 25px;
  174. padding-bottom: 0;
  175. &.onboarding-modal__page__wrapper--active {
  176. pointer-events: auto;
  177. }
  178. }
  179. .onboarding-modal__page {
  180. cursor: default;
  181. line-height: 21px;
  182. h1 {
  183. font-size: 18px;
  184. font-weight: 500;
  185. color: $inverted-text-color;
  186. margin-bottom: 20px;
  187. }
  188. a {
  189. color: $highlight-text-color;
  190. &:hover,
  191. &:focus,
  192. &:active {
  193. color: lighten($highlight-text-color, 4%);
  194. }
  195. }
  196. .navigation-bar a {
  197. color: inherit;
  198. }
  199. p {
  200. font-size: 16px;
  201. color: $lighter-text-color;
  202. margin-top: 10px;
  203. margin-bottom: 10px;
  204. &:last-child {
  205. margin-bottom: 0;
  206. }
  207. strong {
  208. font-weight: 500;
  209. background: $ui-base-color;
  210. color: $secondary-text-color;
  211. border-radius: 4px;
  212. font-size: 14px;
  213. padding: 3px 6px;
  214. @each $lang in $cjk-langs {
  215. &:lang(#{$lang}) {
  216. font-weight: 700;
  217. }
  218. }
  219. }
  220. }
  221. }
  222. .onboarding-modal__page__wrapper-0 {
  223. background: url('~images/elephant_ui_greeting.svg') no-repeat left bottom / auto 250px;
  224. height: 100%;
  225. padding: 0;
  226. }
  227. .onboarding-modal__page-one {
  228. &__lead {
  229. padding: 65px;
  230. padding-top: 45px;
  231. padding-bottom: 0;
  232. margin-bottom: 10px;
  233. h1 {
  234. font-size: 26px;
  235. line-height: 36px;
  236. margin-bottom: 8px;
  237. }
  238. p {
  239. margin-bottom: 0;
  240. }
  241. }
  242. &__extra {
  243. padding-right: 65px;
  244. padding-left: 185px;
  245. text-align: center;
  246. }
  247. }
  248. .display-case {
  249. text-align: center;
  250. font-size: 15px;
  251. margin-bottom: 15px;
  252. &__label {
  253. font-weight: 500;
  254. color: $inverted-text-color;
  255. margin-bottom: 5px;
  256. text-transform: uppercase;
  257. font-size: 12px;
  258. }
  259. &__case {
  260. background: $ui-base-color;
  261. color: $secondary-text-color;
  262. font-weight: 500;
  263. padding: 10px;
  264. border-radius: 4px;
  265. }
  266. }
  267. .onboarding-modal__page-two,
  268. .onboarding-modal__page-three,
  269. .onboarding-modal__page-four,
  270. .onboarding-modal__page-five {
  271. p {
  272. text-align: left;
  273. }
  274. .figure {
  275. background: darken($ui-base-color, 8%);
  276. color: $secondary-text-color;
  277. margin-bottom: 20px;
  278. border-radius: 4px;
  279. padding: 10px;
  280. text-align: center;
  281. font-size: 14px;
  282. box-shadow: 1px 2px 6px rgba($base-shadow-color, 0.3);
  283. .onboarding-modal__image {
  284. border-radius: 4px;
  285. margin-bottom: 10px;
  286. }
  287. &.non-interactive {
  288. pointer-events: none;
  289. text-align: left;
  290. }
  291. }
  292. }
  293. .onboarding-modal__page-four__columns {
  294. .row {
  295. display: flex;
  296. margin-bottom: 20px;
  297. & > div {
  298. flex: 1 1 0;
  299. margin: 0 10px;
  300. &:first-child {
  301. margin-left: 0;
  302. }
  303. &:last-child {
  304. margin-right: 0;
  305. }
  306. p {
  307. text-align: center;
  308. }
  309. }
  310. &:last-child {
  311. margin-bottom: 0;
  312. }
  313. }
  314. .column-header {
  315. color: $primary-text-color;
  316. }
  317. }
  318. @media screen and (max-width: 320px) and (max-height: 600px) {
  319. .onboarding-modal__page p {
  320. font-size: 14px;
  321. line-height: 20px;
  322. }
  323. .onboarding-modal__page-two .figure,
  324. .onboarding-modal__page-three .figure,
  325. .onboarding-modal__page-four .figure,
  326. .onboarding-modal__page-five .figure {
  327. font-size: 12px;
  328. margin-bottom: 10px;
  329. }
  330. .onboarding-modal__page-four__columns .row {
  331. margin-bottom: 10px;
  332. }
  333. .onboarding-modal__page-four__columns .column-header {
  334. padding: 5px;
  335. font-size: 12px;
  336. }
  337. }
  338. .onboard-sliders {
  339. display: inline-block;
  340. max-width: 30px;
  341. max-height: auto;
  342. margin-left: 10px;
  343. }
  344. .boost-modal,
  345. .favourite-modal,
  346. .confirmation-modal,
  347. .report-modal,
  348. .actions-modal,
  349. .mute-modal {
  350. background: lighten($ui-secondary-color, 8%);
  351. color: $inverted-text-color;
  352. border-radius: 8px;
  353. overflow: hidden;
  354. max-width: 90vw;
  355. width: 480px;
  356. position: relative;
  357. flex-direction: column;
  358. .status__display-name {
  359. display: flex;
  360. }
  361. .status__avatar {
  362. height: 28px;
  363. left: 10px;
  364. top: 10px;
  365. width: 48px;
  366. }
  367. .status__content__spoiler-link {
  368. color: lighten($secondary-text-color, 8%);
  369. }
  370. }
  371. .actions-modal {
  372. .status {
  373. background: $white;
  374. border-bottom-color: $ui-secondary-color;
  375. padding-top: 10px;
  376. padding-bottom: 10px;
  377. }
  378. .dropdown-menu__separator {
  379. border-bottom-color: $ui-secondary-color;
  380. }
  381. }
  382. .boost-modal__container,
  383. .favourite-modal__container {
  384. overflow-x: scroll;
  385. padding: 10px;
  386. .status {
  387. user-select: text;
  388. border-bottom: 0;
  389. }
  390. }
  391. .boost-modal__action-bar,
  392. .favourite-modal__action-bar,
  393. .confirmation-modal__action-bar,
  394. .mute-modal__action-bar {
  395. display: flex;
  396. justify-content: space-between;
  397. background: $ui-secondary-color;
  398. padding: 10px;
  399. line-height: 36px;
  400. & > div {
  401. flex: 1 1 auto;
  402. text-align: right;
  403. color: $lighter-text-color;
  404. padding-right: 10px;
  405. }
  406. .button {
  407. flex: 0 0 auto;
  408. }
  409. }
  410. .boost-modal__status-header,
  411. .favourite-modal__status-header {
  412. font-size: 15px;
  413. }
  414. .boost-modal__status-time,
  415. .favourite-modal__status-time {
  416. float: right;
  417. font-size: 14px;
  418. }
  419. .confirmation-modal {
  420. max-width: 85vw;
  421. @media screen and (min-width: 480px) {
  422. max-width: 380px;
  423. }
  424. }
  425. .mute-modal {
  426. line-height: 24px;
  427. }
  428. .mute-modal .react-toggle {
  429. vertical-align: middle;
  430. }
  431. .report-modal {
  432. width: 90vw;
  433. max-width: 700px;
  434. }
  435. .report-modal__container {
  436. display: flex;
  437. border-top: 1px solid $ui-secondary-color;
  438. @media screen and (max-width: 480px) {
  439. flex-wrap: wrap;
  440. overflow-y: auto;
  441. }
  442. }
  443. .report-modal__statuses,
  444. .report-modal__comment {
  445. box-sizing: border-box;
  446. width: 50%;
  447. @media screen and (max-width: 480px) {
  448. width: 100%;
  449. }
  450. }
  451. .report-modal__statuses {
  452. flex: 1 1 auto;
  453. min-height: 20vh;
  454. max-height: 80vh;
  455. overflow-y: auto;
  456. overflow-x: hidden;
  457. .status__content a {
  458. color: $highlight-text-color;
  459. }
  460. @media screen and (max-width: 480px) {
  461. max-height: 10vh;
  462. }
  463. }
  464. .report-modal__comment {
  465. padding: 20px;
  466. border-right: 1px solid $ui-secondary-color;
  467. max-width: 320px;
  468. p {
  469. font-size: 14px;
  470. line-height: 20px;
  471. margin-bottom: 20px;
  472. }
  473. .setting-text {
  474. display: block;
  475. box-sizing: border-box;
  476. width: 100%;
  477. margin: 0;
  478. color: $inverted-text-color;
  479. background: $white;
  480. padding: 10px;
  481. font-family: inherit;
  482. font-size: 14px;
  483. resize: vertical;
  484. border: 0;
  485. outline: 0;
  486. border-radius: 4px;
  487. border: 1px solid $ui-secondary-color;
  488. margin-bottom: 20px;
  489. &:focus {
  490. border: 1px solid darken($ui-secondary-color, 8%);
  491. }
  492. }
  493. .setting-toggle {
  494. margin-top: 20px;
  495. margin-bottom: 24px;
  496. &__label {
  497. color: $inverted-text-color;
  498. font-size: 14px;
  499. }
  500. }
  501. @media screen and (max-width: 480px) {
  502. padding: 10px;
  503. max-width: 100%;
  504. order: 2;
  505. .setting-toggle {
  506. margin-bottom: 4px;
  507. }
  508. }
  509. }
  510. .report-modal__target {
  511. padding: 20px;
  512. .media-modal__close {
  513. top: 19px;
  514. right: 15px;
  515. }
  516. }
  517. .actions-modal {
  518. .status {
  519. overflow-y: auto;
  520. max-height: 300px;
  521. }
  522. strong {
  523. display: block;
  524. font-weight: 500;
  525. }
  526. max-height: 80vh;
  527. max-width: 80vw;
  528. .actions-modal__item-label {
  529. font-weight: 500;
  530. }
  531. ul {
  532. overflow-y: auto;
  533. flex-shrink: 0;
  534. li:empty {
  535. margin: 0;
  536. }
  537. li:not(:empty) {
  538. a {
  539. color: $inverted-text-color;
  540. display: flex;
  541. padding: 12px 16px;
  542. font-size: 15px;
  543. align-items: center;
  544. text-decoration: none;
  545. &,
  546. button {
  547. transition: none;
  548. }
  549. &.active,
  550. &:hover,
  551. &:active,
  552. &:focus {
  553. &,
  554. button {
  555. background: $ui-highlight-color;
  556. color: $primary-text-color;
  557. }
  558. }
  559. & > .react-toggle,
  560. & > .icon,
  561. button:first-child {
  562. margin-right: 10px;
  563. }
  564. }
  565. }
  566. }
  567. }
  568. .confirmation-modal__action-bar,
  569. .mute-modal__action-bar {
  570. .confirmation-modal__cancel-button,
  571. .mute-modal__cancel-button {
  572. background-color: transparent;
  573. color: $lighter-text-color;
  574. font-size: 14px;
  575. font-weight: 500;
  576. &:hover,
  577. &:focus,
  578. &:active {
  579. color: darken($lighter-text-color, 4%);
  580. }
  581. }
  582. }
  583. .confirmation-modal__container,
  584. .mute-modal__container,
  585. .report-modal__target {
  586. padding: 30px;
  587. font-size: 16px;
  588. text-align: center;
  589. strong {
  590. font-weight: 500;
  591. @each $lang in $cjk-langs {
  592. &:lang(#{$lang}) {
  593. font-weight: 700;
  594. }
  595. }
  596. }
  597. }
  598. .embed-modal {
  599. max-width: 80vw;
  600. max-height: 80vh;
  601. h4 {
  602. padding: 30px;
  603. font-weight: 500;
  604. font-size: 16px;
  605. text-align: center;
  606. }
  607. .embed-modal__container {
  608. padding: 10px;
  609. .hint {
  610. margin-bottom: 15px;
  611. }
  612. .embed-modal__html {
  613. outline: 0;
  614. box-sizing: border-box;
  615. display: block;
  616. width: 100%;
  617. border: none;
  618. padding: 10px;
  619. font-family: 'mastodon-font-monospace', monospace;
  620. background: $ui-base-color;
  621. color: $primary-text-color;
  622. font-size: 14px;
  623. margin: 0;
  624. margin-bottom: 15px;
  625. &::-moz-focus-inner {
  626. border: 0;
  627. }
  628. &::-moz-focus-inner,
  629. &:focus,
  630. &:active {
  631. outline: 0 !important;
  632. }
  633. &:focus {
  634. background: lighten($ui-base-color, 4%);
  635. }
  636. @media screen and (max-width: 600px) {
  637. font-size: 16px;
  638. }
  639. }
  640. .embed-modal__iframe {
  641. width: 400px;
  642. max-width: 100%;
  643. overflow: hidden;
  644. border: 0;
  645. }
  646. }
  647. }