Cannot find stylesheet.
See original GitHub issueThis old problem with webkit. Looking at the code I have a question. Why is loop on the document.styleSheets ?
slick.grid.js
function getColumnCssRules(idx) {
if (!stylesheet) {
- var sheets = document.styleSheets;
- for (var i = 0; i < sheets.length; i++) {
- if ((sheets[i].ownerNode || sheets[i].owningElement) == $style[0]) {
- stylesheet = sheets[i];
- break;
- }
- }
if (!stylesheet) {
throw new Error("Cannot find stylesheet.");
}
...
that if we replace on
function getColumnCssRules(idx) {
if (!stylesheet) {
+ stylesheet = $style[0].sheet || $style[0].styleSheet;
if (!stylesheet) {
throw new Error("Cannot find stylesheet.");
}
...
Thanks in advance!!!
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Sass "Error: Can't find stylesheet to import." - Stack Overflow
It seems like this is a path issue; _functions.scss is in the same directory as bootstrap.scss in node_modules/bootstrap/scss , but it seems ...
Read more >Error: Can't find stylesheet to import. · Issue #3269 - GitHub
Sass version is 1.49.9 compiled with dart2js 2.16.1. ParcelJS solved my problem by being able to compile my Sass/Scss code into plain CSS...
Read more >Executing Sass - Can't find stylesheet to import - Syncfusion
So I import the base styles, then I override some scss variables, and then import the button styles. And in the runtime, this...
Read more >SCSS Error: Can't find stylesheet to import.
the error comes from SASS compiler, not from the IDE. IDE tricks, like marking folders as Resource roots, won't work here, the compiler...
Read more >Laravel NPM run Dev error "Can't find stylesheet to import."
README me of compass package. And the compass itself is a ruby gem it seems. So I don't get what you're trying to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You’re right in saying that you shouldn’t test the table, you should mock it and you’re not. For my unit tests, I do something like below, the only real thing I use is the Slick Event because I often have to subscribe/notify some events but everything else is and should be mocked.
My app is created by CRA. I receive this error when try to test by Jest a page that contains a SlickGrid table. Actually I don’t want to test a table itself but Jest renders a table and encounters the error. Could you please suggest me how can I get rid of this error to continue writing tests? I tried to setup Jest to manage styles as it described on official site but it doesn’t help me ((