From: Anton H. <to...@ar...> - 2024-03-24 09:47:36
|
Hi. It appears there's some units missing from: https://github.com/docutils/docutils/blob/b768e2626088711dec257b0847b563d02700a712/docutils/docutils/parsers/rst/directives/__init__.py#L240 Namely: vh, vw, vmin, vmax, lvh, dvh, svw, lvw, dvw, svmin, lvmin, dvmin, svmax, lvmax, dvmax, vi, svi, lvi, dvi, vb, svb, lvb and dvb These are part of the new HTML/CSS viewport units and are are/will be part of CSS templates: https://web.archive.org/web/20240114171725/https://www.terluinwebdesign.nl/en/css/incoming-20-new-css-viewport-units-svh-lvh-dvh-svw-lvw-dvw/ If these are not compatible for some reason, perhaps they could be given as a complementary argument to https://github.com/docutils/docutils/blob/b768e2626088711dec257b0847b563d02700a712/docutils/docutils/parsers/rst/directives/__init__.py#L262C5-L262C23 for instance? I'm coming from a sphinx usage, where rendering HTML with CSS is the base concept. Where I might have a reST similar to: ``` Some Header =========== .. list-table:: * - .. figure:: /_static/a_picture.webp :width: 25dvw ``` And when running `make build` I'll hit: https://github.com/docutils/docutils/blob/b768e2626088711dec257b0847b563d02700a712/docutils/docutils/parsers/rst/directives/__init__.py#L256-L258 Because `units` is equal to `length_units` which is missing the unit dvw. //Anton |