markdown-viewer icon indicating copy to clipboard operation
markdown-viewer copied to clipboard

linked css not working, only working if copied

Open DoctorSubtilis opened this issue 4 years ago • 10 comments

So far (3.7) I was able to link from my home to extension folder a css. Now, with 3.8, a linked css is working no more: it works only if copied in themes folder: why? Thank you

DoctorSubtilis avatar Jan 11 '20 18:01 DoctorSubtilis

You mean symbolic link on your file system? Browser extensions doesn't have control over how files are read from your local system, it's the browser itself that allows and controls that.

You sure that's not because of a browser update for example?

simov avatar Jan 12 '20 12:01 simov

Yes, symlinks.
No, I'm not sure if it depends from a browser update: what browser's settings should I check?

DoctorSubtilis avatar Jan 12 '20 12:01 DoctorSubtilis

I don't know, but this is most likely a breaking change in Chrome after update. There is no way for a browser extension to check for symlinks, at least that I know of.

simov avatar Jan 12 '20 13:01 simov

ok, thank you

DoctorSubtilis avatar Jan 12 '20 14:01 DoctorSubtilis

Today I found a workaround: put within the css (in Chomium extension folder) a link toward my css: @import url(http://localhost/path-to-my-file/myfile.css

another small question

So it works, but I noticed that the left toc div (in chromium window) isn't affected by css (even I use #_toc)

Thanks

DoctorSubtilis avatar Apr 03 '20 07:04 DoctorSubtilis

I'm probably using some really heavy css rules there, like !important on a # selector, check out the .css files in the repo, you should be able to style it with the correct selector + using !important.

simov avatar Apr 03 '20 08:04 simov

Thank you. Already done, but unsuccessfully (as in attached image): #_toc-left #_toc {background-image: linear-gradient(to right, #d9d9d9,#e6e6e6 80%) !important; color: white;} Screenshot_20200403_102834
Probably this is due to tha fact that ""#_toc" division (the left one), unlike "#_html" div (at right side), doesn't have the class class="markdown-theme" (applied from Chromium: customizable?)

DoctorSubtilis avatar Apr 03 '20 08:04 DoctorSubtilis

Your selector isn't correct ._toc-left is a class, although you probably don't need this, check out the TOC styles here https://github.com/simov/markdown-viewer/blob/master/content/index.css#L56-L92

simov avatar Apr 03 '20 08:04 simov

Thank you. I tried with:
#_toc {background: transparent !important; background-image: linear-gradient(to right, #d9d9d9,#e6e6e6 80%) !important; color: white !important;} but unsuccessfully. Using "inspect", as I said, I see that to "#_toc", unlike "#_html" div, as in attached image, isn't applied the class "markdown-theme": this is the problem, I guess. I don't know if this is your "guilt", so to say, or Chromium... Screenshot_20200403_105309

DoctorSubtilis avatar Apr 03 '20 08:04 DoctorSubtilis

Sorry: the problem was the Chromium cache!
Now it works!

DoctorSubtilis avatar Apr 03 '20 09:04 DoctorSubtilis