add: replace 1.5em with variables

This commit is contained in:
Junyi Hou 2024-03-06 13:34:22 +08:00
parent 4655d3e4ac
commit a7fb20a7ed
3 changed files with 13 additions and 7 deletions

View File

@ -4,7 +4,6 @@
--card-color: #2e2e33;
--card-border-color: #333333;
--card-border-radius: 0.5em;
--link-color:#599ada;
--link-state-color:#ff5858;

View File

@ -5,7 +5,7 @@
--card-color: #fafafa;
--card-border-color: #eeeeee;
--card-border-radius: 0.5em;
--link-color:#1d60a3;
--link-state-color:rgb(163, 29, 29);

View File

@ -30,6 +30,12 @@
{{ end }}
/* Basic */
:root {
--card-border-radius: 0.5em;
--card-margin: 1.5em;
}
html {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* 1 */
@ -280,12 +286,13 @@ header h2 {
header nav:not(:empty){
background: var(--nav-bg-color);
margin-top: 1em;
margin-top: var(--card-margin);
max-width: 100%;
text-align: center;
padding: 0.5em 0;
border: 1px solid var(--card-border-color);
border-radius: var(--card-border-radius);
font-size: 14px;
}
header nav a {
@ -343,7 +350,7 @@ main h1 {
}
article:not(:last-of-type) {
margin-bottom: 1.5em;
margin-bottom: var(--card-margin);
}
.post-short-list:first-of-type {
@ -408,19 +415,19 @@ article:not(:last-of-type) {
}
.post-title.favorite::after {
content: "";
content: "🌟";
display: inline-block;
margin-left: 0.2em;
}
.post-title.draft::after {
content: "";
content: "✏️";
display: inline-block;
margin-left: 0.2em;
}
.post-title.favorite.draft::after {
content: "☆ ✎";
content: "🌟 ✏️";
display: inline-block;
margin-left: 0.2em;
}