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.

Pagination is not responsive by default

See original GitHub issue

Version: Bootstrap v4 beta

Reproduce Steps: Add several page-item to pagination. Resize browser and check mobile view.

Had to add flex-wrap to fix it. ( <ul class="pagination flex-wrap">)

https://jsbin.com/fuduqusufe/edit?html,output

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:52
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

24reactions
mdocommented, Aug 22, 2017

The v3 pagination component was “responsive” because it was built with floats instead of flexbox. This wasn’t by design and is a “visual bug” IMO—don’t let this be the design you ship. Remove some of the pagination links, use a smaller variant, etc.

Closing as a won’t fix.

16reactions
StCyrcommented, Nov 22, 2018

The v3 pagination component was “responsive” because it was built with floats instead of flexbox. This wasn’t by design and is a “visual bug” IMO—don’t let this be the design you ship. Remove some of the pagination links, use a smaller variant, etc.

Closing as a won’t fix.

I understand your argument but, still, something should be done imho.

By default, pagination component’s unresponsiveness might make it really ugly on small devices. And, the solutions you propose (“Remove some of the pagination links, use a smaller variant”) either doesn’t totally solve the issue (“use a smaller variant”) or is not a trivial task (“Remove some of the pagination links”).

Anyway, none of the solutions you propose is responsive, which is not a good thing, I believe, and contradict bootsrap’s philosophy from what I understand (see https://getbootstrap.com/ : “Build responsive, mobile-first projects on the web”)

I think they are other alternatives worth considering:

The simplest one would be to document this limitation on https://getbootstrap.com/docs/4.1/components/pagination/ (I find it bad documentation design to let the users have to dig into bug reports to find information). Just adding a small Wrapping paragraph would do the trick imho. Its content would be something like;

Pagination components are not responsive. So, pagination links won’t wrap when the device 'screen is smaller than the minimum size needed to display them. You can work around this by adding the “.flex-wrap” class to your <ul> tag (as shown in exemple hereunder), but a better solution would be to remove some of the pagination links.

A better solution, though probably much harder, would be to make this component able to automatically remove pagination links dependent on the device 'screen size. This might make this component considered responsive.

I hope you will agree with me and do something else than not fixing this issue.

Best regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap 4 Pagination Scaling/Responsiveness
I am using a container div to contain my pagination list. I am using the Bootstrap CDN, but it is loading properly. I...
Read more >
Pagination - Bootstrap
Pagination is built with list HTML elements so screen readers can announce the number of available links. Use a wrapping <nav> element to...
Read more >
Pagination is not responsive - Support Forum - JomSocial
ISSUE SUMMARY: On Jomsocial 4, the pagination is not responsive. The pagination flows off the end of the page. I have tried the...
Read more >
Options - Splide
You can set default options by the Splide.defaults static property: Splide . defaults = ... Determines whether to create pagination (indicator dots) or...
Read more >
Bootstrap 4 Pagination - W3Schools
If you have a web site with lots of pages, you may wish to add some sort of pagination to each page. Previous;...
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