Skip to content

Instantly share code, notes, and snippets.

@foeken
Created March 2, 2025 10:15
Show Gist options
  • Save foeken/3e92ea02bba96feda0c3d971bc5b2a4f to your computer and use it in GitHub Desktop.
Save foeken/3e92ea02bba96feda0c3d971bc5b2a4f to your computer and use it in GitHub Desktop.
/* Medium-inspired CSS for Tana */
/* Font settings */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:wght@400;600;700&family=Source+Sans+Pro:wght@400;600&display=swap');
body {
font-family: 'Source Serif Pro', Georgia, serif;
line-height: 1.6;
color: rgba(41, 41, 41, 1);
background-color: #fff;
max-width: 740px;
margin: 0 auto;
padding: 0 20px;
}
/* Headers */
h1, h2, h3, h4, h5, h6 {
font-family: 'Source Serif Pro', Georgia, serif;
font-weight: 700;
letter-spacing: -0.015em;
margin-top: 2.1em;
margin-bottom: 0.7em;
}
h1 {
font-size: 2.5rem;
line-height: 1.2;
margin-top: 1em;
margin-bottom: 0.5em;
}
h2 {
font-size: 1.9rem;
margin-top: 1.75em;
}
h3 {
font-size: 1.5rem;
}
h4 {
font-size: 1.3rem;
}
/* Paragraph styling */
p {
margin-bottom: 1.5em;
font-size: 1.15rem;
line-height: 1.7;
}
/* List styling */
ul, ol {
margin-bottom: 1.5em;
padding-left: 2em;
}
li {
margin-bottom: 0.5em;
font-size: 1.15rem;
}
/* Link styling */
a {
color: #1a8917;
text-decoration: none;
border-bottom: 1px solid rgba(26, 137, 23, 0.3);
transition: border 0.2s;
}
a:hover {
border-bottom: 1px solid rgba(26, 137, 23, 0.8);
}
/* Blockquote styling */
blockquote {
border-left: 3px solid #1a8917;
padding-left: 20px;
margin-left: 0;
margin-right: 0;
font-style: italic;
color: rgba(41, 41, 41, 0.8);
}
/* Code blocks */
pre, code {
font-family: 'Source Code Pro', monospace;
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
padding: 2px 5px;
font-size: 0.9em;
}
pre {
padding: 15px;
overflow: auto;
margin-bottom: 1.5em;
}
pre code {
background-color: transparent;
padding: 0;
}
/* Highlight color */
::selection {
background: rgba(26, 137, 23, 0.2);
}
/* Tana specific adjustments */
.tana-container {
max-width: 100%;
padding: 40px 0;
}
.tana-header {
text-align: center;
margin-bottom: 3em;
border-bottom: 1px solid rgba(230, 230, 230, 1);
padding-bottom: 2em;
}
/* Tana nodes and bullets transformation */
.tana-node {
margin-bottom: 1em;
}
.tana-bullet {
opacity: 0.3;
transition: opacity 0.2s;
}
.tana-node:hover .tana-bullet {
opacity: 0.8;
}
/* Tana toggled nodes */
.tana-toggle {
color: #1a8917;
font-weight: 600;
cursor: pointer;
}
/* Medium-like image styling */
img {
max-width: 100%;
height: auto;
margin: 2em auto;
display: block;
border-radius: 4px;
}
/* Medium-like caption styling */
figcaption {
text-align: center;
font-size: 0.9rem;
color: rgba(117, 117, 117, 1);
margin-top: 0.5em;
}
/* Medium-like separator */
hr {
text-align: center;
border: 0;
margin: 2em auto;
width: 100%;
}
hr:before {
content: '...';
display: inline-block;
letter-spacing: 0.6em;
color: rgba(117, 117, 117, 1);
position: relative;
font-size: 1.5rem;
}
/* Mobile responsiveness */
@media (max-width: 768px) {
body {
padding: 0 15px;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.6rem;
}
p, li {
font-size: 1.05rem;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment