This commit is contained in:
75
miniprogram/src/components/MarkdownReader/index.scss
Normal file
75
miniprogram/src/components/MarkdownReader/index.scss
Normal file
@@ -0,0 +1,75 @@
|
||||
.markdown-reader {
|
||||
.markdown-text {
|
||||
/* Inherit font styles and color from parent */
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
|
||||
/* Ensure rich text images are responsive */
|
||||
image {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.markdown-code-block {
|
||||
margin: 16px 0;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background-color: #1e1e1e;
|
||||
border: 1px solid #333;
|
||||
|
||||
.code-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 12px;
|
||||
background-color: #252526;
|
||||
border-bottom: 1px solid #333;
|
||||
|
||||
.language {
|
||||
color: #9cdcfe;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
transition: background-color 0.2s;
|
||||
|
||||
&:active {
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.copy-text {
|
||||
color: #ccc;
|
||||
font-size: 12px;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.code-content {
|
||||
padding: 12px;
|
||||
background-color: #1e1e1e;
|
||||
max-height: 400px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.code-text {
|
||||
color: #d4d4d4;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
white-space: pre;
|
||||
display: block;
|
||||
width: max-content;
|
||||
min-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user