mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
improve code spacing
This commit is contained in:
@@ -159,7 +159,13 @@
|
||||
<div
|
||||
class="u-margin-block-start-8"
|
||||
style="margin-block-end: 1rem;">
|
||||
<Code language={part.language} code={part.value} noMargin />
|
||||
<Code
|
||||
label={part.language}
|
||||
language={part.language}
|
||||
code={part.value}
|
||||
noMargin
|
||||
noBoxPadding
|
||||
withCopy />
|
||||
</div>
|
||||
{/key}
|
||||
{/if}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
export let withLineNumbers = false;
|
||||
export let withCopy = false;
|
||||
export let noMargin = false;
|
||||
export let noBoxPadding = false;
|
||||
export let allowScroll = false;
|
||||
|
||||
Prism.plugins.customClass.prefix('prism-');
|
||||
@@ -38,7 +39,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<section class="box u-overflow-hidden" class:common-section={!noMargin}>
|
||||
<section class="box u-overflow-hidden" class:common-section={!noMargin} class:noBoxPadding>
|
||||
<div
|
||||
class="controls u-position-absolute u-inset-inline-end-8 u-inset-block-start-8 u-flex u-gap-8">
|
||||
{#if label}
|
||||
@@ -79,11 +80,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
.noBoxPadding {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.with-scroll {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding-inline-end: 7rem !important; // Add space for label and copy btn
|
||||
}
|
||||
|
||||
code,
|
||||
pre {
|
||||
&[class*='language-'] {
|
||||
@@ -116,7 +125,7 @@
|
||||
:not(pre) > code[class*='language-'],
|
||||
pre[class*='language-'] {
|
||||
background: hsl(var(--p-box-background-color));
|
||||
padding-block-start: 4%;
|
||||
|
||||
margin: 0;
|
||||
}
|
||||
.prism-token {
|
||||
|
||||
Reference in New Issue
Block a user