question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import react table css and cannot override default classes styles?

See original GitHub issue

can’t figure out why adding import 'react-table/react-table.css' below import ReactTable from 'react-table'; doesn’t add style on react-table and feels like no css is imported? I have to resort on importing CDN on index.html <link rel="stylesheet" href="https://unpkg.com/react-table@latest/react-table.css">, but my problem is, I cannot override css of the default classes? how can I override css of default classes and import react-table/react-table.css? why is it not working and affecting table?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Jucesrcommented, Mar 24, 2018

If you are using webpack. it is likely you are excluding to parse ‘node_modules’ files. Since the style sheet is in

node_modules/react-table/react-table.css

You would need to change webpack config or just copy and paste the file into your style project folder.

src/styles/react-table.css

1reaction
technificentConsultingcommented, Jul 24, 2018

Is there any update on this? I’m running into the same issue and have been working tirelessly to resolve it to no avail.

I tried copying the .css file directly into my project, it didn’t load maybe because it contains const??

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot import react table css and cannot override default ...
I have to resort on importing CDN on index.html <link rel="stylesheet" href="https://unpkg.com/react-table@latest/react-table.css"> , but my ...
Read more >
cannot override react-table styles? - css - Stack Overflow
Try using css modules and :global, it's works for me :global div.pagination-bottom > div > div.-center > span.select-wrap.
Read more >
Solving the React Error: Not Picking Up CSS Style | Pluralsight
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >
Specificity - CSS: Cascading Style Sheets - MDN Web Docs
The only way to override inline styles is by using !important . Many JavaScript frameworks and libraries add inline styles. Using !important ...
Read more >
How To Use React Styled Components Efficiently - Copycat
Easy CSS Deletion — styles are attached to a single component rather than being inserted as a class name, making CSS deletion easier....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found