Stylebot: V3 seems to have removed @import capability

Created on 29 Jul 2020  ·  10Comments  ·  Source: ankit/stylebot

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.

bug resolved

All 10 comments

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 ☹

@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 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 👍

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.

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! 👍

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.

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 😊👍

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.

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!

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! 😊👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iamsolarplexus picture iamsolarplexus  ·  4Comments

brundonsmith picture brundonsmith  ·  3Comments

laurentvaills picture laurentvaills  ·  29Comments

TheJaredWilcurt picture TheJaredWilcurt  ·  5Comments

qJake picture qJake  ·  10Comments