new_blog/static/css/layout.css
Pagwin afcb2740f4
socials in footer but icons aren't fixed up yet
Github icon is clipped unfortunately and linkedin icon should be changed
to have background with round corners and color corresponding to primary
color
2024-12-22 18:02:48 -05:00

245 lines
5.2 KiB
CSS

@layer pre-load, baseline, print;
@layer baseline {
:root {
--base-text-size: 1.1rem;
}
body {
padding: 0px;
margin: 0px;
font-family: "Atkinson Hyperlegible", Georgia, serif;
-webkit-font-smoothing: antialiased;
}
.dt-subtitle {
margin-left:0px;
}
a {
font-weight: bold;
text-decoration: none;
width: fit-content;
height: fit-content;
}
a.obj-wrapper{
display: block;
}
a:hover {
text-decoration: underline;
}
footer {
width: 100%;
/*using grid instead of flexbox due to greater flexibility in case I wanna add stuff to the layout for some reason*/
display: grid;
justify-content: center;
align-content: center;
grid-template-areas: "footer"
grid-template-columns: 1fr;
grid-template-rows: 1fr;
}
.socials {
display: flex;
flex-flow: row wrap;
gap: 1rem;
align-items: center;
justify-content: center;
}
.nav-link{
font-size: 2rem;
padding: 0em 0.25em;
border-radius: 0.5rem;
font-variant: small-caps;
font-family: "Courier Prime", Georgia, serif;
}
dt {
font-family: "Courier Prime", Georgia, serif;
text-overflow: ellipsis;
white-space: nowrap;
overflow:hidden;
/*needed to fix the outline vanishing due to overflow hidden*/
padding: 2px;
}
/*font sizes*/
h1 {
font-size:1.95rem;
}
h2 {
font-size: 1.65rem;
}
h1, h2, h3, h4, h5, h6 {
/*I want serifs dangit*/
font-family: "Courier Prime", Georgia, serif;
}
p{
font-size: var(--base-text-size);
}
a {
font-size: var(--base-text-size);
}
pre {
font-size: var(--base-text-size);
}
time {
font-size: var(--base-text-size);
}
.sourceCode {
font-size: var(--base-text-size);
}
.info {
font-size: var(--base-text-size);
}
header#header {
box-sizing: border-box;
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: space-between;
width: 100vw;
padding: 0.5em 1em;
}
#content {
box-sizing: border-box;
display: block flex;
margin-top: 1rem;/*calc(24px + 3rem) 1rem 1rem 1rem;*/
padding: 1rem;
/* needed due to flex parent*/
width: 100%;
/*https://ux.stackexchange.com/a/34125*/
/*https://ux.stackexchange.com/a/34148*/
/*https://pearsonified.com/golden-ratio-typography-intro/*/
/*https://grtcalculator.com/*/
max-width: 55em;
border-radius: 0.5rem;
/* needed due to being flex itself*/
flex-direction:column;
/* put things in center*/
/* not sure if I want everything centered or just code blocks but I like everything centered atm*/
justify-content: center;
align-items: center;
}
main {
max-width: -moz-available;
max-width: -webkit-fill-available;;
max-width: fill-available;
}
header#article-header {
max-width: -moz-available;
max-width: -webkit-fill-available;;
max-width: fill-available;
display: block flex;
flex-direction:column;
/* put things in center*/
/* not sure if I want everything centered or just code blocks but I like everything centered atm*/
justify-content: center;
align-items: center;
}
article {
max-width: -moz-available;
max-width: -webkit-fill-available;;
max-width: fill-available;
display: block flex;
flex-direction:column;
/* put things in center*/
/* not sure if I want everything centered or just code blocks but I like everything centered atm*/
justify-content: center;
align-items: center;
}
blockquote {
/*font-style: italic;*/
padding: 0.5em 1em;
border-radius: 0.5rem;
p{
/*margin is annoying in this case*/
margin: 0;
}
}
/*might need to become grid when adding in table of contents and sidenotes*/
#content-outer {
display: flex;
justify-content: center;
align-items: center;
}
.icon {
width: 2rem;
height: 2rem;
}
/* div element with this class can be a bitch so need to select those as well as pre*/
.sourceCode {
max-width: -moz-available;
max-width: -webkit-fill-available;;
max-width: fill-available;
width: fit-content;
}
pre {
/*We also need it on pre because not all pre blocks are source code >:(*/
max-width: -moz-available;
max-width: -webkit-fill-available;;
max-width: fill-available;
width: fit-content;
box-sizing: border-box;
min-height: 2em;
/*
* previously a cludge of 75 em this is now a cludge of 2 different vendor extensions
*
* */
overflow:scroll;
/*background: #444;*/
border-radius: 0.5rem;
/*border: 0.2em solid red;*/
padding: 0.5rem;
}
hr {
box-sizing: border-box;
width: 100%;
}
p {
/*https://pearsonified.com/golden-ratio-typography-intro/ is where this came from and tbh having a bigger line height does make things more readable although I tune it down a bit*/
line-height: 1.5;
}
footer {
display: flex;
margin:20px;
/*width:100%;*/
}
}
/* we really want to make sure this doesn't stick around when colors load in regardless of when/how colors get loaded in*/
@layer pre-load{
#content {
border: 0.7rem solid white;
}
}
/* I mean why not? */
@media print {
@layer print{
#header {
visibility: hidden;
}
#content {
border-style: none;
}
pre {
page-break-inside: avoid;
}
}
}