css : refactor all margins

* hope this does not break anything xd
This commit is contained in:
Aditya Telange 2020-09-20 11:54:41 +05:30
parent 1e5f020efb
commit e91b15284a
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
6 changed files with 16 additions and 35 deletions

View File

@ -3,9 +3,6 @@
.archive { .archive {
width: 100%; width: 100%;
text-align: left; text-align: left;
margin: 0 auto;
margin-top: 14px;
margin-bottom: 14px;
font-size: 16px; font-size: 16px;
} }

View File

@ -2,8 +2,7 @@
-------------------------------------------------- */ -------------------------------------------------- */
.footer { .footer {
max-width: calc(var(--main-width) + var(--gap) * 2); max-width: calc(var(--main-width) + var(--gap) * 2);
margin-left: auto; margin: auto;
margin-right: auto;
padding: calc((var(--footer-height) - (var(--gap)) - 10px)/ 2) var(--gap); padding: calc((var(--footer-height) - (var(--gap)) - 10px)/ 2) var(--gap);
color: var(--secondary); color: var(--secondary);
font-size: 12px; font-size: 12px;

View File

@ -16,8 +16,7 @@
.logo, .logo,
.menu { .menu {
margin-left: var(--gap); margin: auto var(--gap);
margin-right: var(--gap);
} }
.logo a { .logo a {

View File

@ -4,8 +4,7 @@
position: relative; position: relative;
min-height: calc(100vh - var(--header-height) - var(--footer-height)); min-height: calc(100vh - var(--header-height) - var(--footer-height));
max-width: calc(var(--main-width) + var(--gap) * 2); max-width: calc(var(--main-width) + var(--gap) * 2);
margin-left: auto; margin: auto;
margin-right: auto;
padding: var(--gap); padding: var(--gap);
} }

View File

@ -6,8 +6,7 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
min-height: 320px; min-height: 320px;
margin-bottom: calc( var(--gap) * 2); margin: var(--gap) 0 calc(var(--gap) * 2) 0;
margin-top: var(--gap);
} }
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
@ -28,8 +27,7 @@
} }
.first-entry .entry-content { .first-entry .entry-content {
margin-top: 14px; margin: 14px 0;
margin-bottom: 14px;
font-size: 16px; font-size: 16px;
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
} }
@ -61,8 +59,7 @@
} }
.entry-content { .entry-content {
margin-top: 8px; margin: 8px 0;
margin-bottom: 8px;
color: var(--secondary); color: var(--secondary);
font-size: 14px; font-size: 14px;
line-height: 1.6; line-height: 1.6;

View File

@ -1,8 +1,7 @@
/* Post single /* Post single
-------------------------------------------------- */ -------------------------------------------------- */
.post-header { .post-header {
margin-top: 24px; margin: 24px auto var(--content-gap) auto
margin-bottom: var(--content-gap);
} }
.post-title { .post-title {
@ -21,13 +20,11 @@
} }
.post-content h1 { .post-content h1 {
margin-top: 40px; margin: 40px auto 32px auto
margin-bottom: 32px;
} }
.post-content h2 { .post-content h2 {
margin-top: 32px; margin: 32px auto 24px auto;
margin-bottom: 24px;
} }
.post-content h3, .post-content h3,
@ -36,6 +33,7 @@
.post-content h6 { .post-content h6 {
margin-top: 24px; margin-top: 24px;
margin-bottom: 16px; margin-bottom: 16px;
margin: 24px auto 16px auto;
} }
.post-content h1 { .post-content h1 {
@ -67,8 +65,7 @@
} }
.post-content a code { .post-content a code {
margin-left: 0; margin: auto 0;
margin-right: 0;
border-radius: 0; border-radius: 0;
box-shadow: 0 -1px 0 var(--primary) inset; box-shadow: 0 -1px 0 var(--primary) inset;
} }
@ -138,15 +135,12 @@
} }
.post-content table:not(.highlighttable) td code:only-child { .post-content table:not(.highlighttable) td code:only-child {
margin-left: 0; margin: auto 0;
margin-right: 0;
} }
.post-content .highlight, .post-content .highlight,
.post-content pre { .post-content pre {
margin-left: calc(var(--gap) * -1); margin: auto calc(var(--gap) * -1) 32px calc(var(--gap) * -1);
margin-right: calc(var(--gap) * -1);
margin-bottom: 32px;
background: var(--hljs-bg) !important; background: var(--hljs-bg) !important;
border-radius: var(--radius); border-radius: var(--radius);
} }
@ -160,9 +154,7 @@
} }
.post-content .highlight pre { .post-content .highlight pre {
margin-left: 0; margin: 0;
margin-right: 0;
margin-bottom: 0;
} }
/* table */ /* table */
@ -193,8 +185,7 @@
} }
.post-content code { .post-content code {
margin-left: 4px; margin: auto 4px;
margin-right: 4px;
padding: 4px 6px; padding: 4px 6px;
font-family: Menlo, Monaco, 'Courier New', Courier, monospace; font-family: Menlo, Monaco, 'Courier New', Courier, monospace;
font-size: 0.78em; font-size: 0.78em;
@ -205,8 +196,7 @@
.post-content pre code { .post-content pre code {
display: block; display: block;
margin-left: 0; margin: auto 0;
margin-right: 0;
padding: 10px; padding: 10px;
color: rgba(255, 255, 255, 0.8); color: rgba(255, 255, 255, 0.8);
background: transparent; background: transparent;