-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Custom CSS using a :stylesheet:
#296
Comments
Hello @john-cj
Could you please explain why?
In my opinion the above is not really portable.
The main benefit is that your document is portable. Meaning that you don't add specific attribute just for the browser extension. Also, I might not be able to link an external resource for security reason. |
Hello, Guillaume. It seems, there is very friendly spirit here.
Yes, of course. My problem is that I want to start from blank CSS file and then, from time to time, to add different things here-and-there according to my needs. So, the style sheet will be updated very often. But as I understand, when I add the style sheet to the extension itself, the changes in the style sheet file (located in To be honest, I don't understand why it is bad for portability. You have adoc document:
Then, you can open it with browser extension. Or you can convert it to HTML or PDF with command line utility. And it will look the same. Isn't it perfect? No additional job. |
Thanks for your feedback, I will see what I can do 😉 |
I have slightly improved my workaround and now there is no need to overwrite anything. The key point is to add blank CSS:
(Though, a native |
I'm not sure I understand why it's a problem for the stylesheet to be an absolute path, unless the browser extension simply won't allow it (but then how does the described workaround work?). If the value of the stylesheet is an absolute path, I think the extension should just use it as it is (if possible). |
I'm also wondering how/why the |
Actually, it includes |
I see that's why it's working... so the question is should we add the following permission: "permissions":[
// ...
"*://*/*.css"
], |
Personally, I would prefer
Custom CSS is useful, JS is useful as well. For example, I use a script that shows footnotes when I hover over them, and it requires jQuery. So, currently, I need to download jQuery, then add this script in the jQuery file, and then add jQuery file in the extension using browser GUI menu. (It seems that the overall process is not as fast and nice as it could be.) |
@Mogztter It seems you haven't considered to add CSS access yet? :) |
@john-cj Sorry for the late reply, I'm still considering it but Chrome and Firefox review process are getting more strict. The extension is already subject to an in-depth review: So I'm not even sure it will pass the review if I add your suggestion. |
Not sure why I haven't posted the following workaround earlier, but it is better than the previous one. Instead of including an
include a
|
I use asciidoctor.js for chrome and I would love to have an option to specify a But this does not (yet?) work and I successfully can use the workaround mentioned above, although for me it needs to be:
|
Is there a way to use custom CSS without adding it to the extension itself? Adding to the extension is a good option, but for me it is not very convenient.
This is what I have tried:
Doesn't work. As well, as this:
There is a workaround to use
include
, yes.This workaround isn't good, mainly, because it is necessary to override a lot of existing rules. E.g.
The text was updated successfully, but these errors were encountered: