.mat-paginator-range-label styles is not customizable
See original GitHub issueBug, feature request, or proposal:
Bug (or proposal, I’m not sure).
What is the expected behavior?
MatPaginator range cannot be fully customize with CSS.
What is the current behavior?
MatPaginator range is fully customizable with CSS.
What are the steps to reproduce?
As I see, Angular Material engine isn’t adding tag attribute _ng...
to div
with class mat-paginator-range-label
. So if there is any style in module style.css file it has no effect because of that tag attribute (_ng...
) is added to style.
Example, user module style.css:
.mat-paginator-range-label {
margin: 0 !important;
}
The same style.css but after Angular processing, in browser:
.mat-paginator-range-label[_ngcontent-c17] {
margin: 0 !important;
}
But div
that I’ve talking about looks like:
So the style.css gives no effect.
What is the use-case or motivation for changing an existing behavior?
It’s more flexible (I guess).
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
"@angular/core": "^4.4.6",
"@angular/material": "^2.0.0-beta.12",
"@angular/platform-browser": "^4.4.6",
"@angular/platform-browser-dynamic": "^4.4.6",
...
"typescript": "~2.5.3"
macOS High Sierra, Safari, Google Chrome
Is there anything else we should know?
I don’t think so.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
How to customize mat-paginator in angular material
I need to revise the algorithm that calculates the range, the rendering of the buttons is still very glitchy, I will get this...
Read more >Paginator | Angular Material
The labels for the paginator can be customized by providing your own instance of MatPaginatorIntl . This will allow you to change the...
Read more >Customize Mat Paginator - StackBlitz
Starter project for Angular apps that exports to the Angular CLI.
Read more >How to translate MatPaginator | by Mario Kandut - Medium
Customize the labels of MatPaginator in Angular`s Material Design Components ... unfortunately translating the paginator is not one of them.
Read more >Angular 9 pagination example
Customize mat paginator CSS ... This paginator could be used to paginate anything, and it's not specifically ... Angular material paginator hide range...
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 FreeTop 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
Top GitHub Comments
@andrewseguin @willshowell you’re cool! Much thanks!
@Shrralis as you mentioned, setting
ViewEncapsulation.None
will make all of your component’s styles globally effective. You have two options,Scope all of your un-encapsulated component’s styles with a scoped parent selector
Create a global style like this and add it to your global stylesheet
There is more information in this guide!