Skip to content

Tab-item is modifying .html files #238

@ramibd

Description

@ramibd

Describe the bug

I'm making a sphinx web page to post work reports, mostly plotly HTML charts. I used .. raw:: html to add the graphs into my .rst file. Now, for better visualization purposes, I'm grouping my charts using sphinx-design tabs property.

Code:

.. tab-set::

   .. tab-item:: Level SA

      .. raw:: html

        <div style="text-align: center;">
        <iframe src="PATH\chart.html" style="border: none; width: 1005px; height: 450px"></iframe>
        </div> 

   .. tab-item:: MoM SA

      .. raw:: html

        <div style="text-align: center;">
        <iframe src="PATH\chart.html" style="border: none; width: 1005px; height: 450px"></iframe>
        </div> 

At first it worked, but then I started having issues with overlapping legends and problems on other features. This doesnt happen when i'm on the first layer of the tabs, only when i got to other layers. Also, if i refresh the web page while, for exemple, the second layer is selected, the error doesnt occur.

HTML on the first layer:

Image

HTML on the second layer:

Image

I tried swapping to sphinx-tabs, instead of sphinx-design, but the same happened. I also tried modifying the _static\tabs.css file, but couldn't figure out where the problem comes from. Does any one knows if there is a way to bypass this behavior?

Reproduce the bug

.Create a tab-set

.Add mutiple tab-item

.Use .. raw:: html to embed a html file in each tab-item

List your environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions