sphinx-contrib / video

A sphinx plugin that enables embedding of HTML5 videos
https://sphinxcontrib-video.readthedocs.io
Apache License 2.0
43 stars 29 forks source link

how to center align a video ? #38

Open berlin2123 opened 3 months ago

berlin2123 commented 3 months ago

both align or class not work for videos

:class: align-center
:align: center
berlin2123 commented 3 months ago

Temporarily solved by adding custom.css

add lines to custom.css:

/* center video */
video.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

add a class video:

.. video:: _static/video.mp4
    :width: 600
    :class: align-center
12rambau commented 3 months ago

"align" is a image directive keyword and his not supported by the video one. The full list of supported options is decribed in the documentation: https://sphinxcontrib-video.readthedocs.io/en/latest/quickstart.html#options

If you want to add an extra one I'll be happy to review a PR.

berlin2123 commented 3 months ago

No idea on how to achieve alignment. The way to change CSS seems to be a matter of theme, not implemented here.