Files
halo_theme_terminal/src/styles/main.scss
T

534 lines
9.2 KiB
SCSS

@import "variables";
:root {
--color-theme-background: ;
--color-theme-foreground: ;
--color-theme-accent: ;
--color-theme-tag: ;
--color-theme-title: ;
--color-theme-meta: ;
--color-theme-framed: ;
--color-theme-menu: ;
--color-theme-header: ;
--list-marker: "►";
--font-size: 1rem;
--line-height: 1.54em;
--radius: 0;
--font-theme-default: 'JetBrains Mono';
--font--theme-fallback: Monaco, Consolas, -apple-system, BlinkMacSystemFont, 'segoe ui',
Roboto, Oxygen, Ubuntu, Cantarell, 'open sans', 'helvetica neue';
@media (max-width: $phone-max-width) {
--font-size: 0.95rem;
}
}
html {
box-sizing: border-box;
scrollbar-gutter: stable;
}
html[pixel_style='true'] {
--font-theme-default: 'Fusion Pixel 12px P zh_hans';
}
* {
scrollbar-width: thin !important;
scrollbar-color: rgba(134, 134, 134, 0.45) rgba(255, 255, 255, 0);
font-variant-ligatures: none;
}
*,
*::before,
*::after {
box-sizing: inherit;
word-break: break-word;
}
body {
margin: 0;
padding: 0;
font-family: var(--font-theme-default), var(--font--theme-fallback), sans-serif;
font-size: var(--font-size);
line-height: var(--line-height);
background-color: var(--color-theme-background);
color: var(--color-theme-foreground);
text-rendering: optimizelegibility;
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling: touch;
text-size-adjust: 100%;
}
h1 {
font-size: calc(var(--font-size) * 1.45);
letter-spacing: 0;
}
h2 {
font-size: calc(var(--font-size) * 1.35);
letter-spacing: 0;
}
h3 {
font-size: calc(var(--font-size) * 1.15);
letter-spacing: 0;
}
h4,
h5,
h6 {
font-size: calc(var(--font-size) * 1);
letter-spacing: 0;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
img,
figure,
video,
table {
margin: 25px 0;
}
a {
color: var(--color-theme-accent);
text-decoration: none;
}
button {
position: relative;
font: inherit;
font-weight: bold;
text-decoration: none;
text-align: center;
background: transparent;
color: var(--color-theme-accent);
padding: 5px 18px;
border: 4px solid var(--color-theme-accent);
border-radius: var(--radius);
transition: background 0.15s linear;
appearance: none;
cursor: pointer;
outline: none;
}
button:hover {
background: color-mix(in srgb, var(--color-theme-accent) 15%, transparent);
}
button:focus-visible,
a:focus-visible {
outline: 1px solid var(--color-theme-accent);
outline-offset: 2px;
}
fieldset {
display: inline-block;
border: 2px solid var(--color-theme-foreground);
border-radius: calc(var(--radius) * 1.6);
padding: 10px;
}
fieldset *:first-child {
margin-top: 0;
}
fieldset input,
fieldset select,
fieldset textarea,
fieldset label,
fieldset button {
margin-top: calc(var(--line-height) * 0.5);
width: 100%;
}
label {
display: inline-block;
}
label input {
margin-top: 0;
}
input,
textarea,
select {
background: transparent;
color: var(--color-theme-foreground);
border: 1px solid var(--color-theme-foreground);
border-radius: var(--radius);
padding: 10px;
font: inherit;
appearance: none;
}
input[type="checkbox"] {
width: auto;
}
input:focus-visible,
input:active,
textarea:focus-visible,
textarea:active,
select:focus-visible,
select:active {
border-color: var(--color-theme-accent);
outline: 1px solid var(--color-theme-accent);
outline-offset: 2px;
}
input:active,
textarea:active,
select:active {
box-shadow: none;
}
select {
background-image: linear-gradient(
45deg,
transparent 50%,
var(--color-theme-foreground) 50%
),
linear-gradient(135deg, var(--color-theme-foreground) 50%, transparent 50%);
background-position: calc(100% - 20px), calc(100% - 1em);
background-size: 5px 5px, 5px 5px;
background-repeat: no-repeat;
padding-right: 40px;
}
select option {
background: var(--color-theme-background);
}
input[type="checkbox"] {
vertical-align: middle;
padding: 10px;
box-shadow: inset 0 0 0 3px var(--color-theme-background);
}
input[type="checkbox"]:checked {
background: var(--color-theme-accent);
}
img {
display: block;
max-width: 100%;
border: 4px solid var(--color-theme-accent);
border-radius: var(--radius);
padding: 4px;
overflow: hidden;
}
img.left {
margin-right: auto;
}
img.center {
margin-left: auto;
margin-right: auto;
}
img.right {
margin-left: auto;
}
figure {
width: fit-content;
}
figure.left {
margin-right: auto;
}
figure.center {
margin-left: auto;
margin-right: auto;
}
figure.right {
margin-left: auto;
}
figure img,
figure video {
margin-bottom: 0;
}
figure figcaption {
background: var(--color-theme-accent);
color: var(--color-theme-background);
text-align: center;
font-size: var(--font-size);
font-weight: normal;
margin-top: -8px;
padding: 0 8px;
border-radius: 0 0 var(--radius) var(--radius);
}
figure figcaption p:first-child {
margin-top: 0;
}
ul,
ol {
margin-left: 4ch;
padding: 0;
}
ul ul,
ul ol,
ol ul,
ol ol {
margin-top: 0;
}
li::marker {
color: var(--color-theme-accent);
}
ul li,
ol li {
position: relative;
}
code,
kbd {
font-family: inherit !important;
font-feature-settings: normal;
background: color-mix(in srgb, var(--color-theme-foreground) 5%, transparent);
border: 1px solid var(--code-border);
padding: 1px 6px;
margin: 0 2px;
font-size: calc(var(--font-size) * 0.95);
}
kbd {
border-top: 1px solid color-mix(in srgb, var(--color-theme-accent) 25%, transparent);
border-left: 1px solid var(--color-theme-accent);
border-right: 1px solid var(--color-theme-accent);
border-bottom: 4px solid var(--color-theme-accent);
border-radius: 4px;
}
code code {
background: transparent;
padding: 0;
margin: 0;
}
pre {
font-family: inherit !important;
tab-size: 4;
background: color-mix(in srgb, var(--color-theme-foreground) 5%, transparent) !important;
color: var(--color-theme-foreground);
padding: 10px 10px;
font-size: calc(var(--font-size) * 0.95) !important;
overflow: auto;
border-radius: var(--radius);
border: 1px solid color-mix(in srgb, var(--color-theme-foreground) 10%, transparent);
@media (max-width: $phone-max-width) {
white-space: pre-wrap;
word-wrap: break-word;
}
}
pre code {
background: none !important;
margin: 0;
padding: 0;
border: none;
}
sup {
line-height: 0;
}
abbr {
position: relative;
text-decoration-style: wavy;
text-decoration-color: var(--color-theme-accent);
cursor: help;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.25em;
}
mark {
background: color-mix(in srgb, var(--color-theme-accent) 45%, transparent);
color: var(--color-theme-foreground);
}
blockquote {
position: relative;
border-top: 1px solid var(--color-theme-foreground);
border-bottom: 1px solid var(--color-theme-foreground);
border-left: .4rem solid var(--color-theme-foreground);
margin: 10px 0 10px 0;
padding: 20px;
}
blockquote p:first-child {
margin-top: 0;
}
blockquote p:last-child {
margin-bottom: 0;
}
table {
table-layout: auto;
border-collapse: collapse;
}
table,
th,
td {
border: 2px solid var(--color-theme-foreground);
padding: 10px;
}
th {
border-style: solid;
color: var(--color-theme-foreground);
text-align: left;
text-transform: uppercase;
letter-spacing: 0.04em;
}
hr {
width: 100%;
border: none;
background: var(--color-theme-accent);
height: 2px;
}
/* One Heading Size */
.headings--one-size h1,
.headings--one-size h2,
.headings--one-size h3,
.headings--one-size h4,
.headings--one-size h5,
.headings--one-size h6 {
font-size: 1.4rem;
line-height: 1.3;
margin: 20px 0;
}
.headings--one-size ~ h1:first-child,
.headings--one-size ~ h2:first-child,
.headings--one-size ~ h3:first-child,
.headings--one-size ~ h4:first-child,
.headings--one-size ~ h5:first-child,
.headings--one-size ~ h6:first-child {
margin-top: 20px;
}
blockquote.twitter-tweet {
position: relative;
background: var(--color-theme-background);
font: inherit;
color: inherit;
border: 1px solid var(--color-theme-accent);
padding-top: 60px;
}
blockquote.twitter-tweet a {
color: var(--color-theme-accent);
text-decoration: underline;
}
blockquote.twitter-tweet::before {
content: "> From X:";
position: absolute;
top: 20px;
left: 20px;
color: var(--color-theme-accent);
font-weight: bold;
}
.container {
display: flex;
flex-direction: column;
padding: 40px;
max-width: 864px;
min-height: 100vh;
border-right: 1px solid color-mix(in srgb, var(--color-theme-accent) 10%, transparent);
@media (max-width: $phone-max-width) {
padding: 20px;
}
}
.container.full, .container.center {
border: none;
margin: 0 auto;
}
.container.full {
max-width: 100%;
}
.content {
display: flex;
flex-direction: column;
}
.hidden {
display: none;
}
.__h_video {
position: relative;
overflow: visible !important;
height: auto !important;
padding-bottom: 0 !important;
}
.__h_video a {
position: relative;
display: block;
width: 100%;
}
.__h_video a img {
width: 100%;
}
.__h_video a .play {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
width: 60px;
height: 60px;
}
iframe[src*="youtube.com"] {
border: 8px solid var(--color-theme-accent) !important;
padding: 8px !important;
}
@media print {
.container {
display: initial;
}
.content {
display: initial;
}
}