mirror of
https://github.com/priyanshujain/margin.git
synced 2026-10-02 11:07:04 +00:00
feat(design): add Quiet Press fonts and design tokens
This commit is contained in:
1 parent
816e79a794
commit
24483416a2
9 files changed
+642
No files matched your search
@@ -0,0 +1,385 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--shell);
|
||||
color: var(--ink);
|
||||
font-family: var(--font-ui);
|
||||
font-size: var(--t-3);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: var(--selection);
|
||||
}
|
||||
|
||||
button {
|
||||
font-family: inherit;
|
||||
color: inherit;
|
||||
border: 0;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.app {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.titlebar {
|
||||
flex: none;
|
||||
height: 46px;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto 1fr;
|
||||
align-items: center;
|
||||
padding: 0 14px 0 84px;
|
||||
background: var(--shell);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.titlebar .doc-title {
|
||||
grid-column: 2;
|
||||
font-size: var(--t-2);
|
||||
letter-spacing: 0.02em;
|
||||
color: var(--ink-soft);
|
||||
}
|
||||
|
||||
.titlebar .actions {
|
||||
grid-column: 3;
|
||||
justify-self: end;
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.icon-btn {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: var(--r-sm);
|
||||
color: var(--ink-soft);
|
||||
transition: background 120ms var(--ease), color 120ms var(--ease);
|
||||
}
|
||||
|
||||
.icon-btn:hover {
|
||||
background: var(--accent-wash);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.icon-btn[data-on="true"] {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: var(--pane-sidebar);
|
||||
flex: none;
|
||||
background: var(--sidebar);
|
||||
border-right: 1px solid var(--line);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 6px 0 10px;
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 7px;
|
||||
padding: 12px 22px 18px;
|
||||
}
|
||||
|
||||
.brand .mark {
|
||||
font-family: var(--font-book);
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
.brand .dot {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.nav-label {
|
||||
padding: 4px 22px;
|
||||
font-size: var(--t-1);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.14em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-faint);
|
||||
}
|
||||
|
||||
.chapters {
|
||||
list-style: none;
|
||||
margin: 6px 0 0;
|
||||
padding: 0 10px;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.chapter {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 11px;
|
||||
padding: 8px 12px;
|
||||
border-radius: var(--r-sm);
|
||||
color: var(--ink-soft);
|
||||
cursor: pointer;
|
||||
transition: background 120ms var(--ease), color 120ms var(--ease);
|
||||
}
|
||||
|
||||
.chapter:hover {
|
||||
background: rgba(35, 32, 27, 0.04);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.chapter[data-active="true"] {
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
box-shadow: 0 1px 2px rgba(35, 32, 27, 0.05);
|
||||
}
|
||||
|
||||
.chapter[data-active="true"]::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -10px;
|
||||
top: 8px;
|
||||
bottom: 8px;
|
||||
width: 3px;
|
||||
background: var(--accent);
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
.chapter .num {
|
||||
font-size: var(--t-1);
|
||||
color: var(--ink-faint);
|
||||
width: 13px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.chapter[data-active="true"] .num {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.add-chapter {
|
||||
margin: 8px 18px 4px;
|
||||
padding: 9px 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
border-radius: var(--r-sm);
|
||||
color: var(--ink-faint);
|
||||
border: 1px dashed var(--line-strong);
|
||||
transition: color 120ms var(--ease), border-color 120ms var(--ease);
|
||||
}
|
||||
|
||||
.add-chapter:hover {
|
||||
color: var(--accent);
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.editor-pane {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
background: var(--paper);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sheet {
|
||||
max-width: var(--measure);
|
||||
margin: 0 auto;
|
||||
padding: 104px 24px 260px;
|
||||
}
|
||||
|
||||
.prose {
|
||||
font-family: var(--font-book);
|
||||
color: var(--ink);
|
||||
font-optical-sizing: auto;
|
||||
}
|
||||
|
||||
.chapter-opener {
|
||||
text-align: center;
|
||||
margin: 0 0 3.4rem;
|
||||
}
|
||||
|
||||
.chapter-num {
|
||||
font-family: var(--font-ui);
|
||||
font-size: var(--t-1);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.28em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-faint);
|
||||
}
|
||||
|
||||
.chapter-title {
|
||||
font-weight: 500;
|
||||
font-size: 31px;
|
||||
line-height: 1.16;
|
||||
letter-spacing: -0.01em;
|
||||
margin: 15px 0 0;
|
||||
}
|
||||
|
||||
.prose p {
|
||||
font-size: 19px;
|
||||
line-height: 1.68;
|
||||
margin: 0;
|
||||
text-align: justify;
|
||||
hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
text-indent: 1.3em;
|
||||
}
|
||||
|
||||
.prose p:first-of-type,
|
||||
.prose .first {
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
.prose .first::first-letter {
|
||||
float: left;
|
||||
font-size: 3.1em;
|
||||
line-height: 0.82;
|
||||
padding: 0.05em 0.09em 0 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.prose blockquote {
|
||||
margin: 1.7rem 0;
|
||||
padding-left: 1.2rem;
|
||||
border-left: 2px solid var(--line-strong);
|
||||
font-style: italic;
|
||||
color: var(--ink-soft);
|
||||
}
|
||||
|
||||
.prose blockquote p {
|
||||
text-indent: 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.scene-break {
|
||||
text-align: center;
|
||||
margin: 2.1rem 0;
|
||||
color: var(--ink-faint);
|
||||
font-size: 17px;
|
||||
letter-spacing: 0.5em;
|
||||
}
|
||||
|
||||
.dock {
|
||||
width: var(--pane-dock);
|
||||
flex: none;
|
||||
background: var(--shell);
|
||||
border-left: 1px solid var(--line);
|
||||
overflow-y: auto;
|
||||
padding: 26px 28px 80px;
|
||||
}
|
||||
|
||||
.dock-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.dock-head .label {
|
||||
font-size: var(--t-1);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.14em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-faint);
|
||||
}
|
||||
|
||||
.dock-head .meta {
|
||||
font-size: var(--t-1);
|
||||
color: var(--ink-faint);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.page {
|
||||
background: #fffefb;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 2px;
|
||||
box-shadow: var(--shadow-page);
|
||||
aspect-ratio: 6 / 9;
|
||||
padding: 11% 12%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.page .p-opener {
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.page .p-num {
|
||||
font-family: var(--font-ui);
|
||||
font-size: 6px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.24em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ink-faint);
|
||||
}
|
||||
|
||||
.page .p-title {
|
||||
font-family: var(--font-book);
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.page p {
|
||||
font-family: var(--font-book);
|
||||
font-size: 6.6px;
|
||||
line-height: 1.5;
|
||||
text-align: justify;
|
||||
hyphens: auto;
|
||||
text-indent: 1.2em;
|
||||
margin: 0;
|
||||
color: #2b2720;
|
||||
}
|
||||
|
||||
.page .folio {
|
||||
text-align: center;
|
||||
font-family: var(--font-book);
|
||||
font-size: 6px;
|
||||
color: var(--ink-faint);
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(35, 32, 27, 0.16);
|
||||
border-radius: 6px;
|
||||
border: 3px solid transparent;
|
||||
background-clip: content-box;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(35, 32, 27, 0.28);
|
||||
background-clip: content-box;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
@font-face {
|
||||
font-family: "Literata";
|
||||
src: url("/fonts/Literata-VF.ttf") format("truetype-variations");
|
||||
font-weight: 200 900;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Literata";
|
||||
src: url("/fonts/Literata-Italic-VF.ttf") format("truetype-variations");
|
||||
font-weight: 200 900;
|
||||
font-style: italic;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Hanken Grotesk";
|
||||
src: url("/fonts/HankenGrotesk-VF.ttf") format("truetype-variations");
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Hanken Grotesk";
|
||||
src: url("/fonts/HankenGrotesk-Italic-VF.ttf") format("truetype-variations");
|
||||
font-weight: 100 900;
|
||||
font-style: italic;
|
||||
font-display: block;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
:root {
|
||||
--font-ui: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
||||
--font-book: "Literata", Georgia, "Times New Roman", serif;
|
||||
|
||||
--paper: #fcfbf7;
|
||||
--shell: #f1ece2;
|
||||
--sidebar: #ece6da;
|
||||
--raised: #fbfaf6;
|
||||
|
||||
--ink: #23201b;
|
||||
--ink-soft: #6b6458;
|
||||
--ink-faint: #9b9484;
|
||||
|
||||
--line: #e3ddce;
|
||||
--line-strong: #d6cfbd;
|
||||
|
||||
--accent: #b5532e;
|
||||
--accent-ink: #97431f;
|
||||
--accent-wash: rgba(181, 83, 46, 0.1);
|
||||
--selection: rgba(181, 83, 46, 0.16);
|
||||
|
||||
--shadow-page: 0 1px 2px rgba(35, 32, 27, 0.06), 0 14px 30px rgba(35, 32, 27, 0.09);
|
||||
--shadow-pop: 0 8px 24px rgba(35, 32, 27, 0.14);
|
||||
|
||||
--r-sm: 5px;
|
||||
--r-md: 8px;
|
||||
--r-lg: 12px;
|
||||
|
||||
--pane-sidebar: 248px;
|
||||
--pane-dock: 384px;
|
||||
--measure: 34em;
|
||||
|
||||
--t-1: 11px;
|
||||
--t-2: 12px;
|
||||
--t-3: 13px;
|
||||
--t-4: 15px;
|
||||
|
||||
--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
|
||||
}
|
||||
Reference in new issue
Block a user