Closed jackcrymble closed 6 years ago
Hmm. You also are required to install jquery.datatables.js, although I guess your bundler makes this automatic for you.
I guess I am used to doing this manually, but if there is an automatic way to bundle css as there is for js, then let me know!
I don't think that copying the css from DataTables into dc.datatables would be appropriate because in theory this package should be compatible with almost any version of the other.
Okay, @gordonwoodhull!
I'll keep looking into this for my project and see if I can get somewhere. I'm somewhat new to front end development but will update if anything useful comes from my efforts.
As far as I know, including the CSS from all dependencies is the way to go - but maybe there is something automatic that Angular or another build system can help with.
Importing the jquery dataTables css file into my styles.scss seems to do the trick for applying some styling!
@import '~datatables/media/css/jquery.dataTables.css';
What do you plan for the dc.datatables.css file? Will it remain blank or will some form of styling be added in here at a later date?
Thanks for your help and quick replies!
That's great!
I added dc.datatables.css
out of habit but it is unlikely to be needed, since this library does not generate html directly. It should probably be removed, especially if it causes confusion.
I'll close this issue for now - we can reopen if we discover a better way to specify transitive css dependencies.
I have got dc.datatables working within my project, however it appears that there is no default styling being applied? Is this on purpose? I can see in the web folder, you have copied the 'jquery.datatables.css' file from the datatables.net-dt package. Is this the recommended way to apply styling to the dc.datatable as opposed to having a css file within the dc.datatables package which is applied by default but can be overridden?
This is what the datatable looks like with no styling (created using titanic dataset).