refactor: unify the border radius of blocks

scope: code blocks, prompts, images, and videos
This commit is contained in:
Cotes Chung 2022-12-20 16:04:39 +08:00
parent 9306c7b39e
commit e01eb8af14
No known key found for this signature in database
GPG Key ID: 0D9E54843167A808
4 changed files with 16 additions and 19 deletions

View File

@ -134,10 +134,11 @@ blockquote {
&[class^="prompt-"] {
display: flex;
border-left: 0;
border-radius: 6px;
padding: 1rem;
color: var(--prompt-text-color);
@extend %rounded;
&::before {
text-align: center;
width: 1.25rem;
@ -543,11 +544,13 @@ i { /* fontawesome icons */
}
}
.rounded-10 {
border-radius: 10px !important;
}
.img-link {
color: transparent;
display: inline-flex;
@extend %img-rounded;
}
.shimmer {
@ -579,9 +582,10 @@ i { /* fontawesome icons */
.embed-video {
width: 100%;
height: 100%;
border-radius: 4px;
margin-bottom: 1rem;
@extend %rounded;
&.youtube {
aspect-ratio: 16 / 9;
}

View File

@ -90,8 +90,8 @@
font-style: normal;
}
%img-rounded {
border-radius: 10px;
%rounded {
border-radius: 6px;
}
%img-caption {

View File

@ -29,18 +29,12 @@ html {
}
}
/* -- Codes Snippet -- */
$code-radius: 6px;
/* -- code snippets -- */
%code-snippet-bg {
background: var(--highlight-bg-color);
}
%code-snippet-radius {
border-radius: $code-radius;
}
%code-snippet-padding {
padding-left: 1rem;
padding-right: 1.5rem;
@ -48,7 +42,7 @@ $code-radius: 6px;
.highlighter-rouge {
@extend %code-snippet-bg;
@extend %code-snippet-radius;
@extend %rounded;
color: var(--highlighter-rouge-color);
margin-top: 0.5rem;
@ -56,7 +50,7 @@ $code-radius: 6px;
}
.highlight {
@extend %code-snippet-radius;
@extend %rounded;
@extend %code-snippet-bg;
@at-root figure#{&} {
@ -173,8 +167,6 @@ div {
$code-header-height: 2.25rem;
border-top-left-radius: $code-radius;
border-top-right-radius: $code-radius;
display: flex;
justify-content: space-between;
align-items: center;
@ -226,9 +218,9 @@ div {
/* clipboard */
button {
@extend %cursor-pointer;
@extend %rounded;
border: 1px solid transparent;
border-radius: $code-radius;
height: $code-header-height;
width: $code-header-height;
padding: 0;

View File

@ -33,6 +33,7 @@
.preview-img {
@include align-center;
@extend %preview-margin;
@extend %rounded;
max-width: 100%;
@ -48,7 +49,7 @@
object-fit: cover;
@extend %preview-margin;
@extend %img-rounded;
@extend %rounded;
}
}