syntaxhighlight: fix borders using highlight shortcode #569

This commit is contained in:
Sören Weber 2023-06-15 21:57:08 +02:00
parent c3015432e5
commit 5218972b06
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -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;
}