No CSS bundled on NPM package

No CSS bundled on NPM package

gian1200gian1200 Posts: 2Questions: 1Answers: 1

Link to test case:
https://www.npmjs.com/package/datatables.net-responsive?activeTab=code

Description of problem:

When installing the Response package with NPM (npm install datatables.net-responsive), the downloaded folder only has the JS files. The CSS files are missing

According to the documentation, both files are required:
https://datatables.net/blog/2014/responsive#Using-Responsive
https://datatables.net/extensions/responsive/

This question has an accepted answers - jump to answer

Answers

  • gian1200gian1200 Posts: 2Questions: 1Answers: 1
    edited January 31 Answer ✓

    I think I found it. I needed to reference the bootstrap5 equivalent

    npm install datatables.net-responsive-bs5.

    PS: are posts "closable" in this forum, or do I leave my post as-is?

  • allanallan Posts: 65,588Questions: 1Answers: 10,904 Site admin
    edited February 1

    Hi,

    Yes, as you have found the core package for each library doesn't have a stilying file - you need to select one of the styling packages as well. If you actually just include datatables.net-responsive-bs5 (for example), then it will automatically pull in the Responsive core as a dependency.

    I did it that way so that the software can be styled by many different frameworks.

    The download builder is the answer to what packages or files you should include. Select the style you want, the software you want and the distribution method. It will then tell you what you need.

    Regarding closing posts - you can normally mark a "Question" post as answered, but there isn't (yet - I'm going to change it) an option to mark your own reply as an answer. I've just done that though.

    Allan

Sign In or Register to comment.