Skip to content

Commit

Permalink
fix: bump stylis to 4.3.1 to resolve issue with leaking nested selectors
Browse files Browse the repository at this point in the history
In some circumstances, prior versions of stylis would not properly
apply the component namespace to a nested rule when using comma-joined
selector chains, e.g. `&.foo, p:not(:last-child)`.
  • Loading branch information
quantizor committed Dec 27, 2023
1 parent 3cccfe4 commit f9f0168
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/styled-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"csstype": "3.1.2",
"postcss": "8.4.31",
"shallowequal": "1.1.0",
"stylis": "4.3.0",
"stylis": "4.3.1",
"tslib": "2.5.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/styled-components/src/test/styles.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ describe('with styles', () => {
`);
});

it('comma-joined selector chains should be namespaced', () => {
it('comma-joined complex selector chains should be namespaced', () => {
const Comp = styled.h1`
&.foo,
p:not(:last-child) {
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10033,7 +10033,7 @@ __metadata:
rollup-plugin-sourcemaps: "npm:0.6.3"
rollup-plugin-terser: "npm:7.0.2"
shallowequal: "npm:1.1.0"
stylis: "npm:4.3.0"
stylis: "npm:4.3.1"
stylis-plugin-rtl: "npm:2.1.1"
ts-toolbelt: "npm:9.6.0"
tslib: "npm:2.5.0"
Expand Down Expand Up @@ -10125,10 +10125,10 @@ __metadata:
languageName: node
linkType: hard

"stylis@npm:4.3.0":
version: 4.3.0
resolution: "stylis@npm:4.3.0"
checksum: 5a9f7e0cf2a15591efaacc1c6416a8785d2b57522cd38bb8e0a81a03c23d3bea2363659fa5f9d486a73d1b6ebaf1d32826ce1c1974c95afdb5b495d98acb25c0
"stylis@npm:4.3.1":
version: 4.3.1
resolution: "stylis@npm:4.3.1"
checksum: 33e8ebd2bfa5f0bd0215f718dc2d3be896e1d00c5bcaeb9a4ae03cf239db6867af9eee230f57229bf1c29499357073ba3e6b547484ba1db2f5de1e8be7d4eee9
languageName: node
linkType: hard

Expand Down

0 comments on commit f9f0168

Please # to comment.