From e496f91cc219ae66b1defdd2ee039828d7b3c443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matth=C3=A4us=20G=2E=20Chajdas?= Date: Fri, 12 Feb 2021 14:23:09 +0100 Subject: Document the line number styling changes. --- CHANGES | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGES b/CHANGES index e62bc411..f695acab 100644 --- a/CHANGES +++ b/CHANGES @@ -32,6 +32,22 @@ Version 2.8.0 - Changed setuptools to use a declarative config through ``setup.cfg``. Building Pygments now requires setuptools 39.2+. - Added markdown to MarkdownLexer aliases (#1687) +- Changed line number handling + + * In ```` based output, the ``td.linenos`` element will have either a + ``normal`` or ``special`` class attached. Previously, only ``special`` line + numbers got a class. This prevents styles from getting applied twice - + once via ``
``, once via ````. This also means
+    that ``td.linenos pre`` is no longer styled, instead, use
+    ``td.linenos .normal`` and ``td.linenos .special``.
+  * In the "inline" style, the DOM element order was changed. The line number
+    is added first, then the line is wrapped is wrapped by the highlighter.
+    This fixes lines not being fully highlighted.
+  * The visual output for inline and non-inline line numbers & highlighting,
+    as well as class-based and inline styling is now consistent.
+  * Line number styles are set to ``background-color: transparent`` and
+    ``color: inherit`` by default. This works much better with dark styles
+    which don't have colors set for line numbers.
 
 
 Version 2.7.4
-- 
cgit v1.2.1