From 383696db85fb41db9c34f066a15fe3af1471b633 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 11 Apr 2026 00:31:48 +0530 Subject: [PATCH] Refactor CSS class names from .post-content to .md-content --- assets/css/common/md-content.css | 106 ++++++++++++++--------------- assets/css/includes/scroll-bar.css | 8 +-- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- 4 files changed, 59 insertions(+), 59 deletions(-) diff --git a/assets/css/common/md-content.css b/assets/css/common/md-content.css index ed2cf36d..7c41976b 100644 --- a/assets/css/common/md-content.css +++ b/assets/css/common/md-content.css @@ -1,161 +1,161 @@ -.post-content { +.md-content { color: var(--content); margin: 30px 0; } -.post-content h3, -.post-content h4, -.post-content h5, -.post-content h6 { +.md-content h3, +.md-content h4, +.md-content h5, +.md-content h6 { margin: 24px 0 16px; } -.post-content h1 { +.md-content h1 { margin: 40px auto 32px; font-size: 40px; } -.post-content h2 { +.md-content h2 { margin: 32px auto 24px; font-size: 32px; } -.post-content h3 { +.md-content h3 { font-size: 24px; } -.post-content h4 { +.md-content h4 { font-size: 16px; } -.post-content h5 { +.md-content h5 { font-size: 14px; } -.post-content h6 { +.md-content h6 { font-size: 12px; } -.post-content a { +.md-content a { box-shadow: 0 1px 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; } -.post-content a code { +.md-content a code { margin: auto 0; border-radius: 0; box-shadow: 0 -1px 0 var(--primary) inset; } -.post-content del { +.md-content del { text-decoration: line-through; } -.post-content dl, -.post-content ol, -.post-content p, -.post-content figure, -.post-content ul { +.md-content dl, +.md-content ol, +.md-content p, +.md-content figure, +.md-content ul { margin-bottom: var(--content-gap); } -.post-content ol, -.post-content ul { +.md-content ol, +.md-content ul { padding-inline-start: 20px; } -.post-content li { +.md-content li { margin-top: 5px; } -.post-content li p { +.md-content li p { margin-bottom: 0; } -.post-content dl { +.md-content dl { display: flex; flex-wrap: wrap; margin: 0; } -.post-content dt { +.md-content dt { width: 25%; font-weight: 700; } -.post-content dd { +.md-content dd { width: 75%; margin-inline-start: 0; padding-inline-start: 10px; } -.post-content dd~dd, -.post-content dt~dt { +.md-content dd~dd, +.md-content dt~dt { margin-top: 10px; } -.post-content table { +.md-content table { margin-bottom: var(--content-gap); } -.post-content table th, -.post-content table:not(.highlighttable, .highlight table, .gist .highlight) td { +.md-content table th, +.md-content table:not(.highlighttable, .highlight table, .gist .highlight) td { min-width: 80px; padding: 8px 5px; line-height: 1.5; border-bottom: 1px solid var(--border); } -.post-content table th { +.md-content table th { text-align: start; } -.post-content table:not(.highlighttable) td code:only-child { +.md-content table:not(.highlighttable) td code:only-child { margin: auto 0; } -.post-content .highlight table { +.md-content .highlight table { border-radius: var(--radius); } -.post-content .highlight:not(table) { +.md-content .highlight:not(table) { margin: 10px auto; background: var(--code-block-bg) !important; border-radius: var(--radius); direction: ltr; } -.post-content li>.highlight { +.md-content li>.highlight { margin-inline-end: 0; } -.post-content ul pre { +.md-content ul pre { margin-inline-start: calc(var(--gap) * -2); } -.post-content .highlight pre { +.md-content .highlight pre { margin: 0; } -.post-content .highlighttable { +.md-content .highlighttable { table-layout: fixed; } -.post-content .highlighttable td:first-child { +.md-content .highlighttable td:first-child { width: 40px; } -.post-content .highlighttable td .linenodiv { +.md-content .highlighttable td .linenodiv { padding-inline-end: 0 !important; } -.post-content .highlighttable td .highlight, -.post-content .highlighttable td .linenodiv pre { +.md-content .highlighttable td .highlight, +.md-content .highlighttable td .linenodiv pre { margin-bottom: 0; } -.post-content code { +.md-content code { margin: auto 4px; padding: 4px 6px; font-size: 0.78em; @@ -164,7 +164,7 @@ border-radius: 2px; } -.post-content pre code { +.md-content pre code { display: grid; margin: auto 0; padding: 10px; @@ -175,44 +175,44 @@ word-break: break-all; } -.post-content blockquote { +.md-content blockquote { margin: 20px 0; padding: 0 14px; border-inline-start: 3px solid var(--primary); } -.post-content hr { +.md-content hr { margin: 30px 0; height: 2px; background: var(--tertiary); border: 0; } -.post-content iframe { +.md-content iframe { max-width: 100%; } -.post-content img { +.md-content img { border-radius: 4px; margin: 1rem 0; } -.post-content img[src*="#center"] { +.md-content img[src*="#center"] { margin: 1rem auto; } -.post-content figure.align-center { +.md-content figure.align-center { text-align: center; } -.post-content figure>figcaption { +.md-content figure>figcaption { color: var(--primary); font-size: 16px; font-weight: bold; margin: 8px 0 16px; } -.post-content figure>figcaption>p { +.md-content figure>figcaption>p { color: var(--secondary); font-size: 14px; font-weight: normal; diff --git a/assets/css/includes/scroll-bar.css b/assets/css/includes/scroll-bar.css index e88430bc..1e0656e0 100644 --- a/assets/css/includes/scroll-bar.css +++ b/assets/css/includes/scroll-bar.css @@ -22,16 +22,16 @@ } /* from post-single */ -.post-content .highlighttable td .highlight pre code::-webkit-scrollbar { +.md-content .highlighttable td .highlight pre code::-webkit-scrollbar { display: none; } -.post-content :not(table) ::-webkit-scrollbar-thumb { +.md-content :not(table) ::-webkit-scrollbar-thumb { border: 2px solid var(--code-block-bg); background: rgb(113, 113, 117); } -.post-content :not(table) ::-webkit-scrollbar-thumb:hover { +.md-content :not(table) ::-webkit-scrollbar-thumb:hover { background: rgb(163, 163, 165); } @@ -44,7 +44,7 @@ background: rgb(112, 112, 112); } -.post-content table::-webkit-scrollbar-thumb { +.md-content table::-webkit-scrollbar-thumb { border-width: 2px; } diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 81aea6e4..c5bcb807 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -31,7 +31,7 @@ {{- end }} {{- if .Content }} -