buttons 2.4.1 css differs between standalone and builder package
buttons 2.4.1 css differs between standalone and builder package
When I don't download the standalone version of the buttons css then the layout is broken:
I am using the DataTables download builder which creates this long css
link:
<link href="https://cdn.datatables.net/v/bs5/jq-3.7.0/jszip-3.10.1/dt-1.13.5/af-2.6.0/b-2.4.1/
b-colvis-2.4.1/b-html5-2.4.1/b-print-2.4.1/cr-1.7.0/date-1.5.1/fc-4.3.0/fh-3.4.0/kt-2.10.0/
r-2.5.0/rg-1.4.0/rr-1.4.1/sc-2.2.0/sb-1.5.0/sp-2.2.0/sl-1.7.0/sr-1.3.0/
datatables.min.css" rel="stylesheet">
Here is a clickable version.
Loading the standalone version BEFORE or AFTER the above long CSS link produces the correct layout:
The collectionLayout
attribute is shown correctly ['two-column'
].
So, my question is, what am I doing wrong that I have to include the buttons css separately and the builder version doesn't seem to work correctly.
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
I think I might know what is going on here actually. I suspect that the "working" version is actually using
buttons.dataTables.css
rather thanbuttons.bootstrap5.css
.I say this because the Bootstrap 5 code for Buttons 2.4.1 doesn't include the multi-column layout code for the collection at all!
I've just corrected that. It will be in the nightly shortly and in the next release.
Allan
Thank you Allan for your fast reply and I am happy that my information was enough to point out the problem.
Please let me know when it's fixed. The DataTables
version 1.13.6
works, but anyway, you mentionedButtons 2.4.1
and this it not updated yet. No hurry, I have a working fix.Kind regards, Peter
Yes, it will be in the next Buttons release. I don't have a set time for that yet as this is the only change in it so far, so I'll probably wait just a little while before tagging it up in case anything else crops up...
Allan
Hi Allan,
I believe there might also be a similar issue with the css for Bootstrap 4. Using
collectionLayout: fixed two-column
and upgrading toButttons 2.4.x
the dropdown looks like this:However, changing it to use
Buttons 2.3.6
fixed the problem:After looking through repo, It seems like the a192fe7 commit removed the related code.
Sorry for the delay in getting back to you here. I agree and have committed a change that will address this in the shortly to be released 2.4.2.
Allan
No worries at all and I appreciate the update!