File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { style } from '@vanilla-extract/css' ;
1+ import { style , globalStyle } from '@vanilla-extract/css' ;
22
33export 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
3739export 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
7778export const commentBody = style ( {
You can’t perform that action at this time.
0 commit comments