Cannot change CSS inside the pagination component !!
See original GitHub issueThe problem:
I can only change the css of the pagination (class of the component). but I can’t change the css of the li
or a
or a .active
. I tried to put the css in a not scoped or a scoped component I even put it inside the body not scoped css file but it didn’t work I added the properties pageClass
and pageLinkClass
and tried the same thing but still the sam result.
What should happend:
I should be able to change the style of the pagination component with this code:
<template>
.
.
.
<div class="my-pagination col-md-offset-3 col-sm-offset-2 col-xs-offset-1">
<paginate
v-if="numberOfPages > 1"
:pageCount="numberOfPages"
:clickHandler="getPageData"
:prevText="'préc.'"
:nextText="'Suiv.'"
:containerClass="'pagination'"
:pageClass="'page-item'"
:pageLinkClass="'page-link-item'">
</paginate>
</div>
.
.
.
</template>
<script>
</script>
...
<style>
.
.
.
.pagination {
margin: 5% 25%; // this works
.page-item {
.page-link-item .active {
border-radius: 0px; // this don't work
position: static !important; // this don't work
background-color: #ed6528 !important; // this don't work
}
}
}
.
.
.
</style>
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
react-pagination styling in global css not working
hi, i've tried to change the id to className and updated the css as well(change the # into . ) but its still...
Read more >Pagination element, CSS style sticks - Bootstrap Studio Forum
Try this: Drop a Pagination component on the editor Find one of the buttons ... The style= remains in the code, but cannot...
Read more >rc-pagination - npm
Parameter Description Type
disabled disable pagination Bool
defaultCurrent uncontrolled current page Number
current current page Number
Read more >Pagination API - Material UI - MUI
Name Type Default
boundaryCount integer 1
classes object
color 'primary' | 'secondary' | 'standard' | string 'standard'
Read more >Adding Pagination to ReactJS Apps - Academind
In today's world, most web applications cannot show all the data they ... a re-usable component that will show the data in a...
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
It works for me if I put the css in a not scoped style section.
I also have the same issue. Even in the style console it does not show the css selectors i used. It does in the html element show the class being used but no CSS is rendered in the style console.
I copied the example exactly out of jsfiddle and it did not render properly like in jsfiddle.
Using chrome 65 and firefox 45 and Vuejs 2.5.2.
This is the second link on google when searching for a fix to this issue.
When i add this link to the top of index.html page it renders as a bootstap pagination style. this is because bootrap has a pagination css class that access all the elements underneath the elements.
<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.css">