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.

Override current li style

See original GitHub issue

Hi,

There’s a way to overide the current li style and change it from blue to gray ? I tried this but i still have the blue color :

pagination-controls li.current{
 background : gray;
}

Thanks

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kenp77commented, Dec 6, 2016

The !important hack solved the problem. Thank you. Now you can close it 😃

1reaction
michaelbromleycommented, Dec 1, 2016

You are totally correct. The PaginationControlsComponent should perhaps not use the emulated shadow DOM style mode, which would make it easier to override the styles.

For now, you can force it with an !important marker in your css:

pagination-controls /deep/ .ng2-pagination li.current {
  background: gray !important;
}

See a demo here: http://plnkr.co/edit/a9AofVgQPgIWu0M0FF9Y?p=preview

Read more comments on GitHub >

github_iconTop Results From Across the Web

Css overwrite list styles - html - Stack Overflow
Apply the class attribute to all lists that you want to override the style on! That way it works on the different lists!...
Read more >
How to Override CSS Styles - W3docs
An !Important declaration is a great way to override the styles you want. When an important rule is used on a style declaration,...
Read more >
<li>: The List Item element - HTML: HyperText Markup Language
This type overrides the one used by its parent <ol> element, if any. Note: This attribute has been deprecated; use the CSS list-style-type ......
Read more >
Create, change, or delete a view of a list or library
Select the name of the view that you want to change. Select View options again, and then select Edit current view. On the...
Read more >
How To Change Bullet Color of a List - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
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