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

View encapsulation is emulated when importing a file inside ::ng-deep #20821

Open
lazarljubenovic opened this issue Dec 6, 2017 · 1 comment
Labels
area: core Issues related to the framework runtime core: CSS encapsulation freq1: low P5 The team acknowledges the request but does not plan to address it, it remains open for discussion type: bug/fix
Milestone

Comments

@lazarljubenovic
Copy link
Contributor

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

The following .scss file with the default Emulated view encapsulation...

::ng-deep {
  @import '~some/file.css`
}

...results in [_ngcontent-${id}] attributes applied to its content.

Expected behavior

They should not be added because it's inside ::ng-deep.

Minimal reproduction of the problem with instructions

I think the example above is pretty straightforward, but I can create a repro repo if requested.

What is the motivation / use case for changing the behavior?

Being able to include a third-party css file without view encapsulation being applied to it.

Environment


Angular version: 5.0.0

@IgorMinar IgorMinar added the area: core Issues related to the framework runtime label Dec 6, 2017
@ngbot ngbot bot added this to the Backlog milestone Jan 23, 2018
@ngbot ngbot bot modified the milestones: Backlog, needsTriage Feb 26, 2018
@jelbourn jelbourn added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed severity3: broken labels Oct 1, 2020
@dylhunn dylhunn added P5 The team acknowledges the request but does not plan to address it, it remains open for discussion and removed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Jul 11, 2022
@dylhunn
Copy link
Contributor

dylhunn commented Jul 11, 2022

ng-deep should probably make the imported styles global, but this is frankly a really exotic use case which we're unlikely to prioritize in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to the framework runtime core: CSS encapsulation freq1: low P5 The team acknowledges the request but does not plan to address it, it remains open for discussion type: bug/fix
Projects
None yet
Development

No branches or pull requests

6 participants