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.

How do I override the css?

See original GitHub issue

I’ve tried to override the font size/font/colors/etc and have had no luck. Also, it doesn’t look like you can currently replace the ‘Previous’ or ‘Next’ text, is that correct.

I’ve tried a couple of the examples below to no avail. Am I doing something wrong?

[override] .bulkResults pagination-controls .ng2-pagination li {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  font-size: 0.875rem;
  margin-right: 0.0625rem;
  border-radius: 0;
  color: #ffffff;
}

.bulkResults pagination-controls a:hover,
.bulkResults pagination-controls button:hover {
  background: #ffa500;
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
AlexKuskovcommented, Aug 13, 2019

@akshay27395, looks like /deep/ is deprecated (https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep). You can try to use ::ng-deep instead:

.my-pagination::ng-deep .ngx-pagination .current {
  background: #0b3c6d  !important;
 
}
4reactions
michaelbromleycommented, Aug 12, 2016

I guess this is due to the encapsulation that Angular applies to the styles.

You could try something like:

.bulkResults pagination-controls /deep/ .ng2-pagination li {
 // your styles...

The /deep/ selector tells Angular to “reach in” to the component and apply styles to that too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Override CSS Styles - W3docs
When an important rule is used on a style declaration, this declaration will override any other declarations. When two conflicting declarations with the...
Read more >
how to overwrite css style - html - Stack Overflow
Add inline styles to the elements. · create and append a new <style> element, and add the text to override this style to...
Read more >
CSS Overriding Variables - W3Schools
Override Global Variable With Local Variable​​ From the previous page we have learned that global variables can be accessed/used through the entire document, ......
Read more >
Specificity - CSS: Cascading Style Sheets - MDN Web Docs
The only way to override inline styles is by using !important . Many JavaScript frameworks and libraries add inline styles. Using !important ...
Read more >
How to override CSS style from another style
The order of specificity preference when overriding a CSS style. When multiple CSS rules reference the same HTML element, the browser needs ...
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