mirror of
https://github.com/KevinMidboe/schleppe-lab.git
synced 2025-12-29 13:21:17 +00:00
Copy btn on code blocks, tweaked code block styling
This commit is contained in:
@@ -151,71 +151,6 @@ blockquote {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Code formatting
|
||||
*/
|
||||
pre,
|
||||
code {
|
||||
font-size: 0.9375em;
|
||||
border: 1px solid hsla(0, 0%, 100%, 0.1);
|
||||
padding: 3em;
|
||||
// background-color: var(--background-color);
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 1px 5px;
|
||||
background-color: rgba(255, 168, 106, 0.2);
|
||||
color: var(--brand-color);
|
||||
margin: 0 2px;
|
||||
padding: 1px 6px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 8px 12px;
|
||||
padding: 1.25em;
|
||||
overflow-x: auto;
|
||||
|
||||
> code {
|
||||
background-color: unset;
|
||||
border: 0;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.highlight {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.highlight > button {
|
||||
all: unset;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 1rem;
|
||||
z-index: 100;
|
||||
cursor: pointer;
|
||||
|
||||
background: hsla(0, 0%, 87.8%, 0.2) !important;
|
||||
border-radius: 0 !important;
|
||||
box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2) !important;
|
||||
color: #bbb !important;
|
||||
font-size: 0.8em !important;
|
||||
margin: 6px !important;
|
||||
padding: 10px !important;
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
|
||||
.highlight:hover > button {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.highlight > button:active,
|
||||
.highlight > button:focus {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clearfix
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user