Skip to content

Commit

Permalink
Explicit CSS for line numbers in code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Oct 23, 2020
1 parent ec9da1d commit 9963678
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 0 additions & 9 deletions doc/showcase/code-blocks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@ No language:
print('Hello,')
print('world!')
.. note::

There are problems with the style of line numbers when using Pygments 2.7+,
see https://github.com/sphinx-doc/sphinx/issues/8254.
Until this is fixed, you can pin your version of Pygments::

python3 -m pip install "pygments<2.7"


``:emphasize-lines:``

.. code-block:: python
Expand Down
10 changes: 10 additions & 0 deletions src/insipid_sphinx_theme/insipid/static/insipid.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,16 @@ div.code-block-caption {
font-size: unset;
}

td.linenos .linenodiv pre {
color: #666;
background-color: transparent;
padding: 7px 0px;
}

table.highlighttable td.linenos {
padding-right: 0.5em;
}

/* highlighted line (:emphasize-lines:) */
.highlight .hll {
padding: 0 0.5em;
Expand Down

0 comments on commit 9963678

Please sign in to comment.