diff options
author | Martin Fischer <martin@push-f.com> | 2021-12-26 21:24:07 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-12-26 22:14:39 +0100 |
commit | 93b645d6626e9f9b80f5b2f9fde55d700346bd24 (patch) | |
tree | 5d6e3fda16c06dd72784137c412e60551c743861 /doc | |
parent | 9cd171ec763b58e607f8daf8cda96cc9d6269ce4 (diff) | |
download | pygments-git-93b645d6626e9f9b80f5b2f9fde55d700346bd24.tar.gz |
demo: limit height of formatted code (overflow)
For large files it's better to have a viewport because
then you can view both the form as well as the part of
the output you are interested in at the same time.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/_static/demo.css | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/doc/_static/demo.css b/doc/_static/demo.css index ec4468b3..987f0f28 100644 --- a/doc/_static/demo.css +++ b/doc/_static/demo.css @@ -3,6 +3,7 @@ border-radius: 0; border: 1px solid #ccc; margin-top: 15px; + margin-bottom: 10px; padding: 10px 15px 5px 10px; position: relative; } @@ -19,12 +20,24 @@ } #hlcode { - padding: 10px 0; + margin: 10px 0; + max-height: 500px; + overflow: auto; + border: 1px solid #ccc; +} + +#hlcode:empty { + display: none; } #hlcode pre { background-color: transparent; - border-radius: 0; + border: 0; + margin: 0; +} +#hlcode table { + /* unset negative margin from pygments14.css */ + margin: unset; } #code-header:not([hidden]) { |