Skip to content

Commit 535b6c9

Browse files
committed
댓글 아이템 UI 수정
1 parent 59f11d0 commit 535b6c9

File tree

4 files changed

+97
-26
lines changed

4 files changed

+97
-26
lines changed

src/components/posts/[id]/Comments/CommentForm/index.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,6 @@ export const CommentForm = ({ onSubmit, isAuthenticated }: CommentFormProps) =>
8282
disabled={isSubmitting}
8383
/>
8484
<div className={styles.comment_form_footer}>
85-
<div className={styles.markdown_hint}>
86-
<a
87-
href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax"
88-
target="_blank"
89-
rel="noopener noreferrer"
90-
className={styles.markdown_link}
91-
>
92-
Markdown
93-
</a>
94-
을 사용할 수 있습니다
95-
</div>
9685
<button
9786
type="submit"
9887
className={styles.submit_button}

src/components/posts/[id]/Comments/CommentForm/styles.module.scss

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
width: 100%;
4444
min-height: 80px;
4545
padding: 12px;
46-
border: 1px solid rgba(255, 255, 255, 0.1);
46+
border: 1px solid rgba(0, 0, 0, 0.15);
4747
border-radius: 6px;
4848
background: var(--background-color);
4949
color: var(--text-color);
@@ -52,6 +52,15 @@
5252
resize: none;
5353
transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
5454

55+
html[data-theme="dark"] & {
56+
border-color: rgba(255, 255, 255, 0.15);
57+
}
58+
59+
html[data-theme="light"] &,
60+
:root & {
61+
border-color: rgba(0, 0, 0, 0.15);
62+
}
63+
5564
&:focus {
5665
outline: none;
5766
border-color: var(--primary-color);
@@ -70,7 +79,7 @@
7079

7180
.comment_form_footer {
7281
display: flex;
73-
justify-content: space-between;
82+
justify-content: flex-end;
7483
align-items: center;
7584
}
7685

@@ -93,7 +102,7 @@
93102
padding: 8px 16px;
94103
background: var(--card-background-color);
95104
color: var(--text-color);
96-
border: 1px solid rgba(255, 255, 255, 0.15);
105+
border: 1px solid rgba(0, 0, 0, 0.15);
97106
border-radius: 6px;
98107
font-size: var(--p);
99108
font-weight: 500;
@@ -102,9 +111,25 @@
102111
box-shadow: inset 0 1px 2px var(--card-shadow-color-up),
103112
inset 0 -1px 2px var(--card-shadow-color-down);
104113

114+
html[data-theme="dark"] & {
115+
border-color: rgba(255, 255, 255, 0.15);
116+
}
117+
118+
html[data-theme="light"] &,
119+
:root & {
120+
border-color: rgba(0, 0, 0, 0.15);
121+
}
122+
105123
&:hover:not(:disabled) {
106-
background: rgba(255, 255, 255, 0.05);
107-
border-color: rgba(255, 255, 255, 0.25);
124+
html[data-theme="dark"] & {
125+
background: rgba(255, 255, 255, 0.05);
126+
border-color: rgba(255, 255, 255, 0.25);
127+
}
128+
html[data-theme="light"] &,
129+
:root & {
130+
background: rgba(0, 0, 0, 0.03);
131+
border-color: rgba(0, 0, 0, 0.25);
132+
}
108133
transform: translateY(1px);
109134
box-shadow: inset 0 1px 2px var(--card-shadow-color-down),
110135
inset 0 -1px 2px var(--card-shadow-color-up);

src/components/posts/[id]/Comments/CommentItem/styles.module.scss

Lines changed: 57 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22
width: 100%;
33
padding: 16px;
44
margin-bottom: 12px;
5-
background: rgba(255, 255, 255, 0.02);
6-
border: 1px solid rgba(255, 255, 255, 0.08);
75
border-radius: 6px;
86
transition: all 0.2s ease-in-out;
97

10-
&:hover {
8+
// 다크 테마 - 호버 스타일을 기본으로 적용
9+
html[data-theme="dark"] & {
1110
background: rgba(255, 255, 255, 0.04);
12-
border-color: rgba(255, 255, 255, 0.12);
11+
border: 1px solid rgba(255, 255, 255, 0.18);
12+
}
13+
14+
// 라이트 테마 - 호버 스타일을 기본으로 적용
15+
html[data-theme="light"] &,
16+
:root & {
17+
background: rgba(0, 0, 0, 0.02);
18+
border: 1px solid rgba(0, 0, 0, 0.18);
1319
}
1420
}
1521

@@ -75,13 +81,22 @@
7581
.action_button {
7682
padding: 4px 8px;
7783
background: transparent;
78-
border: 1px solid rgba(255, 255, 255, 0.1);
84+
border: 1px solid rgba(0, 0, 0, 0.15);
7985
border-radius: 4px;
8086
color: var(--secondary-color);
8187
font-size: var(--caption);
8288
cursor: pointer;
8389
transition: all 0.2s ease-in-out;
8490

91+
html[data-theme="dark"] & {
92+
border-color: rgba(255, 255, 255, 0.15);
93+
}
94+
95+
html[data-theme="light"] &,
96+
:root & {
97+
border-color: rgba(0, 0, 0, 0.15);
98+
}
99+
85100
&:hover {
86101
color: var(--text-color);
87102
border-color: rgba(255, 215, 0, 0.3);
@@ -123,10 +138,19 @@
123138
}
124139

125140
pre {
126-
background: rgba(0, 0, 0, 0.1);
141+
background: rgba(0, 0, 0, 0.05);
127142
padding: 12px;
128143
border-radius: 6px;
129144
overflow-x: auto;
145+
146+
html[data-theme="dark"] & {
147+
background: rgba(0, 0, 0, 0.2);
148+
}
149+
150+
html[data-theme="light"] &,
151+
:root & {
152+
background: rgba(0, 0, 0, 0.05);
153+
}
130154
}
131155

132156
a {
@@ -149,7 +173,7 @@
149173
width: 100%;
150174
min-height: 100px;
151175
padding: 12px;
152-
border: 1px solid rgba(255, 255, 255, 0.1);
176+
border: 1px solid rgba(0, 0, 0, 0.15);
153177
border-radius: 6px;
154178
background: var(--background-color);
155179
color: var(--text-color);
@@ -158,6 +182,15 @@
158182
resize: vertical;
159183
transition: border-color 0.2s ease-in-out;
160184

185+
html[data-theme="dark"] & {
186+
border-color: rgba(255, 255, 255, 0.15);
187+
}
188+
189+
html[data-theme="light"] &,
190+
:root & {
191+
border-color: rgba(0, 0, 0, 0.15);
192+
}
193+
161194
&:focus {
162195
outline: none;
163196
border-color: var(--primary-color);
@@ -179,11 +212,20 @@
179212
.cancel_button,
180213
.save_button {
181214
padding: 6px 12px;
182-
border: 1px solid rgba(255, 255, 255, 0.1);
215+
border: 1px solid rgba(0, 0, 0, 0.15);
183216
border-radius: 4px;
184217
font-size: var(--caption);
185218
cursor: pointer;
186219
transition: all 0.2s ease-in-out;
220+
221+
html[data-theme="dark"] & {
222+
border-color: rgba(255, 255, 255, 0.15);
223+
}
224+
225+
html[data-theme="light"] &,
226+
:root & {
227+
border-color: rgba(0, 0, 0, 0.15);
228+
}
187229
}
188230

189231
.cancel_button {
@@ -192,7 +234,13 @@
192234

193235
&:hover:not(:disabled) {
194236
color: var(--text-color);
195-
border-color: rgba(255, 255, 255, 0.2);
237+
html[data-theme="dark"] & {
238+
border-color: rgba(255, 255, 255, 0.25);
239+
}
240+
html[data-theme="light"] &,
241+
:root & {
242+
border-color: rgba(0, 0, 0, 0.25);
243+
}
196244
}
197245
}
198246

src/components/posts/[id]/Comments/styles.module.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
width: 100%;
33
margin-top: 48px;
44
padding: 24px 0;
5-
border-top: 1px solid rgba(255, 255, 255, 0.1);
5+
border-top: 1px solid rgba(0, 0, 0, 0.1);
6+
7+
html[data-theme="dark"] & {
8+
border-top-color: rgba(255, 255, 255, 0.1);
9+
}
10+
11+
html[data-theme="light"] &,
12+
:root & {
13+
border-top-color: rgba(0, 0, 0, 0.1);
14+
}
615
}
716

817
.comments_title {

0 commit comments

Comments
 (0)