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.

493 lines
9.3 KiB

6 years ago
6 years ago
  1. .composer {
  2. padding: 10px;
  3. }
  4. .no-reduce-motion .composer--spoiler {
  5. transition: height 0.4s ease, opacity 0.4s ease;
  6. }
  7. .composer--spoiler {
  8. height: 0;
  9. transform-origin: bottom;
  10. opacity: 0.0;
  11. &.composer--spoiler--visible {
  12. height: 47px;
  13. opacity: 1.0;
  14. }
  15. input {
  16. display: block;
  17. box-sizing: border-box;
  18. margin: 0;
  19. border: none;
  20. border-radius: 4px;
  21. padding: 10px;
  22. width: 100%;
  23. outline: 0;
  24. color: $inverted-text-color;
  25. background: $simple-background-color;
  26. font-size: 14px;
  27. font-family: inherit;
  28. resize: vertical;
  29. &:focus { outline: 0 }
  30. @include single-column('screen and (max-width: 630px)') { font-size: 16px }
  31. }
  32. }
  33. .composer--warning {
  34. color: $inverted-text-color;
  35. margin-bottom: 15px;
  36. background: $ui-primary-color;
  37. box-shadow: 0 2px 6px rgba($base-shadow-color, 0.3);
  38. padding: 8px 10px;
  39. border-radius: 4px;
  40. font-size: 13px;
  41. font-weight: 400;
  42. a {
  43. color: $lighter-text-color;
  44. font-weight: 500;
  45. text-decoration: underline;
  46. &:active,
  47. &:focus,
  48. &:hover { text-decoration: none }
  49. }
  50. }
  51. .composer--reply {
  52. margin: 0 0 10px;
  53. border-radius: 4px;
  54. padding: 10px;
  55. background: $ui-primary-color;
  56. & > header {
  57. margin-bottom: 5px;
  58. overflow: hidden;
  59. & > .account.small { color: $inverted-text-color; }
  60. & > .cancel {
  61. float: right;
  62. line-height: 24px;
  63. }
  64. }
  65. & > .content {
  66. position: relative;
  67. margin: 10px 0;
  68. padding: 0 12px;
  69. font-size: 14px;
  70. line-height: 20px;
  71. color: $inverted-text-color;
  72. word-wrap: break-word;
  73. font-weight: 400;
  74. overflow: visible;
  75. white-space: pre-wrap;
  76. padding-top: 5px;
  77. p {
  78. margin-bottom: 20px;
  79. &:last-child { margin-bottom: 0 }
  80. }
  81. a {
  82. color: $lighter-text-color;
  83. text-decoration: none;
  84. &:hover { text-decoration: underline }
  85. &.mention {
  86. &:hover {
  87. text-decoration: none;
  88. span { text-decoration: underline }
  89. }
  90. }
  91. }
  92. }
  93. .emojione {
  94. width: 20px;
  95. height: 20px;
  96. margin: -5px 0 0;
  97. }
  98. }
  99. .emoji-picker-dropdown {
  100. position: absolute;
  101. right: 5px;
  102. top: 5px;
  103. ::-webkit-scrollbar-track:hover,
  104. ::-webkit-scrollbar-track:active {
  105. background-color: rgba($base-overlay-background, 0.3);
  106. }
  107. }
  108. .composer--textarea {
  109. position: relative;
  110. & > label {
  111. .textarea {
  112. display: block;
  113. box-sizing: border-box;
  114. margin: 0;
  115. border: none;
  116. border-radius: 4px 4px 0 0;
  117. padding: 10px 32px 0 10px;
  118. width: 100%;
  119. min-height: 100px;
  120. outline: 0;
  121. color: $inverted-text-color;
  122. background: $simple-background-color;
  123. font-size: 14px;
  124. font-family: inherit;
  125. resize: none;
  126. &:disabled { background: $ui-secondary-color }
  127. &:focus { outline: 0 }
  128. @include single-column('screen and (max-width: 630px)') { font-size: 16px }
  129. @include limited-single-column('screen and (max-width: 600px)') {
  130. height: 100px !important; // prevent auto-resize textarea
  131. resize: vertical;
  132. }
  133. }
  134. }
  135. }
  136. .composer--textarea--icons {
  137. display: block;
  138. position: absolute;
  139. top: 29px;
  140. right: 5px;
  141. bottom: 5px;
  142. overflow: hidden;
  143. & > .textarea_icon {
  144. display: block;
  145. margin: 2px 0 0 2px;
  146. width: 24px;
  147. height: 24px;
  148. color: $lighter-text-color;
  149. font-size: 18px;
  150. line-height: 24px;
  151. text-align: center;
  152. opacity: .8;
  153. }
  154. }
  155. .composer--textarea--suggestions {
  156. display: block;
  157. position: absolute;
  158. box-sizing: border-box;
  159. top: 100%;
  160. border-radius: 0 0 4px 4px;
  161. padding: 6px;
  162. width: 100%;
  163. color: $inverted-text-color;
  164. background: $ui-secondary-color;
  165. box-shadow: 4px 4px 6px rgba($base-shadow-color, 0.4);
  166. font-size: 14px;
  167. z-index: 99;
  168. &[hidden] { display: none }
  169. }
  170. .composer--textarea--suggestions--item {
  171. display: flex;
  172. flex-direction: row;
  173. align-items: center;
  174. justify-content: flex-start;
  175. border-radius: 4px;
  176. padding: 10px;
  177. font-size: 14px;
  178. line-height: 18px;
  179. overflow: hidden;
  180. cursor: pointer;
  181. &:hover,
  182. &:focus,
  183. &:active,
  184. &.selected { background: darken($ui-secondary-color, 10%) }
  185. & > .emoji {
  186. img {
  187. display: block;
  188. float: left;
  189. margin-right: 8px;
  190. width: 18px;
  191. height: 18px;
  192. }
  193. }
  194. & > .account.small {
  195. .display-name {
  196. & > span { color: $lighter-text-color }
  197. }
  198. }
  199. }
  200. .composer--upload_form {
  201. padding: 5px;
  202. color: $inverted-text-color;
  203. background: $simple-background-color;
  204. font-size: 14px;
  205. & > .content {
  206. display: flex;
  207. flex-direction: row;
  208. flex-wrap: wrap;
  209. font-family: inherit;
  210. overflow: hidden;
  211. }
  212. }
  213. .composer--upload_form--item {
  214. flex: 1 1 0;
  215. margin: 5px;
  216. min-width: 40%;
  217. & > div {
  218. position: relative;
  219. border-radius: 4px;
  220. height: 140px;
  221. width: 100%;
  222. background-position: center;
  223. background-size: cover;
  224. background-repeat: no-repeat;
  225. overflow: hidden;
  226. input {
  227. display: block;
  228. position: absolute;
  229. box-sizing: border-box;
  230. bottom: 0;
  231. left: 0;
  232. margin: 0;
  233. border: 0;
  234. padding: 10px;
  235. width: 100%;
  236. color: $secondary-text-color;
  237. background: linear-gradient(0deg, rgba($base-shadow-color, 0.8) 0, rgba($base-shadow-color, 0.35) 80%, transparent);
  238. font-size: 14px;
  239. font-family: inherit;
  240. font-weight: 500;
  241. opacity: 0;
  242. z-index: 2;
  243. transition: opacity .1s ease;
  244. &:focus { color: $white }
  245. &::placeholder {
  246. opacity: 0.54;
  247. color: $secondary-text-color;
  248. }
  249. }
  250. & > .close { mix-blend-mode: difference }
  251. }
  252. &.active {
  253. & > div {
  254. input { opacity: 1 }
  255. }
  256. }
  257. }
  258. .composer--upload_form--actions {
  259. background: linear-gradient(180deg, rgba($base-shadow-color, 0.8) 0, rgba($base-shadow-color, 0.35) 80%, transparent);
  260. display: flex;
  261. align-items: flex-start;
  262. justify-content: space-between;
  263. opacity: 0;
  264. transition: opacity .1s ease;
  265. .icon-button {
  266. flex: 0 1 auto;
  267. color: $ui-secondary-color;
  268. font-size: 14px;
  269. font-weight: 500;
  270. padding: 10px;
  271. font-family: inherit;
  272. &:hover,
  273. &:focus,
  274. &:active {
  275. color: lighten($ui-secondary-color, 4%);
  276. }
  277. }
  278. &.active {
  279. opacity: 1;
  280. }
  281. }
  282. .composer--upload_form--progress {
  283. display: flex;
  284. padding: 10px;
  285. color: $darker-text-color;
  286. overflow: hidden;
  287. & > .fa {
  288. font-size: 34px;
  289. margin-right: 10px;
  290. }
  291. & > .message {
  292. flex: 1 1 auto;
  293. & > span {
  294. display: block;
  295. font-size: 12px;
  296. font-weight: 500;
  297. text-transform: uppercase;
  298. }
  299. & > .backdrop {
  300. position: relative;
  301. margin-top: 5px;
  302. border-radius: 6px;
  303. width: 100%;
  304. height: 6px;
  305. background: $ui-base-lighter-color;
  306. & > .tracker {
  307. position: absolute;
  308. top: 0;
  309. left: 0;
  310. height: 6px;
  311. border-radius: 6px;
  312. background: $ui-highlight-color;
  313. }
  314. }
  315. }
  316. }
  317. .composer--options {
  318. padding: 10px;
  319. background: darken($simple-background-color, 8%);
  320. box-shadow: inset 0 5px 5px rgba($base-shadow-color, 0.05);
  321. border-radius: 0 0 4px 4px;
  322. height: 27px;
  323. & > * {
  324. display: inline-block;
  325. box-sizing: content-box;
  326. padding: 0 3px;
  327. height: 27px;
  328. line-height: 27px;
  329. vertical-align: bottom;
  330. }
  331. & > hr {
  332. display: inline-block;
  333. margin: 0 3px;
  334. border-width: 0 0 0 1px;
  335. border-style: none none none solid;
  336. border-color: transparent transparent transparent darken($simple-background-color, 24%);
  337. padding: 0;
  338. width: 0;
  339. height: 27px;
  340. background: transparent;
  341. }
  342. }
  343. .composer--options--dropdown {
  344. &.open {
  345. & > .value {
  346. border-radius: 4px 4px 0 0;
  347. box-shadow: 0 -4px 4px rgba($base-shadow-color, 0.1);
  348. color: $primary-text-color;
  349. background: $ui-highlight-color;
  350. transition: none;
  351. }
  352. &.top {
  353. & > .value {
  354. border-radius: 0 0 4px 4px;
  355. box-shadow: 0 4px 4px rgba($base-shadow-color, 0.1);
  356. }
  357. }
  358. }
  359. }
  360. .composer--options--dropdown--content {
  361. position: absolute;
  362. border-radius: 4px;
  363. box-shadow: 2px 4px 15px rgba($base-shadow-color, 0.4);
  364. background: $simple-background-color;
  365. overflow: hidden;
  366. transform-origin: 50% 0;
  367. }
  368. .composer--options--dropdown--content--item {
  369. display: flex;
  370. align-items: center;
  371. padding: 10px;
  372. color: $inverted-text-color;
  373. cursor: pointer;
  374. & > .content {
  375. flex: 1 1 auto;
  376. color: $lighter-text-color;
  377. &:not(:first-child) { margin-left: 10px }
  378. strong {
  379. display: block;
  380. color: $inverted-text-color;
  381. font-weight: 500;
  382. }
  383. }
  384. &:hover,
  385. &.active {
  386. background: $ui-highlight-color;
  387. color: $primary-text-color;
  388. & > .content {
  389. color: $primary-text-color;
  390. strong { color: $primary-text-color }
  391. }
  392. }
  393. &.active:hover { background: lighten($ui-highlight-color, 4%) }
  394. }
  395. .composer--publisher {
  396. padding-top: 10px;
  397. text-align: right;
  398. white-space: nowrap;
  399. overflow: hidden;
  400. & > .count {
  401. display: inline-block;
  402. margin: 0 16px 0 8px;
  403. font-size: 16px;
  404. line-height: 36px;
  405. }
  406. & > .primary {
  407. display: inline-block;
  408. margin: 0;
  409. padding: 0 10px;
  410. text-align: center;
  411. }
  412. & > .side_arm {
  413. display: inline-block;
  414. margin: 0 2px 0 0;
  415. padding: 0;
  416. width: 36px;
  417. text-align: center;
  418. }
  419. &.over {
  420. & > .count { color: $warning-red }
  421. }
  422. }