fix: improve spacing of shortcodes (#583)

This commit is contained in:
Robert Kaussow 2023-02-16 09:01:43 +01:00 committed by GitHub
parent 1bf4ccced7
commit 935b200eb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 52 deletions

View File

@ -237,11 +237,6 @@ svg.gdoc-icon {
font-weight: normal; font-weight: normal;
} }
> :first-child,
> :first-child > :first-child {
margin-top: 0;
}
section { section {
margin-top: $padding-32; margin-top: $padding-32;
} }
@ -752,6 +747,8 @@ svg.gdoc-icon {
} }
.gdoc-toc { .gdoc-toc {
margin: $padding-16 0;
// Classes to hide nested levels of ToC/Menu // Classes to hide nested levels of ToC/Menu
&__level--1 ul ul, &__level--1 ul ul,
&__level--2 ul ul ul, &__level--2 ul ul ul,

View File

@ -10,7 +10,6 @@
.highlight { .highlight {
pre.chroma { pre.chroma {
margin: 0;
width: 100%; width: 100%;
overflow: auto; overflow: auto;
max-height: var(--code-max-height); max-height: var(--code-max-height);
@ -32,6 +31,7 @@
pre.chroma { pre.chroma {
max-height: none; max-height: none;
border-radius: 0; border-radius: 0;
margin: 0;
} }
} }
.chroma .lntable td:first-child { .chroma .lntable td:first-child {

View File

@ -1,24 +1,6 @@
.gdoc-markdown { .gdoc-markdown {
line-height: 1.6em; line-height: 1.6em;
> :first-child {
margin-top: 0 !important;
}
&--nested {
:first-child {
margin-top: 0 !important;
}
> pre {
margin-top: 0 !important;
}
> :last-child {
margin-bottom: 0;
}
}
h1, h1,
h2, h2,
h3, h3,
@ -127,13 +109,6 @@
border-left: $border-4 solid var(--accent-color); border-left: $border-4 solid var(--accent-color);
border-radius: $border-radius; border-radius: $border-radius;
:first-child {
margin-top: 0;
}
:last-child {
margin-bottom: 0;
}
} }
table:not(.lntable):not(.highlight) { table:not(.lntable):not(.highlight) {
@ -185,10 +160,6 @@
} }
} }
pre {
margin: 1rem 0;
}
code { code {
padding: 0.2em 0.4em; padding: 0.2em 0.4em;
} }

View File

@ -1,7 +1,6 @@
// {{< expand "Label" "icon" >}} // {{< expand "Label" "icon" >}}
.gdoc-expand { .gdoc-expand {
margin-top: $padding-16; margin: $padding-16 0;
margin-bottom: $padding-16;
border: $border-1 solid var(--accent-color); border: $border-1 solid var(--accent-color);
border-radius: $border-radius; border-radius: $border-radius;
@ -16,7 +15,7 @@
&__content { &__content {
display: none; display: none;
padding: $padding-16; padding: 0 $padding-16;
} }
&__control:checked + &__content { &__control:checked + &__content {
@ -30,8 +29,7 @@
// {{< tabs >}} // {{< tabs >}}
.gdoc-tabs { .gdoc-tabs {
margin-top: $padding-16; margin: $padding-16 0;
margin-bottom: $padding-16;
border: $border-1 solid var(--accent-color); border: $border-1 solid var(--accent-color);
border-radius: $border-radius; border-radius: $border-radius;
@ -52,7 +50,7 @@
order: 999; //Move content blocks to the end order: 999; //Move content blocks to the end
width: 100%; width: 100%;
border-top: $border-1 solid var(--accent-color-lite); border-top: $border-1 solid var(--accent-color-lite);
padding: $padding-16; padding: 0 $padding-16;
display: none; display: none;
} }
@ -70,6 +68,8 @@
// {{< columns >}} // {{< columns >}}
.gdoc-columns { .gdoc-columns {
margin: $padding-16 0;
&--regular > :first-child { &--regular > :first-child {
flex: 1; flex: 1;
} }
@ -86,7 +86,6 @@
&__content { &__content {
flex: 1 1; flex: 1 1;
margin: $padding-16 0;
min-width: $body-min-width * 0.66; min-width: $body-min-width * 0.66;
padding: 0; padding: 0;
} }
@ -99,12 +98,12 @@
// {{< button >}} // {{< button >}}
.gdoc-button { .gdoc-button {
$root: &; $root: &;
margin: $padding-16 0;
display: inline-block; display: inline-block;
background: var(--accent-color-lite); background: var(--accent-color-lite);
border: $border-1 solid var(--accent-color); border: $border-1 solid var(--accent-color);
border-radius: $border-radius; border-radius: $border-radius;
margin: $padding-8 0;
cursor: pointer; cursor: pointer;
&__link { &__link {
@ -218,15 +217,6 @@
} }
} }
&__description {
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
}
@each $name, $color in $hint-colors { @each $name, $color in $hint-colors {
&__tag.#{$name} { &__tag.#{$name} {
border-color: scale-color($color, $lightness: 90%, $saturation: -30%); border-color: scale-color($color, $lightness: 90%, $saturation: -30%);

View File

@ -83,6 +83,11 @@
.table-wrap { .table-wrap {
overflow: auto; overflow: auto;
margin: $padding-16 0;
> table {
margin: 0 !important;
}
} }
.badge-placeholder { .badge-placeholder {