diff --git a/static/css/theme.css b/static/css/theme.css index df5b77f121..8735c1da55 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -625,11 +625,6 @@ code { white-space: nowrap; } -.chroma td.lntd:nth-child(2){ - /* if highlight shortcode used in table mode, increase code column to full width */ - width: 100%; -} - span.copy-to-clipboard { display: inline-block; white-space: nowrap; @@ -671,6 +666,22 @@ pre code { white-space: inherit; } +/* increase code column to full width if highlight shortcode was used in table lineno mode */ +td.lntd:nth-child(2){ + width: 100%; +} + +/* remove border from lineno column if highlight shortcode was used in table lineno mode */ +td.lntd > pre.chroma:not(.pre-code) { + border-bottom-right-radius: 0; + border-right-width: 0; + border-top-right-radius: 0; +} +td.lntd:nth-child(2) pre { + border-bottom-left-radius: 0; + border-top-left-radius: 0; +} + hr { border-bottom: 4px solid rgba( 134, 134, 134, .125 ); } @@ -1964,8 +1975,12 @@ html[dir="rtl"] #sidebar ul.collapsible-menu > li > label > i.fa-chevron-right { padding: 0; } -/* remove border from a code block if single */ -#body .tab-content-text > div.highlight:only-child > pre, +/* remove border from code block if single in tab */ +#body .tab-content-text > div.highlight:only-child pre, #body .tab-content-text > pre.pre-code:only-child{ - border: 0; + border-width: 0; +} +/* re-add border on code column if a single in tab and highlight shortcode was used in table lineno mode */ +#body .tab-content-text > div.highlight:only-child td.lntd:nth-child(2) pre { + border-left-width: 1px; }