You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* Reusable title component defined at page level since it's used in multiple components */
125
+
[data-component="title"] {
126
+
text-transform: uppercase;
127
+
font-weight: 400;
128
+
}
129
+
130
+
[data-component="install"] {
131
+
/* install-specific styles */
132
+
}
133
+
134
+
[data-component="screenshots"] {
135
+
/* screenshots-specific styles */
136
+
}
137
+
}
138
+
```
139
+
140
+
This is correct because the `title` component has consistent styling and behavior across the page.
141
+
142
+
## Key Clarifications
143
+
144
+
1.**JSX Nesting is Flexible**: Components can be nested inside slots, slots can contain components - whatever makes semantic sense
145
+
2.**CSS Hierarchy is Strict**: Follow pages → components → slots structure in CSS
146
+
3.**Reusable Components**: Define at the appropriate level where they're shared (page level if used across the page, component level if only used within that component)
147
+
4.**DOM vs CSS Structure**: These don't need to match - optimize each for its purpose
148
+
100
149
See ./src/routes/index.css and ./src/routes/index.tsx for a complete example.
0 commit comments