style.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. // 댓글
  2. #comments {
  3. .comment-header {
  4. display: grid;
  5. grid-template-columns: 1fr auto auto;
  6. align-items: center;
  7. margin-bottom: 10px;
  8. gap: 10px;
  9. article {
  10. &:nth-of-type(1) {
  11. font-weight: bold;
  12. > em {
  13. font-style: normal;
  14. color: #d51b28;
  15. }
  16. }
  17. &:nth-of-type(2) {
  18. height: 100%;
  19. select {
  20. height: inherit;
  21. }
  22. }
  23. }
  24. }
  25. .write-form {
  26. display: grid;
  27. grid-template-rows: 1fr auto;
  28. grid-template-columns: auto 1fr auto;
  29. grid-template-areas: "thumb textarea textarea"
  30. "thumb controls buttons";
  31. row-gap: 7px;
  32. column-gap: 10px;
  33. div {
  34. &:nth-of-type(1) {
  35. grid-area: thumb;
  36. }
  37. &:nth-of-type(2) {
  38. grid-area: textarea;
  39. > textarea {
  40. width: 100%;
  41. resize: none;
  42. overflow-y: hidden;
  43. }
  44. }
  45. &:nth-of-type(3) {
  46. grid-area: controls;
  47. display: flex;
  48. flex-direction: row;
  49. flex-wrap: nowrap;
  50. gap: 7px;
  51. }
  52. &:nth-of-type(4) {
  53. grid-area: buttons;
  54. display: flex;
  55. flex-direction: row;
  56. flex-wrap: nowrap;
  57. justify-content: flex-end;
  58. gap: 10px;
  59. }
  60. }
  61. }
  62. .edit-form {
  63. display: grid;
  64. grid-template-rows: 1fr auto;
  65. grid-template-columns: 1fr auto;
  66. grid-template-areas: "textarea textarea"
  67. "controls buttons";
  68. row-gap: 7px;
  69. column-gap: 10px;
  70. div {
  71. &:nth-of-type(1) {
  72. grid-area: textarea !important;
  73. > textarea {
  74. width: 100%;
  75. resize: none;
  76. overflow-y: hidden;
  77. }
  78. }
  79. &:nth-of-type(2) {
  80. grid-area: controls !important ;
  81. display: flex;
  82. flex-direction: row;
  83. flex-wrap: nowrap;
  84. gap: 7px;
  85. }
  86. &:nth-of-type(3) {
  87. grid-area: buttons !important;
  88. display: flex;
  89. flex-direction: row;
  90. flex-wrap: nowrap;
  91. justify-content: flex-end;
  92. gap: 10px;
  93. }
  94. }
  95. }
  96. .comment-list {
  97. position: relative;
  98. ol {
  99. list-style: none;
  100. display: flex;
  101. flex-direction: column;
  102. margin: 0;
  103. gap: 10px;
  104. > li {
  105. display: grid;
  106. grid-template-rows: auto 1fr auto;
  107. grid-template-columns: auto 1fr auto;
  108. grid-template-areas: "thumb header controls"
  109. "thumb content content"
  110. "_ footer footer";
  111. row-gap: 7px;
  112. column-gap: 10px;
  113. margin-bottom: 10px;
  114. border-bottom: 1px solid #eee;
  115. div {
  116. // 댓글 작성자 사진
  117. &:nth-of-type(1) {
  118. grid-area: thumb;
  119. }
  120. // 댓글 작성자, 작성일시
  121. &:nth-of-type(2) {
  122. grid-area: header;
  123. > ul {
  124. display: flex;
  125. flex-wrap: wrap;
  126. column-gap: 7px;
  127. row-gap: 0;
  128. list-style: none;
  129. li {
  130. position: relative;
  131. // 가운데 점 추가
  132. &::after {
  133. content: '·';
  134. margin-left: 7px;
  135. color: #999;
  136. }
  137. // 마지막 li는 점 숨김
  138. &:last-child::after {
  139. content: '';
  140. margin: 0;
  141. }
  142. }
  143. }
  144. }
  145. // 댓글 관리
  146. &:nth-of-type(3) {
  147. grid-area: controls;
  148. > button {
  149. padding: 0 15px;
  150. &:hover, &:focus, &:active {
  151. background-color: #f0f0f0;
  152. outline: 1px solid #dedede;
  153. border-radius: 3px;
  154. }
  155. }
  156. }
  157. // 댓글 내용
  158. &:nth-of-type(4) {
  159. grid-area: content;
  160. }
  161. // 좋아요, 싫어요, 답글
  162. &:nth-of-type(5) {
  163. grid-area: footer;
  164. display: flex;
  165. flex-direction: row;
  166. flex-wrap: nowrap;
  167. row-gap: 0;
  168. position: relative;
  169. top: -15px;
  170. > button {
  171. color: #666;
  172. /*
  173. // 좋아요, 싫어요 버튼 스타일
  174. &:nth-of-type(1),
  175. &:nth-of-type(2) {
  176. padding: 0 15px;
  177. outline: 1px solid #dedede;
  178. border-radius: 3px;
  179. &:hover, &:focus, &:active {
  180. background-color: #f0f0f0;
  181. }
  182. }
  183. */
  184. &:nth-of-type(1) {
  185. color: #0D6295;
  186. &:hover {
  187. color: #e47911;
  188. text-decoration: underline;
  189. }
  190. }
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. }