The download-page had a lot of variation serving CSS downloads

The download-page had a lot of variation serving CSS downloads

mbaasmbaas Posts: 67Questions: 24Answers: 1
edited July 2020 in General

This is probably not a real problem, but I'm just curious. Was "playing" with Downloads today and noticed that upon selecting [1] Bootstrap4 and [2] DataTables, I get this CSS-link: <link rel="stylesheet" type="text/css" href="DataTables/datatables.min.css"/>.
After unchecking "Concatenate", it changed to <link rel="stylesheet" type="text/css" href="DataTables-1.10.21/css/dataTables.bootstrap4.min.css"/>

I'm confused:

  • "Concatenate" does not seem to be needed, since with or w/o it - I get one file and one file only.
  • But why a different file? And why would I get a "bootstrap-related" file only w/o Catenate?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,268Questions: 26Answers: 4,765

    "Concatenate" does not seem to be needed, since with or w/o it - I get one file and one file only.

    Try selecting some extensions then toggle the concatenate button then you will see the effect concatenated files have. All the required CSS are compiled into one file named datatables.css. Concatenating the CSS and JS files is more efficient for page loading. Especially when using CDN as only one request is needed versus one request for each file if not concatenated.

    But why a different file? And why would I get a "bootstrap-related" file only w/o Catenate?

    The Styles docs explain the files needed for Bootstrap styling.

    Kevin

  • mbaasmbaas Posts: 67Questions: 24Answers: 1

    Sorry, I may have been too confused to make the point clear.

    The combination of Styling-framework=Bootstrap and package=DataTables gives me a download of "datatables.min.css" - and only when toggling catenate, it changes to "dataTables.bootstrap4.min.css". Since I do need ONE CSS-File only anyway - why isn't the same file used?

    But I assume it has to do with the way the packager works - either you get specific stuff from targetted files/folders or "catenated" stuff from generic folders/files.

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    You get the same files whether it's concatenated or not, it's just that the CDN has that abbreviation for the necessary files,

    Colin

This discussion has been closed.