🎨 refactor: turn macros into partials & sort CSS (#146)
This commit is contained in:
@@ -2,21 +2,21 @@ code {
|
||||
border-radius: 5px;
|
||||
background-color: var(--bg-1);
|
||||
padding: 0.1em 0.2em;
|
||||
font-family: var(--code-font);
|
||||
font-size: 0.9rem;
|
||||
font-family: var(--code-font);
|
||||
|
||||
mark {
|
||||
display: block;
|
||||
filter: brightness(110%);
|
||||
background-color: var(--codeblock-highlight);
|
||||
color: inherit;
|
||||
filter: brightness(110%);
|
||||
display: block;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin: 0rem;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0rem;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
|
||||
td,
|
||||
@@ -27,8 +27,8 @@ code {
|
||||
}
|
||||
|
||||
tbody td:first-child {
|
||||
user-select: none;
|
||||
width: 2rem;
|
||||
user-select: none;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -43,63 +43,63 @@ a:hover code {
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
display: block;
|
||||
line-height: 1.4;
|
||||
overflow-x: auto;
|
||||
padding: 2.4rem 1rem 1rem;
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
padding: 2.4rem 1rem 1rem;
|
||||
overflow: hidden;
|
||||
overflow-x: auto;
|
||||
line-height: 1.4;
|
||||
|
||||
code {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
white-space: pre;
|
||||
font-size: 0.8rem; // Fits ~77 characters.
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
padding: 0rem;
|
||||
border: 0rem;
|
||||
border-radius: 5px;
|
||||
background-color: transparent;
|
||||
padding: 0rem;
|
||||
overflow-x: auto;
|
||||
color: inherit;
|
||||
font-size: 0.8rem; // Fits ~77 characters.
|
||||
white-space: pre;
|
||||
|
||||
&::before {
|
||||
content: attr(data-lang);
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: var(--primary-color);
|
||||
color: var(--hover-color);
|
||||
padding: 0.3rem;
|
||||
padding-left: 1rem;
|
||||
width: calc(100% - 1.3rem);
|
||||
height: 0.9rem;
|
||||
content: attr(data-lang);
|
||||
color: var(--hover-color);
|
||||
font-size: 0.65rem;
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
text-transform: uppercase;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.copy-code {
|
||||
z-index: 1;
|
||||
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M217.002-67.694q-37.732 0-64.02-26.288-26.287-26.287-26.287-64.019V-707.69h77.999v549.689q0 4.615 3.846 8.462 3.846 3.846 8.462 3.846h451.689v77.999H217.002Zm175.999-175.999q-37.733 0-64.02-26.287T302.694-334v-463.383q0-37.732 26.287-64.02 26.287-26.287 64.02-26.287h365.383q37.732 0 64.019 26.287 26.288 26.288 26.288 64.02V-334q0 37.733-26.288 64.02-26.287 26.287-64.019 26.287H393.001Zm0-77.998h365.383q4.615 0 8.462-3.847 3.846-3.846 3.846-8.462v-463.383q0-4.616-3.846-8.462-3.847-3.846-8.462-3.846H393.001q-4.616 0-8.462 3.846-3.847 3.846-3.847 8.462V-334q0 4.616 3.847 8.462 3.846 3.847 8.462 3.847Zm-12.309 0v-488V-321.691Z'/%3E%3C/svg%3E");
|
||||
background: var(--hover-color);
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
height: 0.9rem;
|
||||
width: 0.9rem;
|
||||
background-size: contain;
|
||||
color: white;
|
||||
right: 0.7rem;
|
||||
top: 0.3rem;
|
||||
right: 0.7rem;
|
||||
align-self: center;
|
||||
z-index: 1;
|
||||
cursor: pointer;
|
||||
background: var(--hover-color);
|
||||
background-size: contain;
|
||||
width: 0.9rem;
|
||||
height: 0.9rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.copy-code.checked {
|
||||
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' %3E%3Cpath d='M395-253 194-455l83-83 118 117 288-287 83 84-371 371Z'/%3E%3C/svg%3E");
|
||||
height: 1rem;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.copy-code.error {
|
||||
|
Reference in New Issue
Block a user