style.scss 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. // 댓글
  2. #comments {
  3. // 댓글창 상단
  4. .comment-header {
  5. display: flex;
  6. flex-direction: row;
  7. flex-wrap: nowrap;
  8. align-items: center;
  9. margin-bottom: 0;
  10. gap: 10px;
  11. article {
  12. padding-bottom: 8px;
  13. // 댓글 수
  14. &:nth-of-type(1) {
  15. font-weight: bold;
  16. font-size: 1.25rem;
  17. padding-right: 10px;
  18. > em {
  19. font-style: normal;
  20. color: var(--color-danger);
  21. }
  22. }
  23. // 정렬
  24. &:nth-of-type(2) {
  25. height: 100%;
  26. select {
  27. height: inherit;
  28. }
  29. }
  30. }
  31. @media (max-width: 576px) {
  32. grid-template-columns: auto auto 1fr;
  33. }
  34. }
  35. // 댓글 입력 란
  36. .write-form {
  37. display: flex;
  38. flex-direction: row;
  39. justify-items: stretch;
  40. column-gap: 20px;
  41. padding: 10px 0;
  42. > div:nth-of-type(1) {
  43. img {
  44. width: clamp(1.5rem, 8vw, 4.5rem);
  45. max-height: 72px;
  46. @media (max-width: 364px) {
  47. display: none;
  48. }
  49. }
  50. }
  51. > div:last-of-type {
  52. display: grid;
  53. grid-template-rows: 1fr auto;
  54. grid-template-columns: 1fr auto;
  55. grid-template-areas: "textarea textarea"
  56. "controls buttons";
  57. width: 100%;
  58. row-gap: 6px;
  59. column-gap: 0;
  60. > div {
  61. &:nth-of-type(1) {
  62. grid-area: textarea;
  63. > textarea {
  64. width: 100%;
  65. resize: none;
  66. overflow-y: hidden;
  67. }
  68. }
  69. &:nth-of-type(2) {
  70. grid-area: controls;
  71. display: flex;
  72. flex-direction: row;
  73. column-gap: 7px;
  74. align-items: center;
  75. }
  76. &:nth-of-type(3) {
  77. grid-area: buttons;
  78. display: flex;
  79. flex-direction: row;
  80. flex-wrap: nowrap;
  81. justify-content: flex-end;
  82. gap: 8px;
  83. }
  84. }
  85. }
  86. }
  87. // 댓글 수정란
  88. .edit-form {
  89. display: grid;
  90. grid-template-rows: 1fr auto;
  91. grid-template-columns: 1fr auto;
  92. grid-template-areas: "textarea textarea"
  93. "controls buttons";
  94. row-gap: 6px;
  95. column-gap: 0;
  96. > div {
  97. &:nth-of-type(1) {
  98. grid-area: textarea;
  99. > textarea {
  100. width: 100%;
  101. resize: none;
  102. overflow-y: hidden;
  103. }
  104. }
  105. &:nth-of-type(2) {
  106. grid-area: controls;
  107. display: flex;
  108. flex-direction: row;
  109. column-gap: 7px;
  110. align-items: center;
  111. }
  112. &:nth-of-type(3) {
  113. grid-area: buttons;
  114. display: flex;
  115. flex-direction: row;
  116. flex-wrap: nowrap;
  117. justify-content: flex-end;
  118. gap: 8px;
  119. }
  120. }
  121. }
  122. // 멘션 자동완성
  123. .mention-suggestion {
  124. position: absolute;
  125. bottom: 100%;
  126. left: 0;
  127. right: 0;
  128. z-index: 10;
  129. background: var(--bg-page);
  130. border: 1px solid var(--border-default);
  131. border-radius: 6px;
  132. box-shadow: 0 2px 8px var(--shadow-color);
  133. max-height: 200px;
  134. overflow-y: auto;
  135. ul {
  136. list-style: none;
  137. margin: 0;
  138. padding: 4px 0;
  139. li {
  140. display: flex;
  141. align-items: center;
  142. gap: 10px;
  143. padding: 8px 12px;
  144. cursor: pointer;
  145. img {
  146. width: 28px;
  147. height: 28px;
  148. border-radius: 50%;
  149. object-fit: cover;
  150. }
  151. span {
  152. font-size: 0.875rem;
  153. font-weight: 500;
  154. }
  155. small {
  156. font-size: 0.75rem;
  157. color: var(--text-muted);
  158. }
  159. &.selected,
  160. &:hover {
  161. background: var(--bg-subtle);
  162. }
  163. }
  164. }
  165. }
  166. // QnA 답변 대기 안내
  167. .qna-pending-notice {
  168. text-align: center;
  169. padding: 2rem;
  170. color: var(--color-warning-text);
  171. background: var(--color-warning-bg);
  172. border: 1px solid rgba(202, 138, 4, 0.2);
  173. border-radius: 0.5rem;
  174. margin: 0 0 1rem 0;
  175. p {
  176. margin: 0.25rem 0;
  177. &:first-child {
  178. font-weight: 600;
  179. font-size: 1.05rem;
  180. }
  181. &:last-child {
  182. font-size: 0.875rem;
  183. color: #a16207;
  184. }
  185. }
  186. }
  187. // 댓글 목록
  188. .comment-list {
  189. position: relative;
  190. margin-top: 10px;
  191. border-top: 1px solid var(--border-default);
  192. border-bottom: 1px solid var(--border-default);
  193. ol {
  194. list-style: none;
  195. display: flex;
  196. flex-direction: column;
  197. width: 100%;
  198. margin: 0;
  199. gap: 0;
  200. > li {
  201. display: flex;
  202. flex-direction: row;
  203. column-gap: 20px;
  204. padding: 14px 0 10px 0;
  205. border-bottom: 1px solid var(--border-default);
  206. // 대댓글 래퍼는 그리드 해제
  207. &:has(> ol) {
  208. padding: 0;
  209. }
  210. // 댓글 작성자 사진
  211. > div:nth-of-type(1) {
  212. img {
  213. width: clamp(1.5rem, 8vw, 4.5rem);
  214. max-height: 72px;
  215. }
  216. @media (max-width: 364px) {
  217. display: none;
  218. }
  219. }
  220. // 댓글 정보들
  221. > div:last-of-type {
  222. display: grid;
  223. grid-template-rows: auto auto auto;
  224. grid-template-columns: 1fr auto;
  225. grid-template-areas: "header controls"
  226. "content content"
  227. "footer footer";
  228. width: 100%;
  229. row-gap: 8px;
  230. column-gap: 0;
  231. // 답글 폼 (article.write-form)
  232. > article:nth-of-type(1) {
  233. grid-column: 1 / -1;
  234. }
  235. @media (max-width: 364px) {
  236. row-gap: 0;
  237. }
  238. > div {
  239. // 댓글 작성자, 작성일시
  240. &:nth-of-type(1) {
  241. grid-area: header;
  242. > ul {
  243. display: flex;
  244. flex-wrap: wrap;
  245. column-gap: 7px;
  246. row-gap: 0;
  247. list-style: none;
  248. li {
  249. position: relative;
  250. // 가운데 점 추가
  251. &::after {
  252. content: '·';
  253. margin-left: 7px;
  254. color: var(--text-muted);
  255. }
  256. // 마지막 li는 점 숨김
  257. &:last-child::after {
  258. content: '';
  259. margin: 0;
  260. }
  261. > span {
  262. font-size: 0.875rem;
  263. font-weight: 500;
  264. }
  265. > small {
  266. font-size: 0.813rem;
  267. }
  268. }
  269. }
  270. }
  271. // 댓글 관리
  272. &:nth-of-type(2) {
  273. grid-area: controls;
  274. > button {
  275. padding: 0 4px;
  276. &:hover, &:focus, &:active {
  277. background-color: var(--bg-subtle);
  278. outline: 1px solid var(--border-default);
  279. border-radius: 3px;
  280. }
  281. }
  282. }
  283. // 댓글 내용
  284. &:nth-of-type(3) {
  285. grid-area: content;
  286. font-size: 0.938rem;
  287. > .mention {
  288. color: #550eaf;
  289. }
  290. // 첨부 파일
  291. section.file-embed {
  292. display: inline-block;
  293. width: max-content;
  294. max-width: 100%;
  295. padding: 5px 40px;
  296. border: 1px solid var(--border-strong);
  297. border-radius: 5px;
  298. background: var(--bg-elevated);
  299. margin: 5px 0;
  300. box-sizing: border-box;
  301. .file-icon svg {
  302. width: 19px;
  303. height: 19px;
  304. display: inline-block;
  305. vertical-align: sub;
  306. padding-right: 5px;
  307. }
  308. &.image-style-align-left {
  309. margin-left: 0;
  310. margin-right: auto;
  311. }
  312. &.image-style-align-center {
  313. display: block;
  314. margin-left: auto;
  315. margin-right: auto;
  316. }
  317. &.image-style-align-right {
  318. margin-left: auto;
  319. margin-right: 0;
  320. }
  321. &:hover {
  322. background-color: var(--bg-subtle);
  323. border-color: var(--text-link-hover);
  324. cursor: pointer;
  325. }
  326. }
  327. }
  328. // 답글/좋아요/싫어요
  329. &:nth-of-type(4) {
  330. grid-area: footer;
  331. position: relative;
  332. display: flex;
  333. flex-direction: row;
  334. flex-wrap: nowrap;
  335. gap: 0;
  336. > div {
  337. color: var(--text-secondary);
  338. // 답글
  339. &:nth-of-type(1) {
  340. flex-grow: 1;
  341. text-align: left;
  342. > button {
  343. color: var(--text-link);
  344. &:hover {
  345. color: var(--brand-orange);
  346. text-decoration: underline;
  347. }
  348. }
  349. }
  350. // 좋아요, 싫어요
  351. &:nth-of-type(2),
  352. &:nth-of-type(4) {
  353. > button {
  354. padding: 0 7px;
  355. border-radius: 3px;
  356. &:hover, &:focus, &:active {
  357. outline: 1px solid var(--border-default);
  358. background-color: var(--bg-subtle);
  359. }
  360. > svg {
  361. font-size: 0.875rem;
  362. }
  363. }
  364. }
  365. // 좋아요 수, 싫어요 수
  366. &:nth-of-type(3),
  367. &:nth-of-type(5) {
  368. padding: 0 8px 0 4px;
  369. > em {
  370. font-style: normal;
  371. font-size: 0.813rem;
  372. }
  373. }
  374. }
  375. }
  376. }
  377. }
  378. &:last-of-type {
  379. border-bottom: 0;
  380. }
  381. }
  382. }
  383. }
  384. }