Skip to content

Commit 85c4d01

Browse files
committed
comments update
1 parent bc4891b commit 85c4d01

1 file changed

Lines changed: 30 additions & 29 deletions

File tree

components/Comments/styles.css.ts

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { style } from '@vanilla-extract/css';
1+
import { style, globalStyle } from '@vanilla-extract/css';
22

33
export const commentsContainer = style({
44
margin: '2rem 0',
@@ -11,27 +11,29 @@ export const commentForm = style({
1111
flexDirection: 'column',
1212
gap: '1rem',
1313
marginBottom: '2rem',
14-
15-
selectors: {
16-
'& div': {
17-
display: 'flex',
18-
flexDirection: 'column',
19-
gap: '0.5rem',
20-
},
21-
'& label': {
22-
fontWeight: 'bold',
23-
},
24-
'& input, & textarea': {
25-
padding: '0.5rem',
26-
border: '1px solid #ddd',
27-
borderRadius: '4px',
28-
fontSize: '1rem',
29-
},
30-
'& textarea': {
31-
minHeight: '100px',
32-
resize: 'vertical',
33-
}
34-
}
14+
});
15+
16+
// 전역 스타일 적용
17+
globalStyle(`${commentForm} div`, {
18+
display: 'flex',
19+
flexDirection: 'column',
20+
gap: '0.5rem',
21+
});
22+
23+
globalStyle(`${commentForm} label`, {
24+
fontWeight: 'bold',
25+
});
26+
27+
globalStyle(`${commentForm} input, ${commentForm} textarea`, {
28+
padding: '0.5rem',
29+
border: '1px solid #ddd',
30+
borderRadius: '4px',
31+
fontSize: '1rem',
32+
});
33+
34+
globalStyle(`${commentForm} textarea`, {
35+
minHeight: '100px',
36+
resize: 'vertical',
3537
});
3638

3739
export const submitButton = style({
@@ -65,13 +67,12 @@ export const commentHeader = style({
6567
justifyContent: 'space-between',
6668
alignItems: 'center',
6769
marginBottom: '0.5rem',
68-
69-
selectors: {
70-
'& span': {
71-
color: '#666',
72-
fontSize: '0.875rem'
73-
}
74-
}
70+
});
71+
72+
// 전역 스타일 적용
73+
globalStyle(`${commentHeader} span`, {
74+
color: '#666',
75+
fontSize: '0.875rem'
7576
});
7677

7778
export const commentBody = style({

0 commit comments

Comments
 (0)