portails/assets/scss/components/_code.scss

67 lines
918 B
SCSS
Raw Normal View History

2020-04-15 15:48:16 +02:00
pre,
code,
kbd,
samp {
font-family: $font-family-monospace;
font-size: $font-size-sm;
border-radius: $border-radius;
}
code {
background: $beige;
color: $black;
padding: 0.25rem 0.5rem;
}
2021-03-15 18:55:49 +01:00
pre {
margin: 2rem 0;
}
2020-04-15 15:48:16 +02:00
pre code {
2021-03-15 18:55:49 +01:00
display: block;
overflow-x: auto;
line-height: $line-height-base;
padding: 1.25rem 1.5rem;
tab-size: 4;
2021-03-19 15:13:09 +01:00
scrollbar-width: thin;
scrollbar-color: transparent transparent;
2020-04-15 15:48:16 +02:00
}
2020-11-04 08:26:58 +01:00
2021-03-15 18:55:49 +01:00
.hljs {
padding: 1.5rem !important;
2021-03-15 18:55:49 +01:00
}
2020-11-04 08:26:58 +01:00
2021-03-15 18:55:49 +01:00
@include media-breakpoint-down(sm) {
2020-11-04 08:26:58 +01:00
pre,
code,
kbd,
samp {
border-radius: 0;
}
2021-03-15 18:55:49 +01:00
pre {
margin: 2rem -1.5rem;
}
2020-11-04 08:26:58 +01:00
}
2021-03-19 15:13:09 +01:00
pre code::-webkit-scrollbar {
height: 5px;
}
pre code::-webkit-scrollbar-thumb {
2021-04-13 12:03:45 +02:00
background: $gray-400;
2021-03-19 15:13:09 +01:00
}
pre code:hover {
scrollbar-width: thin;
2021-04-13 12:03:45 +02:00
scrollbar-color: $gray-500 transparent;
2021-03-19 15:13:09 +01:00
}
pre code::-webkit-scrollbar-thumb:hover {
2021-04-13 12:03:45 +02:00
background: $gray-500;
2021-03-19 15:13:09 +01:00
}
2021-07-01 16:21:03 +02:00
code.language-mermaid {
background: none;
}