Git Product home page Git Product logo

Comments (9)

swaldhoer avatar swaldhoer commented on August 15, 2024 2

The problem comes from extending the css to better handle the table width. There is this issue in the sphinx_rtd_theme repository. I copy the code from a comment fixing the issue, but generating the problem described in this issue:

/* _static/theme_overrides.css */
/* override table width restrictions */
.wy-table-responsive table td, .wy-table-responsive table th {
    white-space: normal;
}

.wy-table-responsive {
    margin-bottom: 24px;
    max-width: 100%;
    overflow: visible;
}
# conf.py
html_static_path = ['_static']

html_context = {
    'css_files': [
        '_static/theme_overrides.css',  # overrides for wide tables in RTD theme
        ],
    }

@chrisjsewell The link you posted does not work anymore.

from sphinx-copybutton.

choldgraf avatar choldgraf commented on August 15, 2024

holy moly! that is huge :-) I haven't seen that on the RTD theme before. Do you think you could try using the "master" branch and see if that fixes it? And if so, we can make a new release

from sphinx-copybutton.

tschinz avatar tschinz commented on August 15, 2024

Well to add on each code cell that image would enlarge my content of the page drastically ;-)
I've tried the master branch code from https://github.com/choldgraf/sphinx-copybutton/tree/master/sphinx_copybutton
But then no button appears. I've also changed the icon in the conf.py with a smaller one, which helps ,but the location is still wrong.
copybutton_image_path = 'img/copybutton.svg'

image

Like your css is not taken into consideration. I've also tried adding my own css but this has also no effect:

html_static_path = ['_static']

html_css_files = [
    'css/copybutton.css',
]
# or
html_context = {
  'cssfiles': ['_static/css/copybutton.css']
}

from sphinx-copybutton.

choldgraf avatar choldgraf commented on August 15, 2024

hmmm - it is strange that no button appears when on master. I just tried out the sphinx_rtd_theme on my local master branch and it worked fine:

image

I'm not sure how to debug on your side, but you shouldn't need to manually add any extra CSS files yourself...maybe also make sure your Sphinx is updated?

from sphinx-copybutton.

tschinz avatar tschinz commented on August 15, 2024

It was my error why the master had no button, I corrected it but got the same error as on the pip install version.
In the mean time I also tried building without any extentions without luck. In the end I got it to work with the external css file.
herafter my conf.py: https://github.com/tschinz/zawiki/blob/master/source/conf.py
Thanks for your help

from sphinx-copybutton.

chrisjsewell avatar chrisjsewell commented on August 15, 2024

FYI the RTD theme works fine for me: https://17-145482568-gh.circle-artifacts.com/0/html/intro/get_started.html#quick-installation

from sphinx-copybutton.

swaldhoer avatar swaldhoer commented on August 15, 2024

@choldgraf Did you have time to look into this issue based on my comment?

from sphinx-copybutton.

choldgraf avatar choldgraf commented on August 15, 2024

I haven't had time - but I am more than happy to review a PR from somebody that both

  • Fixes this in the RTD theme
  • Doesn't break this in any other Sphinx theme

👍

from sphinx-copybutton.

swaldhoer avatar swaldhoer commented on August 15, 2024

I don't know why and what has changed, but this problem no longer happens since

  • sphinx_rtd_theme 0.5.0
  • sphinx_copybutton 0.3.0

Edit: Just to document, that it really works: custom CSS from the issue I mentioned in #69 (comment): https://github.com/swaldhoer/native-lua/blob/a4d4f83fe16f2248b61d62ef740e6492a33869fd/docs/_static/custom.css
and the documentation works fine: https://native-lua.readthedocs.io/en/latest/build.html

from sphinx-copybutton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.