Corrected spacing for single code blocks in tabbed containers

This commit is contained in:
squidfunk 2020-03-16 10:05:04 +01:00
parent 825eeae70c
commit 4a8adb8143
3 changed files with 12 additions and 9 deletions

View File

@ -263,7 +263,7 @@ $codehilite-whitespace: transparent;
.md-typeset {
// Block with line numbers
> .codehilitetable {
.codehilitetable {
margin: 1em 0;
border-radius: px2rem(2px);

View File

@ -39,8 +39,8 @@
margin-left: px2em(-16px, 13.6px);
padding-left: px2em(16px, 13.6px);
float: left;
background-color: var(--md-code-bg-color);
color: var(--md-default-fg-color--lighter);
background-color: var(--md-code-bg-color);
box-shadow: inset px2rem(-1px) 0 var(--md-default-fg-color--lightest);
content: attr(data-linenos);
user-select: none;

View File

@ -34,16 +34,19 @@
width: 100%;
box-shadow: 0 px2rem(-1px) var(--md-default-fg-color--lightest);
// Actual content
pre {
// Mirror old superfences behavior, if there's only a single code block.
> .codehilite:only-child pre,
> .codehilitetable:only-child,
> .highlight:only-child pre,
> .highlighttable:only-child {
margin: 0;
}
// Remove rounded borders at the top
code {
> code {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
// Nested tabs
> .tabbed-set {