mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Corrected spacing for single code blocks in tabbed containers
This commit is contained in:
parent
825eeae70c
commit
4a8adb8143
@ -263,7 +263,7 @@ $codehilite-whitespace: transparent;
|
|||||||
.md-typeset {
|
.md-typeset {
|
||||||
|
|
||||||
// Block with line numbers
|
// Block with line numbers
|
||||||
> .codehilitetable {
|
.codehilitetable {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
border-radius: px2rem(2px);
|
border-radius: px2rem(2px);
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
margin-left: px2em(-16px, 13.6px);
|
margin-left: px2em(-16px, 13.6px);
|
||||||
padding-left: px2em(16px, 13.6px);
|
padding-left: px2em(16px, 13.6px);
|
||||||
float: left;
|
float: left;
|
||||||
background-color: var(--md-code-bg-color);
|
|
||||||
color: var(--md-default-fg-color--lighter);
|
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);
|
box-shadow: inset px2rem(-1px) 0 var(--md-default-fg-color--lightest);
|
||||||
content: attr(data-linenos);
|
content: attr(data-linenos);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
@ -34,15 +34,18 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
box-shadow: 0 px2rem(-1px) var(--md-default-fg-color--lightest);
|
box-shadow: 0 px2rem(-1px) var(--md-default-fg-color--lightest);
|
||||||
|
|
||||||
// Actual content
|
// Mirror old superfences behavior, if there's only a single code block.
|
||||||
pre {
|
> .codehilite:only-child pre,
|
||||||
|
> .codehilitetable:only-child,
|
||||||
|
> .highlight:only-child pre,
|
||||||
|
> .highlighttable:only-child {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
|
||||||
|
|
||||||
// Remove rounded borders at the top
|
// Remove rounded borders at the top
|
||||||
code {
|
> code {
|
||||||
border-top-left-radius: 0;
|
border-top-left-radius: 0;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nested tabs
|
// Nested tabs
|
||||||
|
Loading…
Reference in New Issue
Block a user