[React] styled-components에서 Pseudo selector &을 생략하면 오류

2023. 10. 4. 16:31·개발/React
728x90
반응형

sytled-components에서 Pseudo selector로 사용되는 &을 생략한 코드들의 css가 적용되지 않는 오류를 발견했다.

"styled-components": "^6.0.4"

버전은 다음과 같이 사용하고 있었다.

 

일단 아래에 있는 코드들을 찾아서 급한대로 모든 코드에 &을 붙여 임시적으로 해결한 상태이다.

:nth-child
:first-child
:last-child
::before
::after
:focus

 

styled-components github issues

첫 이슈 - v5 에서 v6 으로 마이그레이션 문제

 

Migration problems from v5 to v6 · Issue #4096 · styled-components/styled-components

Hi! Found a lot of bugs we have a lot of storybook components at work and after updating styled-components from 5.3.11 to 6.0.4 many of them broke. I did the transition strictly according to the do...

github.com

 

내가 겪은 문제와 동일한 이슈

 

Undocumented pseudoselector breaking change between v5 and v6 · Issue #4180 · styled-components/styled-components

System: OS: macOS 10.15.7 CPU: (8) x64 Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz Memory: 55.38 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 18.9.0 - /usr/local/bin/node Yarn: 1.22.19 - /u...

github.com

 

 

Pseudo selectors no longer work without & · Issue #4177 · styled-components/styled-components

Environment System: OS: Linux 6.1 Debian GNU/Linux 11 (bullseye) 11 (bullseye) CPU: (2) x64 AMD EPYC Memory: 1.20 GB / 2.01 GB Container: Yes Shell: 5.1.4 - /bin/bash Binaries: Node: 16.17.0 - /usr...

github.com

 

728x90
반응형

'개발 > React' 카테고리의 다른 글

[React] React Modal 어디까지 만들어봤니?  (0) 2024.10.24
[React] react template 만들어놓기  (0) 2024.02.12
[React] React.memo 최적화  (1) 2023.09.26
[React] react-csv + recoil 로 csv다운로드 구현  (0) 2023.09.01
[React] Redux vs Recoil  (0) 2023.06.26
'개발/React' 카테고리의 다른 글
  • [React] React Modal 어디까지 만들어봤니?
  • [React] react template 만들어놓기
  • [React] React.memo 최적화
  • [React] react-csv + recoil 로 csv다운로드 구현
TeTedo.
TeTedo.
  • TeTedo.
    TeTedo 개발 일기
    TeTedo.
  • 전체
    오늘
    어제
    • 분류 전체보기 (319)
      • 개발 (274)
        • Article (4)
        • 정리 (21)
        • Spring Boot (17)
        • JPA (2)
        • JAVA (6)
        • Database (4)
        • 자료구조 (11)
        • 알고리즘 (32)
        • React (20)
        • Docker (10)
        • node.js (18)
        • Devops (11)
        • Linux (4)
        • TypeScript (3)
        • Go (10)
        • HyperLedger (4)
        • BlockChain (43)
        • html, css, js (48)
        • CS (3)
        • AWS (3)
      • 모아두고 나중에 쓰기 (3)
      • 팀프로젝트 (18)
        • SNS(키보드워리어) (9)
        • close_sea (9)
      • 개인프로젝트 (1)
        • Around Flavor (1)
        • CHAM (13)
        • ethFruitShop (5)
      • 독서 (0)
        • 스프링부트와 AWS로 혼자 구현하는 웹 서비스 (0)
  • 블로그 메뉴

    • 홈
    • 개발일기
    • CS
    • 실습
    • 코딩테스트
    • 웹
    • Go
    • node.js
    • 팀플
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    컨테이너
    erc20
    30일 챌린지
    명령어
    하이퍼레저
    html
    React
    도커
    프로그래머스
    node.js
    go언어
    블록체인
    go
    30일챌린지
    js
    CSS
    mysql
    node
    nodejs
    ERC721
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.1
TeTedo.
[React] styled-components에서 Pseudo selector &을 생략하면 오류
상단으로

티스토리툴바