Add note for SASS:/SCSS: replace /deep/ with ::ng-deep
See original GitHub issueAngular version: 9.0.7
ngx-pagination version: 5.1.1
Description of issue:
/deep/
is not working as proposed in the style section of the documentation when working with SASS.
We should add a note that it only works with ::ng-deep
when using the SASS compiler.
Steps to reproduce: Create Angular project that uses the SASS compiler, implement pagination in a component and try to overwrite the styles like written in the documentation:
// head
<style>
.my-pagination /deep/ .ngx-pagination .current {
background: red;
}
</style>
// body
<pagination-controls class="my-pagination"><pagination-controls>
Expected result: Background of the active element should change accordingly to the css rule.
Actual result: No changes in appearance.
Have no time to provide a demo unfortunately, just wanted to change a quick thought.
Solution:
// head
<style>
.my-pagination ::ng-deep .ngx-pagination .current {
background: red;
}
</style>
// body
<pagination-controls class="my-pagination"><pagination-controls>
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How and where to use ::ng-deep? - Stack Overflow
I'm new to Angular 4, so could anyone please explain how and where to use ::ng-deep in Angular 4? Actually I want to...
Read more >Angular 10 - Avoid using ::ng-deep (ngdeep)
Let's just call "Deep" any styling not directly related to the current component. CSS Query Selectors within a View's component style, are being ......
Read more >Angular :host, :host-context, ::ng-deep - The Complete Guide
In this post, we will learn how the default Angular styling mechanism (Emulated Encapsulation) works under the hood, and we will also cover ......
Read more >Angular:This is how I finally understood :host,:host ... - Medium
Its important to note here that ::ng-deep must be used after the :host selector to ensure that the styles defined will be scoped...
Read more >Component styles - Angular
This includes ::ng-deep , which promotes a component style to a global style. ... can offer a supported customization API via a CSS...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That would only update once a new version of the package is published.
I saw that the changes were present in the GitHub Readme but the Readme on npm was not updated and now it’s not there at all. Will the readme on the npm page update automatically?