stitchesjs / stitches

[Not Actively Maintained] CSS-in-JS with near-zero runtime, SSR, multi-variant support, and a best-in-class developer experience.
https://stitches.dev
MIT License
7.73k stars 249 forks source link

Selector by react component doesnt work [`${Component} &`]: { ... } #1079

Closed hyze2d closed 1 year ago

hyze2d commented 1 year ago

Bug report

Describe the bug

I am trying to use nested selector by React component

.toString is defined, so it should work

am i missing something? I do believe when i was trying out stitches for the first time it worked for me but now it doesnt

To Reproduce

Here's and <Card> for example <a rel="noreferrer nofollow" target="_blank" href="https://stackblitz.com/edit/react-ts-banhjw?file=App.tsx">https://stackblitz.com/edit/react-ts-banhjw?file=App.tsx</a></p> <h2>Expected behavior</h2> <p>Styles should apply by provided selector referencing styled component</p> <h2>Screenshots</h2> <p>-</p> <h2>System information</h2> <p>Mac OS (latest)</p> <h2>Additional context</h2> <p>Nope</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>