Close #8634: html: Allow to change the order of JS/CSS#8639
Close #8634: html: Allow to change the order of JS/CSS#8639tk0miya merged 1 commit intosphinx-doc:3.xfrom
Conversation
`Sphinx.add_js_file()` and `Sphinx.add_css_file()` take `priority` argument to change the order of JS/CSS files.
| :widths: 20,80 | ||
|
|
||
| * - Priority | ||
| - Main purpose in Sphinx |
There was a problem hiding this comment.
Note: At present, Sphinx's CSS files are embeded into theme files directly. So it is hard to control its order. I'll improve it in another PR.
|
I think this is great 👍 |
|
I also think this is wonderful: especially when combined with #8634, it is a drastic quality of life improvement—thanks a lot! I also like that without extensions and users doing anything this impementation guarantees that extension assets always come before the user assets, unlike in the previous implementation. I have the following remarks for consideration:
|
|
Oops. I overlooked @akhmerov 's last comment.
Indeed. It would be better if documented.
I did not think about the user configurations. But it is also allowed to give priority via attribute with this change: |
|
I posted #8641 for additional documentation. It would be helpful if you'll review it also (because I'm not good at English...) |
Feature or Bugfix
Purpose
Sphinx.add_js_file()andSphinx.add_css_file()takepriorityargument to change the order of JS/CSS files.