-
Notifications
You must be signed in to change notification settings - Fork 2k
Pager: add classes required for Bootstrap rendering #1816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The user guide is poorly worded. We don't want to add CSS framework attributes. |
This looks like a can of worms! There are several nav styles or pagination support built into Bootstrap, slightly different per bootstrap version - default, links, pills, pager vs plain nav. The default_simple and default_head pagination templates seem CSS-framework-free, but not so default_full. The only other place in the user guide which mentions Bootstrap is the validation library. Looking at its views, it adds a couple of CSS attributes to error message divs. |
Yes, that was originally for Bootstrap 3. Looks like 4 took a step backward in that respect. Too bad. |
So, should the bootstrap styling be removed? |
They need some classes so users can apply CSS to the out-of-the-box HTML. That said, the “pagination” class on the wrapping NAV ought to be minimum necessary. It is indeed unfortunate that this is no longer enough for Bootstrap, but applying their specific classes to the items definitely seems like a decision to “go with Bootstrap”. |
The easy solution for people asking for support of X is to simply say, we only support Y because it seems to be the most widely used and makes a good default. However, in this case I say we leave it like it is so that it can be styled without modification, and remove the comment from the docs. |
I will send a PR for the user docs. |
Per conversation codeigniter4#1816
PR sent. FYI the only remaining reference to Bootstrap styling in the User Docs is in the Validation Library (https://codeigniter4.github.io/CodeIgniter4/libraries/validation.html), the views called by |
Remove bootstrap styles from validation views. #1816
I've removed the Bootstrap reference and changed the style to be a bit more generic. |
Per conversation codeigniter4/CodeIgniter4#1816
Description
The user guide claims "The Pager class will render a series of links that are compatible with the Bootstrap CSS framework by default" but by default the resulting HTML is missing the necessary classes to be rendered as a Bootstrap pagination.
Checklist: