hugo-theme-re-terminal/assets/css/main.scss

347 lines
4.9 KiB
SCSS
Raw Permalink Normal View History

2022-06-21 13:50:51 +00:00
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
padding: 0;
font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace;
font-size: 1rem;
line-height: 1.54;
letter-spacing: -0.02em;
2024-07-30 15:39:09 +00:00
background-color: var(--background);
color: var(--color);
2022-06-21 13:50:51 +00:00
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
font-feature-settings: "liga", "tnum", "zero", "ss01", "locl";
font-variant-ligatures: contextual;
-webkit-overflow-scrolling: touch;
-webkit-text-size-adjust: 100%;
2024-07-30 15:39:09 +00:00
@media (var(--phone)) {
2022-06-21 13:50:51 +00:00
font-size: 1rem;
}
}
.headings--one-size {
h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 1.3;
&:not(first-child) {
margin-top: 40px;
}
}
h1,
h2,
h3 {
font-size: 1.4rem;
}
h4,
h5,
h6 {
font-size: 1.2rem;
}
}
a {
color: inherit;
/* Waiting for a better times... */
/* &:has(code) {
2024-07-30 15:39:09 +00:00
text-decoration-color: var(--accent);
2022-06-21 13:50:51 +00:00
} */
}
img {
display: block;
max-width: 100%;
&.left {
margin-right: auto;
}
&.center {
margin-left: auto;
margin-right: auto;
}
&.right {
margin-left: auto;
}
}
p {
margin-bottom: 20px;
}
figure {
display: table;
max-width: 100%;
margin: 25px 0;
&.left {
margin-right: auto;
}
&.center {
margin-left: auto;
margin-right: auto;
}
&.right {
margin-left: auto;
}
figcaption {
font-size: 14px;
padding: 5px 10px;
margin-top: 5px;
2024-07-30 15:39:09 +00:00
background: var(--accent);
color: var(--accent-contrast-color);
2022-06-21 13:50:51 +00:00
/* opacity: .8; */
&.left {
text-align: left;
}
&.center {
text-align: center;
}
&.right {
text-align: right;
}
}
}
code, kbd {
font-family: 'Fira Code', Monaco, Consolas, Ubuntu Mono, monospace !important;
font-feature-settings: normal;
background: color-mix(in srgb, var(--accent), transparent 80%);
2024-07-30 15:39:09 +00:00
color: var(--accent);
2022-06-21 13:50:51 +00:00
padding: 1px 6px;
margin: 0 2px;
font-size: .95rem;
code, kbd {
background: transparent;
padding: 0;
margin: 0;
}
}
pre {
background: transparent !important;
padding: 20px 10px;
margin: 40px 0;
font-size: .95rem !important;
overflow: auto;
border-top: 1px solid rgba(255, 255, 255, .1);
border-bottom: 1px solid rgba(255, 255, 255, .1);
+ pre {
border-top: 0;
margin-top: -40px;
}
2024-07-30 15:39:09 +00:00
@media (var(--phone)) {
2022-06-21 13:50:51 +00:00
white-space: pre-wrap;
word-wrap: break-word;
}
code {
background: none !important;
margin: 0;
padding: 0;
font-size: inherit;
border: none;
}
}
blockquote {
2024-07-30 15:39:09 +00:00
border-top: 1px solid var(--accent);
border-bottom: 1px solid var(--accent);
2022-06-21 13:50:51 +00:00
margin: 40px 0;
padding: 25px;
2024-07-30 15:39:09 +00:00
@media (var(--phone)) {
2022-06-21 13:50:51 +00:00
padding-right: 0;
}
p:first-of-type {
margin-top: 0;
}
p:last-of-type {
margin-bottom: 0;
}
p {
position: relative;
}
p:first-of-type:before {
content: '>';
display: block;
position: absolute;
left: -25px;
2024-07-30 15:39:09 +00:00
color: var(--accent);
2022-06-21 13:50:51 +00:00
}
&.twitter-tweet {
position: relative;
background: color-mix(in srgb, var(--accent), transparent 90%);;
2022-06-21 13:50:51 +00:00
font: inherit;
color: inherit;
2024-07-30 15:39:09 +00:00
border: 1px solid var(--accent);
2022-06-21 13:50:51 +00:00
padding-top: 60px;
p:before {
content: '';
}
&:before {
content: '> From Twitter:';
position: absolute;
top: 20px;
2024-07-30 15:39:09 +00:00
color: var(--accent);
2022-06-21 13:50:51 +00:00
font-weight: bold;
}
a {
2024-07-30 15:39:09 +00:00
color: var(--accent);
2022-06-21 13:50:51 +00:00
}
}
}
table {
table-layout: auto;
border-collapse: collapse;
width: 100%;
margin: 40px 0;
}
table,
th,
td {
2024-07-30 15:39:09 +00:00
border: 1px dashed var(--accent);
2022-06-21 13:50:51 +00:00
padding: 10px;
}
th {
2024-07-30 15:39:09 +00:00
color: var(--accent);
2022-06-21 13:50:51 +00:00
}
ul,
ol {
margin-left: 22px;
padding: 0;
li {
position: relative;
}
2024-07-30 15:39:09 +00:00
@media (var(--phone)) {
2022-06-21 13:50:51 +00:00
margin-left: 20px;
}
}
ol {
list-style: none;
counter-reset: li;
2023-05-02 15:33:13 +00:00
> li {
counter-increment: li;
2022-06-21 13:50:51 +00:00
2023-05-02 15:33:13 +00:00
&:before {
content: counter(li);
position: absolute;
right: calc(100% + 10px);
2024-07-30 15:39:09 +00:00
color: var(--accent);
2023-05-02 15:33:13 +00:00
display: inline-block;
text-align: right;
}
2022-06-21 13:50:51 +00:00
2023-05-02 15:33:13 +00:00
> ol {
margin-left: 38px;
2022-06-21 13:50:51 +00:00
2023-05-02 15:33:13 +00:00
> li {
counter-increment: li;
2022-06-21 13:50:51 +00:00
2023-05-02 15:33:13 +00:00
&:before {
content: counters(li, ".") " ";
}
}
}
}
2022-06-21 13:50:51 +00:00
}
mark {
2024-07-30 15:39:09 +00:00
background: var(--accent);
color: var(--accent-contrast-color);
2022-06-21 13:50:51 +00:00
}
.container {
display: flex;
flex-direction: column;
padding: 40px;
max-width: 864px;
min-height: 100vh;
border-right: 1px solid rgba(255, 255, 255, 0.1);
&.full,
&.center {
border: none;
margin: 0 auto;
}
&.full {
max-width: 100%;
}
2024-07-30 15:39:09 +00:00
@media (var(--phone)) {
2022-06-21 13:50:51 +00:00
padding: 20px;
}
@media print {
display: initial;
}
}
.content {
display: flex;
flex-direction: column;
@media print {
display: initial;
}
}
hr {
width: 100%;
border: none;
2024-07-30 15:39:09 +00:00
background: var(--border-color);
2022-06-21 13:50:51 +00:00
height: 1px;
}
.hidden {
display: none;
}
sup {
line-height: 0;
}