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

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

mbaasmbaas Posts: 57Questions: 20Answers: 1
edited July 9 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: 10,622Questions: 25Answers: 2,421

    "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: 57Questions: 20Answers: 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: 9,819Questions: 0Answers: 1,626
    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

Sign In or Register to comment.