CSS Reset

This commit is contained in:
Nathan McCarty 2025-02-05 20:37:42 -05:00
parent da4e562a06
commit 278f5a8390
4 changed files with 34 additions and 201 deletions

View file

@ -36,6 +36,7 @@ method generate-head($title, BlogMeta:D $meta, $description?) {
link :rel<stylesheet>,
:href<https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css>;
# Inline our style sheets
style %?RESOURCES<colors.css>.slurp;
style %?RESOURCES<main.css>.slurp;
style %?RESOURCES<code.css>.slurp;
];

View file

@ -1,51 +0,0 @@
code {
font-family: "Iosevka Web", monospace;
background-color: light-dark(#fbf3db, #103c48);
color: light-dark(#53676d, #adbcbc);
padding: 0.25ch;
}
pre > code {
width: 80%;
display: block;
padding: 1rem;
border-radius: 0.55rem / 0.5rem;
white-space: pre-wrap;
overflow-x: auto;
}
pre {
display: flex;
align-items: center;
justify-content: center;
}
.hl-type {
color: light-dark(#ad8900, #dbb32d);
}
.hl-module {
font-style: italic;
}
.hl-function {
color: light-dark(#428b00, #84c747);
}
.hl-bound {
color: light-dark(#ca4898, #f275be);
}
.hl-keyword {
color: light-dark(#0072d4, #4695f7);
}
.hl-comment {
color: light-dark(#909995, #72898f);
}
.hl-data {
color: light-dark(#d2212d, #ed4a46)
}
/* TODO: Footnote hover */

33
resources/colors.css Normal file
View file

@ -0,0 +1,33 @@
:root {
color-scheme: light dark;
/* Selenized White/Black for main content */
--bg-0: light-dark(#ffffff,#181818);
--bg-1: light-dark(#ebebeb,#252525);
--bg-2: light-dark(#cdcdcd,#3b3b3b);
--dim-0: light-dark(#878787,#777777);
--fg-0: light-dark(#474747,#b9b9b9);
--fg-1: light-dark(#282828,#dedede);
--red: light-dark(#d6000c,#ed4a46)
--green: light-dark(#1d9700,#70b433);
--yellow: light-dark(#c49700,#dbb32d);
--blue: light-dark(#0064e4,#368aeb);
--magenta: light-dark(#dd0f9d,#eb6eb7);
--cyan: light-dark(#00ad9c,#3fc5b7);
--orange: light-dark(#d04a00,#e67f43);
--violet: light-dark(#7f51d6,#a580e2);
/* Selenized Light/Dark for code content */
--code-bg-0: light-dark(#fbf3db,#103c48);
--code-bg-1: light-dark(#ece3cc,#184956);
--code-bg-2: light-dark(#d5cdb6,#2d5b69);
--code-dim-0: light-dark(#909995,#72898f);
--code-fg-0: light-dark(#53676d,#adbcbc);
--code-fg-1: light-dark(#3a4d53,#cad8d9);
--code-red: light-dark(#d2212d,#fa5750);
--code-green: light-dark(#489100,#75b938);
--code-yellow: light-dark(#ad8900,#dbb32d);
--code-blue: light-dark(#0072d4,#4695f7);
--code-magenta: light-dark(#ca4898,#f275be);
--code-cyan: light-dark(#009c8f,#41c7b9);
--code-orange: light-dark(#c25d1e,#ed8649);
--code-violet: light-dark(#8762c6,#af88eb);
}

View file

@ -1,150 +0,0 @@
:root {
color-scheme: light dark;
color: light-dark(#474747, #b9b9b9);
background-color: light-dark(#ebebeb, #252525);
font-family: "Open Sans", sans-serif, serif;
}
body, .post {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 1rem;
}
.header-links {
display: flex;
flex-direction: row;
align-items: center;
gap: 1rem;
font-size: 1.1rem;
flex-wrap: wrap;
margin-top: 0.5rem;
}
.site-header {
width: 50%;
display: block;
padding: 1rem;
border-radius: 1rem;
background-color: light-dark(#ffffff, #181818);
display: flex;
align-items: center;
flex-direction: column;
}
.site-logo {
color: light-dark(#d6000c, #ed4a46);
font-size: 2.5rem;
font-weight: bold;
}
.site-tagline {
color: light-dark(#909995, #777777);
font-size: 0.9rem;
font-style: italic;
}
.post-body, .post-header, .post-blurbs {
width: 66%;
display: block;
padding-left: 1.5rem;
padding-right: 1.5rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
border-radius: 1rem;
background-color: light-dark(#ffffff, #181818);
/* text-align: justify; */
}
.post-blurbs {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 1rem;
}
.post-blurb {
width: 100%;
display: block;
border-radius: 1rem;
padding: 0.5rem;
background-color: light-dark(#ebebeb, #252525);
/* background-color: light-dark(#cdcdcd, #3b3b3b); */
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
/* gap: 0.25rem; */
}
.post-header {
padding: 1.5rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
.post-title {
text-align: center;
color: light-dark(#dd0f9d, #eb6eb7);
}
.post-blurbs > h1 {
color: light-dark(#1d9700, #70b433);
}
a:link {
color: light-dark(#009c8f, #41c7b9);
}
a:visited {
color: light-dark(#dd0f9d, #eb6eb7);
}
.post-title > h1, .post-blurb-title > h2 {
margin-top: 0px;
margin-bottom: 0px;
}
.post-info {
display: flex;
flex-direction: row;
align-items: center;
gap: 1rem;
color: light-dark(#909995, #777777);
font-size: 0.9rem;
flex-wrap: wrap;
}
.post-read-time {
text-decoration: underline dotted;
}
.post-body > h2 {
text-align: center;
color: light-dark(#282828, #dedede);
}
.post-body > h3 {
text-align: center;
color: light-dark(#282828, #dedede);
}
.post-body > h4 {
text-align: center;
color: light-dark(#282828, #dedede);
}
/* .post-body > p { */
/* text-indent: 2ch; */
/* } */
a > span {
text-decoration: underline;
}
a {
text-decoration: none;
}