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

Custom stylesheet with the same name as built-in one #304

Open
john-cj opened this issue Aug 23, 2019 · 1 comment
Open

Custom stylesheet with the same name as built-in one #304

john-cj opened this issue Aug 23, 2019 · 1 comment

Comments

@john-cj
Copy link

john-cj commented Aug 23, 2019

In case the user add the custom stylesheet into the extension, and this stylesheet has the same name as one of built-in stylesheets, the styles will be ignored.

Step-by-step:

  1. Create asciidoctor.css file with single line: p {color: red;}.
  2. Add it to the extension.
  3. Note, that it is now visible in the Custom section, and you can select it.

sheets

However, your documents will use the stylesheet of the same name from the Default section.

So, simply saying you cannot use asciidoctor.css as a file for your custom stylesheet. Something like asciidoctor_custom.css will work,

Tested with Chrome.

@ggrossetie
Copy link
Member

I don't know if it's a good idea to use the same name as one of the built-in stylesheets.
The reason is that I'm using the stylesheet attribute to resolve the stylesheet.

So, if you want to use the built-in stylesheet "riak" in one of your document, you can use:

= Document
:stylesheet: riak.css

But now the browser extension will use the overridden riak stylesheet instead of the default riak stylesheet.

Should we add an error message when you want to add a custom stylesheet with the same name? Should we automatically prefix the stylesheet with "custom_" (if the name conflicts with a built-in stylesheets)? Should we allow to override a built-in stylesheet?

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

No branches or pull requests

2 participants