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
{{ message }}
Repository navigation
Can't style content added with ng-content directive #11841
[x] bug report => search github for a similar issue or PR before submitting
Current behavior
Currently it appears that content inside of a content block using <ng-content> does not work with Angular 2's component styling. It does not receive any of the component namespace attributes the rest of the component receives but any styling meant for that content is namespaced.
What is the motivation / use case for changing the behavior?
That the stylesheet does not apply styles to the injected content is unexpected and I suspect will be surprising to a large number of people. I also think it is a difficult limitation to cleanly work around.
Activity
vicb commentedon Sep 22, 2016
That's how it is supposed to work, see the shadow dom spec.
Having said that
:slottedis not yet supported. A workaround for now is to use/deep/, see #11595chrisnicola commentedon Sep 22, 2016
Ah thanks for the workaround.
angular-automatic-lock-bot commentedon Sep 9, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.