COLOR
-
색깔 적용 안됨개발공부/TailwindCss 2023. 12. 12. 20:14
최근에 지인들과 새로운 프로젝트를 진행하기로 했다. (Next.js와 Tailwind css를 사용) 오늘은 프로젝트에서 발생했던 문제와 내가 시도 했던 방법들을 공유하고자 한다. 문제 발생 Tailwind css를 사용했는데 다른 거 다 되는데 색깔만 적용되지 않는 문제가 발생했다. (폰트, 배경 등) 1차 해결 방법 구글의 도움 받아 1차 해결 방법을 찾았다. 바로 @layer를 사용해 색깔을 정의하는 방법이다. @layer { .text-white { color: white; } } .title_section { @apply flex flex-col p-[30px] font-bold text-5xl text-white; } 하지만 이 방법을 적용한 뒤에 글자 색깔을 바꿀 수 있었지만, 혼자 생각해봤..