This commit is contained in:
Oskar Wickström
2024-08-21 18:43:11 +02:00
parent 50b890a226
commit 97bbf9c11b
2 changed files with 38 additions and 24 deletions

View File

@@ -1,11 +1,12 @@
:root { :root {
--font-family: "Fira Code", monospace;
--line-height: 1.25rem; --line-height: 1.25rem;
--border-thickness: 1.5px; --border-thickness: 1.5px;
--bold-weight: 700; --bold-weight: 700;
font-family: "Source Code Pro", monospace; font-family: var(--font-family);
font-optical-sizing: auto; font-optical-sizing: auto;
font-weight: 450; font-weight: 500;
font-style: normal; font-style: normal;
font-variant-numeric: tabular-nums lining-nums; font-variant-numeric: tabular-nums lining-nums;
font-size: 16px; font-size: 16px;
@@ -71,15 +72,21 @@ h2 {
hr { hr {
position: relative; position: relative;
top: calc(var(--border-thickness) * -1);
display: block; display: block;
height: var(--line-height);
margin: calc(var(--line-height) * 2) 0 var(--line-height);
border: none; border: none;
border-bottom: 4.5px double #000; color: #000;
color: transparent; }
height: var(--border-thickness); hr:after {
margin: calc(var(--line-height) * 2 - var(--border-thickness)) 0; display: block;
/*temp*/ content: "";
display: none; position: absolute;
top: 0;
left: 0;
width: 100%;
border-top: calc(var(--border-thickness) * 3) double #000;
height: 0;
} }
a { a {
@@ -159,7 +166,11 @@ p {
} }
pre, code { pre, code {
font-family: 'Fira Code', monospace; font-family: var(--font-family);
}
code {
font-weight: 600;
} }
figure { figure {
@@ -201,8 +212,8 @@ li {
} }
.tree ul li { .tree ul li {
position: relative; position: relative;
padding-left: 1ch; padding-left: 1.5ch;
margin-left: 1ch; margin-left: 1.5ch;
border-left: var(--border-thickness) solid #000; border-left: var(--border-thickness) solid #000;
} }
.tree ul li:before { .tree ul li:before {
@@ -211,7 +222,7 @@ li {
top: calc(var(--line-height) / 2); top: calc(var(--line-height) / 2);
left: 0; left: 0;
content: ""; content: "";
width: calc(var(--line-height) / 2); width: 1ch;
border-bottom: var(--border-thickness) solid #000; border-bottom: var(--border-thickness) solid #000;
} }
.tree ul li:last-child { .tree ul li:last-child {
@@ -247,5 +258,5 @@ li {
} }
body :not(.grid) { body :not(.grid) {
/*background: rgba(255, 0, 0, 0.1);*/ background: rgba(255, 0, 0, 0.1);
} }

View File

@@ -1,20 +1,23 @@
--- ---
title: The Monotyper Manifesto title: The Monospace Web
author: John Doe author: Oskar Wickström
date: August 2024 date: August 2024
lang: en
--- ---
## Abstract ## Abstract
In this design, the use of monospace fonts and a monochrome color palette is deliberate to enhance clarity and legibility, especially in environments where precision and readability are paramount. Monospace fonts are dear to many of us.
Monospace fonts, where each character occupies the same horizontal space, ensure uniformity and predictability in text alignment, making them ideal for coding interfaces, technical documentation, and tabular data displays. Some find them more readable, consistent, and beautiful, and than their proportional alternatives.
Maybe we're just brainwashed from spending years in terminals?
Or are we hopelessly nostalgic?
In any case, I like them, and that's why I started experimenting with all-monospace Web.
The consistent spacing prevents text from becoming jumbled or misaligned, which can be critical when differentiating between similar-looking characters, such as '1' and 'l' or '0' and 'O'. We use the monospace grid to align text and draw diagrams.
This uniformity contributes to an overall sense of order and structure within the design, aiding users in quickly scanning and understanding the information presented.
## The Basics ## The Basics
I mean, look at this lovely horizontal break: Look at this lovely horizontal break:
<hr> <hr>
@@ -46,9 +49,9 @@ This is a regular unordered list with a _tree_ class:
* lib * lib
* bin * bin
* games * games
* gamemode-simulate-game * solitaire
* gamemoderun * snake
* gamemodelist * tic-tac-toe
* media * media
* media * media
* run * run