Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 seems to have removed @import capability #556

Closed
easaw opened this issue Jul 29, 2020 · 10 comments
Closed

V3 seems to have removed @import capability #556

easaw opened this issue Jul 29, 2020 · 10 comments
Labels
bug Bug report resolved

Comments

@easaw
Copy link

easaw commented Jul 29, 2020

Hi, @ankit

I use github to manage a CSS file so versions can be monitored.

I use @import to view that stylesheet with Stylebot, and allow other users to automatically get updates, rather than have to copy and paste the CSS every time I update it.

  • @import has stopped working 😢
  • but also the stylesheet doesn't update without removing and re-installing the Chrome extension.

(As I've Sponsored, I really hope you can keep the @import feature or re-enable it)

Thank you.

@easaw
Copy link
Author

easaw commented Jul 29, 2020

As per this image:
https://stylebot.dev/static/e1d2f4e7deef55b722596db0379582a4/39825/code.png

I have used that @import format as well as the standard one. Neither works ☹

@ankit ankit added Diagnose bug Bug report and removed Diagnose labels Jul 29, 2020
@ankit
Copy link
Owner

ankit commented Jul 29, 2020

@easaw can you share an example CSS with me? I think I know what's going on and should be able to resolve this soon

@easaw
Copy link
Author

easaw commented Jul 29, 2020

@easaw can you share an example CSS with me? I think I know what's going on and should be able to resolve this soon

I've sent an email 👍

@ankit
Copy link
Owner

ankit commented Jul 29, 2020

I think I know the issue with @import - chrome blocks the request due to Cross-Origin Read Blocking (CORB) blocked cross-origin response. In the earlier version, stylebot was fetching the css manually from all the @import rules before applying. I should be able to roll in a fix soon.

Also, I think i know what you mean by "stylesheet doesn't update without removing and re-installing the Chrome extension." Is it that you have reinstall the Chrome extension for it to pick up any changes to the external css? I should be able to fix this too.

@ankit ankit added the fix in progress Prioritized and actively working on fixing this bug label Jul 29, 2020
@ankit ankit added in webstore review Release containing fix is in review in Chrome Web Store and removed fix in progress Prioritized and actively working on fixing this bug labels Jul 30, 2020
@easaw
Copy link
Author

easaw commented Jul 30, 2020

I think I know the issue with @import - chrome blocks the request due to Cross-Origin Read Blocking (CORB) blocked cross-origin response. In the earlier version, stylebot was fetching the css manually from all the @import rules before applying. I should be able to roll in a fix soon.

Fantastic, really appreciate your efforts! 😄

Also, I think i know what you mean by "stylesheet doesn't update without removing and re-installing the Chrome extension." Is it that you have reinstall the Chrome extension for it to pick up any changes to the external css? I should be able to fix this too.

Yes, that's correct, I have to reinstall it to pick up changes. That's great news you might be able to fix it! 👍

@ankit ankit added resolved and removed in webstore review Release containing fix is in review in Chrome Web Store labels Jul 31, 2020
@ankit ankit closed this as completed Jul 31, 2020
@easaw
Copy link
Author

easaw commented Aug 2, 2020

Just to note that the @import is working, but it still required removing Stylebot, and re-installing from the Chrome web store. It's odd that the CSS doesn't update, I've tried a hard refresh, but it still didn't work.

@easaw
Copy link
Author

easaw commented Aug 7, 2020

Thanks so much for sorting this, makes your extension the only one out there, that does what I need with @import - there's not even any options for Firefox! I switched to using Chrome way more often, just for this!

Cheers 😊👍

@ankit
Copy link
Owner

ankit commented Aug 7, 2020

Thanks @easaw for the encouraging words.

For the caching issue, I will continue to investigate it further.

Until I have a fix for that, one workaround I suggest (instead of re-installing the extension) is to version your external css i.e. whenever you update your external css, update the filename and update your custom css in stylebot to point to the new version.

if you are using github, i have also noticed that urls like https://gist.githubusercontent.com/ankit/73bad5f20b389c08ea2a44e30338d4cf/raw take a while to actually get updated.

@easaw
Copy link
Author

easaw commented Aug 8, 2020

if you are using github, i have also noticed that urls like https://gist.githubusercontent.com/ankit/73bad5f20b389c08ea2a44e30338d4cf/raw take a while to actually get updated.

Ahh, this might be the problem!

@easaw
Copy link
Author

easaw commented Aug 8, 2020

After testing this comes through very quickly now (even when using github raw - but with the full .css file extension).

So thank you very much, really appreciate your work! 😊👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report resolved
Projects
None yet
Development

No branches or pull requests

2 participants