Closed Rick-Young closed 1 year ago
Edited your comment since the highlighting was broken. I'll investigate it this week
I don't think this is a bug. In the places where you want to override headerLogo
and it's other children, you should use & .headerLogo
instead of &.headerLogo
(notice the space between &
and .headerLogo
).
So, in this case &.headerContainer
is correct, since you want to style the root (which also contains the class headerContainer
), but the other needs to contain the space so that it's descendants and not the same element.
You can see the way to do this in the stitches docs here - https://stitches.dev/docs/styling#descendant-selector.
Please let me know if this made sense for you and if you need any help.
You are correct this is not a bug. I didn't look at the stiches document. Once I added the space between the & and the class it work. Thanks for your help!
What package has an issue
@svelteuidev/core
A clear and concise description of what the bug is
After release 0.9.0 it looks like now using the createStyles is not working properly. I have been using classes to style my pages.
Issue: Lost the nested styling around {getStyles()} being set and then accessing the nested styles like "headerLogo" or any other css style wrapped by the {getStyles()}. I now only see that the "&.headerContainer" works
Example HTML code below.
Exampl CSS Styles code:
In which browser(s) did the problem occur?
No response
Steps To Reproduce
1 - Create a new page
2 -
import { createStyles } from '@sevltedev/core'
3 - Create a new useStyles based on the theme per the create-styles page
4 - Create a header tag and set the class to contain {getStyles()} and some other classes. Example below
<header class="{getStyles()} headerContainer at_headerContainer">
5 - Next create some HTML elements inside the header tag and add some class names that you can style. Example below
6 - Set some css styles on some of the elements to see the issue.
Do you know how to fix the issue
Yes
Are you willing to participate in fixing this issue and create a pull request with the fix
Yes
Relevant Assets
No response