question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add note for SASS:/SCSS: replace /deep/ with ::ng-deep

See original GitHub issue

Angular 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:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelbromleycommented, Jan 14, 2022

That would only update once a new version of the package is published.

0reactions
JanTrichtercommented, Jan 14, 2022

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found