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
'Slotted content inherits font styles (color, font-size, line-height) from the shadow DOM, but layout properties (margin, padding, display, width) must be set in light DOM CSS — they do not inherit through the shadow boundary.',
197
+
correctApproach: `Style layout in light DOM CSS: ${tag} > div { margin: 10px; }. Font properties like color and font-size will inherit from the component's shadow DOM automatically.`,
198
+
});
199
+
}
200
+
191
201
returnwarnings;
192
202
}
193
203
@@ -200,13 +210,14 @@ export function buildCssSnippet(meta: ComponentMetadata): string {
200
210
constlines: string[]=[];
201
211
consttag=meta.tagName;
202
212
203
-
// Token customization section
213
+
// Token customization section — show how to OVERRIDE custom properties
204
214
if(meta.cssProperties.length>0){
205
-
lines.push(`/* Token customization */`);
215
+
lines.push(`/* Token customization — override on the component host */`);
/** Optional token prefix from the component's library (e.g. '--hx-', '--fast-'). When provided, suggested tokens use this prefix instead of generic placeholders. */
explanation: `Light-on-light or dark-on-dark color pairs create contrast issues. Use semantic token pairs (surface + on-surface) that maintain readable contrast across themes.`,
description: 'Optional event name for event usage fixes.',
624
625
},
626
+
tokenPrefix: {
627
+
type: 'string',
628
+
description:
629
+
'Optional token prefix from the component library (e.g. "--hx-", "--fast-", "--md-"). When provided, suggested replacement tokens use this prefix. Get this from diagnose_styling.',
0 commit comments