Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ShadowCss): properly shim selectors after :host and :host-context #10997

Merged
merged 1 commit into from
Aug 26, 2016

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Aug 22, 2016

No description provided.

@vicb vicb added comp: core/view action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 22, 2016
fixes angular#5390

Before the change:

    // original CSS
    :host .foo .bar {...}
    .foo .bar {...}

    // translated to 
    [_nghost-shh-2] .foo .bar {...}
    .foo[_ngcontent-shh-2] .bar[_ngcontent-shh-2] {...}

Note that `.foo` and `.bar` where not scoped and would then apply to nested components.

With this change those selectors are scoped (as they are without  `:host`).

You can explicitly apply the style to inner component by using `>>>` or `/deep/`: `:host >>> .foo`
@IgorMinar IgorMinar added pr_state: LGTM action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 23, 2016
@bradlygreen bradlygreen added this to the 2.0.0-rc.6 milestone Aug 24, 2016
@vicb
Copy link
Contributor Author

vicb commented Aug 24, 2016

blocked on g3 update

@vicb vicb self-assigned this Aug 24, 2016
@vicb vicb removed the action: merge The PR is ready for merge by the caretaker label Aug 24, 2016
@vicb vicb added action: merge The PR is ready for merge by the caretaker and removed state: blocked labels Aug 26, 2016
@vicb vicb merged commit af63378 into angular:master Aug 26, 2016
@vicb vicb deleted the 0822-shadowCss branch June 9, 2017 17:17
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants