mirror of
https://github.com/kremalicious/blog.git
synced 2024-12-22 09:13:35 +01:00
code syntax style tweaks
This commit is contained in:
parent
8de5c43119
commit
34e9c6c11d
@ -16,7 +16,6 @@ kbd {
|
||||
code,
|
||||
samp {
|
||||
white-space: normal;
|
||||
background: #444;
|
||||
color: inherit;
|
||||
background-color: rgba($code-bg, .05);
|
||||
border-radius: $border-radius;
|
||||
@ -32,6 +31,7 @@ kbd {
|
||||
}
|
||||
|
||||
pre {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 0;
|
||||
margin-bottom: $spacer;
|
||||
@ -43,41 +43,70 @@ pre {
|
||||
// make 'em scrollable
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
max-height: 300px;
|
||||
max-height: 800px;
|
||||
|
||||
@media (min-width: $screen-sm) {
|
||||
max-height: 80vh;
|
||||
margin-left: -($spacer);
|
||||
margin-right: -($spacer);
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: .8rem;
|
||||
padding: 0 $spacer / 2;
|
||||
padding: $spacer / 2;
|
||||
white-space: pre;
|
||||
display: block;
|
||||
color: inherit;
|
||||
overflow-wrap: normal;
|
||||
word-wrap: normal;
|
||||
word-break: normal;
|
||||
overflow: auto;
|
||||
float: left;
|
||||
|
||||
@media (min-width: $screen-sm) {
|
||||
padding-left: $spacer;
|
||||
padding-right: $spacer;
|
||||
|
||||
&:first-child {
|
||||
padding-top: $spacer;
|
||||
padding: $spacer;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-bottom: $spacer;
|
||||
&::-webkit-scrollbar {
|
||||
width: .35rem;
|
||||
height: .35rem;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: rgba($brand-main, .8);
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background: rgba($brand-main, .2);
|
||||
border-bottom-left-radius: $border-radius;
|
||||
border-bottom-right-radius: $border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
pre[data-language='bash'] .vscode-highlight-line:only-child {
|
||||
pre[data-language]::before {
|
||||
background: $brand-grey;
|
||||
border-radius: 0 0 $border-radius $border-radius;
|
||||
color: $brand-grey-dimmed;
|
||||
font-size: $font-size-mini;
|
||||
font-family: $font-family-base;
|
||||
letter-spacing: .05em;
|
||||
line-height: 1;
|
||||
padding: .25rem .5rem;
|
||||
position: absolute;
|
||||
right: $spacer / 2;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
pre[data-language='js']::before {
|
||||
content: 'js';
|
||||
}
|
||||
|
||||
pre[data-language='bash'] {
|
||||
&::before {
|
||||
content: 'bash';
|
||||
}
|
||||
|
||||
.vscode-highlight-line:only-child {
|
||||
padding-left: .5rem;
|
||||
display: block;
|
||||
|
||||
@ -88,4 +117,17 @@ pre[data-language='bash'] .vscode-highlight-line:only-child {
|
||||
margin-left: -.5rem;
|
||||
margin-right: .5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pre[data-language='html']::before {
|
||||
content: 'html';
|
||||
}
|
||||
|
||||
pre[data-language='css']::before {
|
||||
content: 'css';
|
||||
}
|
||||
|
||||
pre[data-language='php']::before {
|
||||
content: 'php';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user