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.

762 lines
13 KiB

6 years ago
6 years ago
6 years ago
  1. .compose-form {
  2. padding: 10px;
  3. .emoji-picker-dropdown {
  4. position: absolute;
  5. top: 0;
  6. right: 0;
  7. ::-webkit-scrollbar-track:hover,
  8. ::-webkit-scrollbar-track:active {
  9. background-color: rgba($base-overlay-background, 0.3);
  10. }
  11. }
  12. }
  13. .character-counter {
  14. cursor: default;
  15. font-family: $font-sans-serif, sans-serif;
  16. font-size: 14px;
  17. font-weight: 600;
  18. color: $lighter-text-color;
  19. &.character-counter--over {
  20. color: $warning-red;
  21. }
  22. }
  23. .no-reduce-motion .spoiler-input {
  24. transition: height 0.4s ease, opacity 0.4s ease;
  25. }
  26. .spoiler-input {
  27. height: 0;
  28. transform-origin: bottom;
  29. opacity: 0;
  30. &.spoiler-input--visible {
  31. height: 36px;
  32. margin-bottom: 11px;
  33. opacity: 1;
  34. }
  35. input {
  36. display: block;
  37. box-sizing: border-box;
  38. margin: 0;
  39. border: 0;
  40. border-radius: 4px;
  41. padding: 10px;
  42. width: 100%;
  43. outline: 0;
  44. color: $inverted-text-color;
  45. background: $simple-background-color;
  46. font-size: 14px;
  47. font-family: inherit;
  48. resize: vertical;
  49. &::placeholder {
  50. color: $dark-text-color;
  51. }
  52. &:focus {
  53. outline: 0;
  54. }
  55. @include single-column('screen and (max-width: 630px)') {
  56. font-size: 16px;
  57. }
  58. }
  59. }
  60. .compose-form__warning {
  61. color: $inverted-text-color;
  62. margin-bottom: 15px;
  63. background: $ui-primary-color;
  64. box-shadow: 0 2px 6px rgba($base-shadow-color, 0.3);
  65. padding: 8px 10px;
  66. border-radius: 4px;
  67. font-size: 13px;
  68. font-weight: 400;
  69. a {
  70. color: $lighter-text-color;
  71. font-weight: 500;
  72. text-decoration: underline;
  73. &:active,
  74. &:focus,
  75. &:hover {
  76. text-decoration: none;
  77. }
  78. }
  79. }
  80. .compose-form__sensitive-button {
  81. padding: 10px;
  82. padding-top: 0;
  83. font-size: 14px;
  84. font-weight: 500;
  85. &.active {
  86. color: $highlight-text-color;
  87. }
  88. input[type='checkbox'] {
  89. display: none;
  90. }
  91. .checkbox {
  92. display: inline-block;
  93. position: relative;
  94. border: 1px solid $ui-primary-color;
  95. box-sizing: border-box;
  96. width: 18px;
  97. height: 18px;
  98. flex: 0 0 auto;
  99. margin-left: 5px;
  100. margin-right: 10px;
  101. top: -1px;
  102. border-radius: 4px;
  103. vertical-align: middle;
  104. &.active {
  105. border-color: $highlight-text-color;
  106. background: $highlight-text-color
  107. url("data:image/svg+xml;utf8,<svg width='18' height='18' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M4.5 8.5L8 12l6-6' stroke='white' stroke-width='1.5'/></svg>")
  108. center center no-repeat;
  109. }
  110. }
  111. }
  112. .reply-indicator {
  113. margin: 0 0 10px;
  114. border-radius: 4px;
  115. padding: 10px;
  116. background: $ui-primary-color;
  117. min-height: 23px;
  118. overflow-y: auto;
  119. flex: 0 2 auto;
  120. }
  121. .reply-indicator__header {
  122. margin-bottom: 5px;
  123. overflow: hidden;
  124. & > .account.small {
  125. color: $inverted-text-color;
  126. }
  127. }
  128. .reply-indicator__cancel {
  129. float: right;
  130. line-height: 24px;
  131. }
  132. .reply-indicator__content {
  133. position: relative;
  134. margin: 10px 0;
  135. padding: 0 12px;
  136. font-size: 14px;
  137. line-height: 20px;
  138. color: $inverted-text-color;
  139. word-wrap: break-word;
  140. font-weight: 400;
  141. overflow: visible;
  142. white-space: pre-wrap;
  143. padding-top: 5px;
  144. overflow: hidden;
  145. p,
  146. pre,
  147. blockquote {
  148. margin-bottom: 20px;
  149. white-space: pre-wrap;
  150. &:last-child {
  151. margin-bottom: 0;
  152. }
  153. }
  154. h1,
  155. h2,
  156. h3,
  157. h4,
  158. h5 {
  159. margin-top: 20px;
  160. margin-bottom: 20px;
  161. }
  162. h1,
  163. h2 {
  164. font-weight: 700;
  165. font-size: 18px;
  166. }
  167. h2 {
  168. font-size: 16px;
  169. }
  170. h3,
  171. h4,
  172. h5 {
  173. font-weight: 500;
  174. }
  175. blockquote {
  176. padding-left: 10px;
  177. border-left: 3px solid $inverted-text-color;
  178. color: $inverted-text-color;
  179. white-space: normal;
  180. p:last-child {
  181. margin-bottom: 0;
  182. }
  183. }
  184. b,
  185. strong {
  186. font-weight: 700;
  187. }
  188. em,
  189. i {
  190. font-style: italic;
  191. }
  192. sub {
  193. font-size: smaller;
  194. vertical-align: sub;
  195. }
  196. sup {
  197. font-size: smaller;
  198. vertical-align: super;
  199. }
  200. ul,
  201. ol {
  202. margin-left: 1em;
  203. p {
  204. margin: 0;
  205. }
  206. }
  207. ul {
  208. list-style-type: disc;
  209. }
  210. ol {
  211. list-style-type: decimal;
  212. }
  213. a {
  214. color: $lighter-text-color;
  215. text-decoration: none;
  216. &:hover {
  217. text-decoration: underline;
  218. }
  219. &.mention {
  220. &:hover {
  221. text-decoration: none;
  222. span {
  223. text-decoration: underline;
  224. }
  225. }
  226. }
  227. }
  228. .emojione {
  229. width: 20px;
  230. height: 20px;
  231. margin: -5px 0 0;
  232. }
  233. }
  234. .compose-form .compose-form__autosuggest-wrapper {
  235. position: relative;
  236. }
  237. .compose-form .autosuggest-textarea,
  238. .compose-form .autosuggest-input {
  239. position: relative;
  240. width: 100%;
  241. label {
  242. .autosuggest-textarea__textarea {
  243. display: block;
  244. box-sizing: border-box;
  245. margin: 0;
  246. border: 0;
  247. border-radius: 4px 4px 0 0;
  248. padding: 10px 32px 0 10px;
  249. width: 100%;
  250. min-height: 100px;
  251. outline: 0;
  252. color: $inverted-text-color;
  253. background: $simple-background-color;
  254. font-size: 14px;
  255. font-family: inherit;
  256. resize: none;
  257. scrollbar-color: initial;
  258. &::placeholder {
  259. color: $dark-text-color;
  260. }
  261. &::-webkit-scrollbar {
  262. all: unset;
  263. }
  264. &:focus {
  265. outline: 0;
  266. }
  267. @include single-column('screen and (max-width: 630px)') {
  268. font-size: 16px;
  269. }
  270. @include limited-single-column('screen and (max-width: 600px)') {
  271. height: 100px !important; // prevent auto-resize textarea
  272. resize: vertical;
  273. }
  274. }
  275. }
  276. }
  277. .compose-form__textarea-icons {
  278. display: block;
  279. position: absolute;
  280. top: 29px;
  281. right: 5px;
  282. bottom: 5px;
  283. overflow: hidden;
  284. & > .textarea_icon {
  285. display: block;
  286. margin: 2px 0 0 2px;
  287. width: 24px;
  288. height: 24px;
  289. color: $lighter-text-color;
  290. font-size: 18px;
  291. line-height: 24px;
  292. text-align: center;
  293. opacity: 0.8;
  294. }
  295. }
  296. .autosuggest-textarea__suggestions-wrapper {
  297. position: relative;
  298. height: 0;
  299. }
  300. .autosuggest-textarea__suggestions {
  301. display: block;
  302. position: absolute;
  303. box-sizing: border-box;
  304. top: 100%;
  305. border-radius: 0 0 4px 4px;
  306. padding: 6px;
  307. width: 100%;
  308. color: $inverted-text-color;
  309. background: $ui-secondary-color;
  310. box-shadow: 4px 4px 6px rgba($base-shadow-color, 0.4);
  311. font-size: 14px;
  312. z-index: 99;
  313. display: none;
  314. }
  315. .autosuggest-textarea__suggestions--visible {
  316. display: block;
  317. }
  318. .autosuggest-textarea__suggestions__item {
  319. padding: 10px;
  320. cursor: pointer;
  321. border-radius: 4px;
  322. &:hover,
  323. &:focus,
  324. &:active,
  325. &.selected {
  326. background: darken($ui-secondary-color, 10%);
  327. }
  328. > .account,
  329. > .emoji,
  330. > .autosuggest-hashtag {
  331. display: flex;
  332. flex-direction: row;
  333. align-items: center;
  334. justify-content: flex-start;
  335. line-height: 18px;
  336. font-size: 14px;
  337. }
  338. .autosuggest-hashtag {
  339. justify-content: space-between;
  340. &__name {
  341. flex: 1 1 auto;
  342. overflow: hidden;
  343. text-overflow: ellipsis;
  344. white-space: nowrap;
  345. }
  346. strong {
  347. font-weight: 500;
  348. }
  349. &__uses {
  350. flex: 0 0 auto;
  351. text-align: right;
  352. overflow: hidden;
  353. text-overflow: ellipsis;
  354. white-space: nowrap;
  355. }
  356. }
  357. & > .account.small {
  358. .display-name {
  359. & > span {
  360. color: $lighter-text-color;
  361. }
  362. }
  363. }
  364. }
  365. .compose-form__upload-wrapper {
  366. overflow: hidden;
  367. }
  368. .compose-form__uploads-wrapper {
  369. display: flex;
  370. flex-direction: row;
  371. flex-wrap: wrap;
  372. font-family: inherit;
  373. padding: 5px;
  374. overflow: hidden;
  375. }
  376. .compose-form__upload {
  377. flex: 1 1 0;
  378. margin: 5px;
  379. min-width: 40%;
  380. .compose-form__upload-thumbnail {
  381. position: relative;
  382. border-radius: 4px;
  383. height: 140px;
  384. width: 100%;
  385. background-color: $base-shadow-color;
  386. background-position: center;
  387. background-size: cover;
  388. background-repeat: no-repeat;
  389. overflow: hidden;
  390. & > .close {
  391. mix-blend-mode: difference;
  392. }
  393. }
  394. .icon-button {
  395. flex: 0 1 auto;
  396. color: $secondary-text-color;
  397. font-size: 14px;
  398. font-weight: 500;
  399. padding: 10px;
  400. font-family: inherit;
  401. &:hover,
  402. &:focus,
  403. &:active {
  404. color: lighten($secondary-text-color, 7%);
  405. }
  406. }
  407. &__warning {
  408. position: absolute;
  409. z-index: 2;
  410. bottom: 0;
  411. left: 0;
  412. right: 0;
  413. box-sizing: border-box;
  414. background: linear-gradient(
  415. 0deg,
  416. rgba($base-shadow-color, 0.8) 0,
  417. rgba($base-shadow-color, 0.35) 80%,
  418. transparent
  419. );
  420. }
  421. }
  422. .compose-form__upload__actions {
  423. background: linear-gradient(
  424. 180deg,
  425. rgba($base-shadow-color, 0.8) 0,
  426. rgba($base-shadow-color, 0.35) 80%,
  427. transparent
  428. );
  429. display: flex;
  430. align-items: flex-start;
  431. justify-content: space-between;
  432. }
  433. .upload-progress {
  434. display: flex;
  435. padding: 10px;
  436. color: $darker-text-color;
  437. overflow: hidden;
  438. .fa {
  439. font-size: 34px;
  440. margin-right: 10px;
  441. }
  442. span {
  443. display: block;
  444. font-size: 12px;
  445. font-weight: 500;
  446. text-transform: uppercase;
  447. }
  448. }
  449. .upload-progress__message {
  450. flex: 1 1 auto;
  451. }
  452. .upload-progress__backdrop {
  453. position: relative;
  454. margin-top: 5px;
  455. border-radius: 6px;
  456. width: 100%;
  457. height: 6px;
  458. background: $ui-base-lighter-color;
  459. }
  460. .upload-progress__tracker {
  461. position: absolute;
  462. top: 0;
  463. left: 0;
  464. height: 6px;
  465. border-radius: 6px;
  466. background: $ui-highlight-color;
  467. }
  468. .compose-form__modifiers {
  469. color: $inverted-text-color;
  470. font-family: inherit;
  471. font-size: 14px;
  472. background: $simple-background-color;
  473. }
  474. .compose-form__buttons-wrapper {
  475. padding: 10px;
  476. background: darken($simple-background-color, 8%);
  477. border-radius: 0 0 4px 4px;
  478. height: 27px;
  479. display: flex;
  480. justify-content: space-between;
  481. flex: 0 0 auto;
  482. }
  483. .compose-form__buttons {
  484. display: flex;
  485. flex: 0 0 auto;
  486. & .icon-button,
  487. & .text-icon-button {
  488. display: inline-block;
  489. box-sizing: content-box;
  490. padding: 0 3px;
  491. height: 27px;
  492. line-height: 27px;
  493. vertical-align: bottom;
  494. }
  495. & > hr {
  496. display: inline-block;
  497. margin: 0 3px;
  498. border-width: 0 0 0 1px;
  499. border-style: none none none solid;
  500. border-color: transparent transparent transparent
  501. darken($simple-background-color, 24%);
  502. padding: 0;
  503. width: 0;
  504. height: 27px;
  505. background: transparent;
  506. }
  507. }
  508. .character-counter__wrapper {
  509. align-self: center;
  510. margin-right: 4px;
  511. }
  512. .privacy-dropdown.active {
  513. .privacy-dropdown__value {
  514. background: $simple-background-color;
  515. border-radius: 4px 4px 0 0;
  516. box-shadow: 0 -4px 4px rgba($base-shadow-color, 0.1);
  517. .icon-button {
  518. transition: none;
  519. }
  520. &.active {
  521. background: $ui-highlight-color;
  522. .icon-button {
  523. color: $primary-text-color;
  524. }
  525. }
  526. }
  527. &.top .privacy-dropdown__value {
  528. border-radius: 0 0 4px 4px;
  529. }
  530. .privacy-dropdown__dropdown {
  531. display: block;
  532. box-shadow: 2px 4px 6px rgba($base-shadow-color, 0.1);
  533. }
  534. }
  535. .privacy-dropdown__dropdown {
  536. border-radius: 4px;
  537. box-shadow: 2px 4px 15px rgba($base-shadow-color, 0.4);
  538. background: $simple-background-color;
  539. overflow: hidden;
  540. transform-origin: 50% 0;
  541. }
  542. .privacy-dropdown__option {
  543. display: flex;
  544. align-items: center;
  545. padding: 10px;
  546. color: $inverted-text-color;
  547. cursor: pointer;
  548. .privacy-dropdown__option__content {
  549. flex: 1 1 auto;
  550. color: $lighter-text-color;
  551. &:not(:first-child) {
  552. margin-left: 10px;
  553. }
  554. strong {
  555. display: block;
  556. color: $inverted-text-color;
  557. font-weight: 500;
  558. }
  559. }
  560. &:hover,
  561. &.active {
  562. background: $ui-highlight-color;
  563. color: $primary-text-color;
  564. .privacy-dropdown__option__content {
  565. color: $primary-text-color;
  566. strong {
  567. color: $primary-text-color;
  568. }
  569. }
  570. }
  571. &.active:hover {
  572. background: lighten($ui-highlight-color, 4%);
  573. }
  574. }
  575. .compose-form__publish {
  576. display: flex;
  577. justify-content: flex-end;
  578. min-width: 0;
  579. flex: 0 0 auto;
  580. column-gap: 5px;
  581. .compose-form__publish-button-wrapper {
  582. overflow: hidden;
  583. padding-top: 10px;
  584. button {
  585. padding: 7px 10px;
  586. text-align: center;
  587. }
  588. & > .side_arm {
  589. width: 36px;
  590. }
  591. }
  592. }
  593. .language-dropdown {
  594. &__dropdown {
  595. background: $simple-background-color;
  596. box-shadow: 2px 4px 15px rgba($base-shadow-color, 0.4);
  597. border-radius: 4px;
  598. overflow: hidden;
  599. z-index: 2;
  600. &.top {
  601. transform-origin: 50% 100%;
  602. }
  603. &.bottom {
  604. transform-origin: 50% 0;
  605. }
  606. .emoji-mart-search {
  607. padding-right: 10px;
  608. }
  609. .emoji-mart-search-icon {
  610. right: 10px + 5px;
  611. }
  612. .emoji-mart-scroll {
  613. padding: 0 10px 10px;
  614. }
  615. &__results {
  616. &__item {
  617. cursor: pointer;
  618. color: $inverted-text-color;
  619. font-weight: 500;
  620. padding: 10px;
  621. border-radius: 4px;
  622. &:focus,
  623. &:active,
  624. &:hover {
  625. background: $ui-secondary-color;
  626. }
  627. &__common-name {
  628. color: $darker-text-color;
  629. }
  630. &.active {
  631. background: $ui-highlight-color;
  632. color: $primary-text-color;
  633. outline: 0;
  634. .language-dropdown__dropdown__results__item__common-name {
  635. color: $secondary-text-color;
  636. }
  637. &:hover {
  638. background: lighten($ui-highlight-color, 4%);
  639. }
  640. }
  641. }
  642. }
  643. }
  644. }