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
`To style slotted content, use light DOM CSS targeting the elements BEFORE they are slotted in. Do not use \`::slotted()\` in consumer CSS — it only works inside the shadow root stylesheet.`,
229
+
);
230
+
231
+
if(hasDefaultSlot){
232
+
warnings.push(
233
+
`Default slot: style children of \`${tagName}\` in your page CSS (e.g. \`${tagName} > p { ... }\`). These selectors work because slotted elements remain in the light DOM.`,
234
+
);
235
+
}
236
+
237
+
if(namedSlots.length>0){
238
+
constslotExample=namedSlots[0];
239
+
if(slotExample){
240
+
warnings.push(
241
+
`Named slots: style elements with \`[slot="${slotExample.name}"]\` attribute selector in your page CSS (e.g. \`${tagName} [slot="${slotExample.name}"] { ... }\`).`,
242
+
);
243
+
}
244
+
}
245
+
246
+
warnings.push(
247
+
`Slotted content inherits font styles (color, font-size, line-height) from the component's shadow DOM, but layout properties (margin, padding, display) must be set in light DOM CSS.`,
0 commit comments