docs/daprdocs/assets/scss/_code.scss

80 lines
1.3 KiB
SCSS

// Code formatting.
.highlight .copy-icon {
position: absolute;
right: 20px;
top: 18px;
opacity: 0.7;
}
.highlight pre {
/* Avoid pushing up the copy buttons. */
margin: 0;
}
.td-content {
// Highlighted code.
.highlight {
@extend .card;
margin: 0rem 0;
padding: 0rem;
margin-bottom: 2rem;
max-width: 100%;
border: none;
pre {
margin: 0;
padding: 1rem;
border-radius: 10px;
}
}
// Inline code
p code,
li>code,
table code {
color: inherit;
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
word-break: normal;
background-color: rgba($black, 0.05);
border-radius: $border-radius;
br {
display: none;
}
}
// Code blocks
pre {
word-wrap: normal;
background-color: $gray-100;
padding: $spacer;
max-width: 100%;
>code {
background-color: inherit !important;
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
border: 0;
}
}
pre.mermaid {
background-color: inherit;
font-size: 0;
}
}