elk/styles/global.css

178 lines
3.1 KiB
CSS
Raw Normal View History

2022-12-09 19:32:09 +03:00
@font-face {
font-display: swap;
font-family: "DM Mono";
font-style: normal;
font-weight: 400;
src: url(/fonts/DM-mono-v10.ttf) format("truetype");
}
@font-face {
font-display: swap;
font-family: "DM Sans";
font-style: normal;
font-weight: 400;
src: url(/fonts/DM-sans-v11.ttf) format("truetype");
}
@font-face {
font-display: swap;
font-family: "DM Serif Display";
font-style: normal;
font-weight: 400;
src: url(/fonts/DM-serif-display-v10.ttf) format("truetype");
}
@font-face {
font-display: swap;
font-family: "Homemade Apple";
font-style: normal;
font-weight: 400;
src: url(/fonts/homemade-apple-v18.ttf) format("truetype");
}
2022-11-15 19:39:25 +03:00
* {
2022-11-24 06:42:03 +03:00
scrollbar-color: #8885 var(--c-border);
2022-11-15 19:39:25 +03:00
}
::-webkit-scrollbar {
2022-11-15 20:14:10 +03:00
width: 10px;
2022-11-15 19:39:25 +03:00
}
::-webkit-scrollbar:horizontal {
2022-11-15 20:14:10 +03:00
height: 10px;
2022-11-15 19:39:25 +03:00
}
::-webkit-scrollbar-track {
2022-11-23 05:16:31 +03:00
background: var(--c-border);
2022-11-15 20:14:10 +03:00
border-radius: 1px;
2022-11-15 19:39:25 +03:00
}
::-webkit-scrollbar-thumb {
2022-11-24 06:42:03 +03:00
background: #8885;
2022-11-15 20:14:10 +03:00
border-radius: 1px;
2022-11-15 19:39:25 +03:00
}
::-webkit-scrollbar-thumb:hover {
2022-11-24 06:42:03 +03:00
background: #8886;
2022-11-15 20:14:10 +03:00
}
2022-12-04 22:06:02 +03:00
::-moz-selection {
background: var(--c-bg-selection);
}
::selection {
background: var(--c-bg-selection);
}
/* Force vertical scrollbar to be always visible to avoid layout shift while loading the content */
2022-11-30 02:04:37 +03:00
body {
overflow-y: scroll;
2022-12-11 13:52:36 +03:00
-webkit-tap-highlight-color: transparent;
2022-11-21 10:14:07 +03:00
}
.zen .zen-hide {
2022-12-04 22:06:02 +03:00
--at-apply: 'op0 hover:op100 transition duration-600';
}
2022-11-21 10:14:07 +03:00
.custom-emoji {
display: inline-block;
overflow: hidden;
2022-11-30 08:58:38 +03:00
max-height: 1.3em;
max-width: 1.3em;
vertical-align: text-bottom;
2022-11-21 10:14:07 +03:00
}
.content-rich {
overflow-wrap: break-word;
2022-11-21 10:14:07 +03:00
a {
2022-12-04 22:06:02 +03:00
--at-apply: 'text-primary hover:underline hover:text-primary-active';
2022-11-21 10:14:07 +03:00
.invisible {
2022-12-04 22:06:02 +03:00
--at-apply: 'hidden';
2022-11-21 10:14:07 +03:00
}
.ellipsis {
--at-apply: 'line-clamp-1 ws-pre-wrap break-all';
&::after {
content: '…';
}
2022-11-21 10:14:07 +03:00
}
}
b, strong {
2022-11-21 10:14:07 +03:00
--at-apply: font-bold;
}
p {
--at-apply: my-2;
}
2022-11-30 07:50:29 +03:00
code {
2022-11-30 10:38:25 +03:00
--at-apply: bg-code text-code px1 py0.5 rounded text-0.9em leading-0.8em;
2022-11-30 07:50:29 +03:00
}
pre code {
2022-11-30 10:38:25 +03:00
--at-apply: bg-transparent px0 py0 rounded-none;
2022-11-30 07:50:29 +03:00
}
2022-11-24 06:42:03 +03:00
.code-block {
2022-11-30 07:50:29 +03:00
--at-apply: font-mono bg-code text-base p3 mt-2 rounded overflow-auto leading-1.6em;
2022-11-24 06:42:03 +03:00
.shiki {
background: transparent !important;
}
}
2022-11-21 10:14:07 +03:00
}
2022-11-24 07:21:30 +03:00
.content-editor {
2022-11-30 07:50:29 +03:00
--at-apply: outline-none flex-1;
max-width: 100%;
2022-11-24 07:21:30 +03:00
}
2022-11-27 08:02:19 +03:00
.content-editor.content-rich {
p {
--at-apply: my-0;
}
}
2022-11-27 08:02:19 +03:00
.skeleton-loading-bg {
2022-12-04 22:06:02 +03:00
background: linear-gradient(
90deg,
rgba(190, 190, 190, 0.2) 25%,
rgba(129, 129, 129, 0.24) 37%,
rgba(190, 190, 190, 0.2) 63%
);
2022-11-27 08:02:19 +03:00
background-size: 400% 100%;
animation: skeleton-loading 1.4s ease infinite;
}
@keyframes skeleton-loading {
0% {
2022-12-04 22:06:02 +03:00
background-position: 100% 50%;
2022-11-27 08:02:19 +03:00
}
to {
2022-12-04 22:06:02 +03:00
background-position: 0 50%;
2022-11-27 08:02:19 +03:00
}
}
2022-12-04 22:06:02 +03:00
html, body, #__nuxt {
height: 100vh;
margin: 0;
padding: 0;
}
html.dark {
color-scheme: dark;
}
html {
--at-apply: bg-base text-base;
}
body {
/* Prevent arbitrary zooming on mobile devices */
touch-action: pan-x pan-y;
}
2022-12-11 13:52:36 +03:00
.sparkline--fill {
fill: var(--c-primary-active);
opacity: 0.2;
}
.sparkline--line {
stroke: var(--c-primary);
stroke-width: 2;
}