Copybuttons appear on a new line at the bottom of a cell instead of the top right corner
Describe the bug
Copybuttons appear on a new line at the bottom of a cell instead of the top right corner:
I don't know if it is related to the sphinx_rtd_theme.
Also, when I followed the docs to find some info on how to customize the CSS, in this section the following link lead nowhere: https://github.com/ExecutableBookProject/sphinx-copybutton/blob/master/_static/copybutton.css
Environment
- Python 3.7.6
- notebook: 6.0.3
- sphinx_rtd_theme: 0.5.0
- Operating System: Ubuntu 20.04
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:
hmmm - could this be related to some of the SVG changes that @pradyunsg made to the copy icons? This used to show up fine on RTD I believe.
And thanks for pointing out the broken link, fixed now@!
I tried the css suggestions in #69 but that did not help
Same issue here
% cat requirements.txt
sphinx==5.2.0
sphinx-rtd-theme==0.5.2
sphinxcontrib-wavedrom==3.0.2
sphinx-multiversion==0.2.4
sphinx-copybutton==0.5.1
Please read this section: https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html#how-to-add-custom-css-or-javascript-to-sphinx-documentation
Please check your project for anything that looks like this:
html_context = {
'css_files': [ '_static/my_custom_file.css' ] ## DO NOT DO THIS, RTDs!
}
Please see if correcting this discrepancy resolves your usage issue. Use of html_context like this is overriding and replacing the internal data model, so any extensions that contributed via app.add_css_file() API have their CSS file contributions lost.
This can be confirmed if you check the output HTML for the lack of copybutton.css that is contributed by this extension at https://github.com/executablebooks/sphinx-copybutton/blob/master/sphinx_copybutton/init.py#L92
HTH