1
0
Fork 0

update css

This commit is contained in:
nanxiaobei 2021-08-24 04:08:41 +08:00
parent 00f1029aab
commit 187f8c671b

View file

@ -28,8 +28,18 @@
--hljs-bg: #282828; --hljs-bg: #282828;
} }
html { *,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
height: 100%; height: 100%;
}
html {
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
font-size: 8px; font-size: 8px;
} }
@ -45,7 +55,6 @@ body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100%;
padding-right: var(--gap); padding-right: var(--gap);
padding-left: var(--gap); padding-left: var(--gap);
margin: 0; margin: 0;
@ -60,6 +69,7 @@ body {
} }
body > * { body > * {
flex-shrink: 0;
width: 100%; width: 100%;
margin-inline: auto; margin-inline: auto;
} }
@ -77,11 +87,6 @@ body > * {
/* Reset /* Reset
-------------------------------------------------- */ -------------------------------------------------- */
*,
*::before,
*::after {
box-sizing: border-box;
}
h1, h1,
h2, h2,
@ -170,24 +175,24 @@ img {
.logo { .logo {
display: flex; display: flex;
min-width: calc(var(--side) - var(--gap)); min-width: var(--side);
margin-right: var(--gap); padding-right: var(--gap);
overflow: auto;
} }
.site-name { .site-name {
max-width: calc(100% - 2rem - 3rem);
padding-bottom: 0.3rem; padding-bottom: 0.3rem;
overflow: auto;
font-size: 3.5rem; font-size: 3.5rem;
font-weight: 700; font-weight: 700;
white-space: nowrap;
} }
.btn-theme { .btn-theme {
align-self: center;
width: 3rem; width: 3rem;
height: 3rem;
margin-left: 2rem; margin-left: 2rem;
cursor: pointer; cursor: pointer;
background: url(./theme.png) left / cover no-repeat; background: url(./theme.png) left / auto 3rem no-repeat;
transition: background-position 0.4s steps(6); transition: background-position 0.4s steps(6);
} }
@ -197,7 +202,6 @@ img {
.menu { .menu {
display: flex; display: flex;
margin-right: var(--gap);
overflow: auto; overflow: auto;
} }
@ -206,33 +210,21 @@ img {
} }
.menu a.active { .menu a.active {
opacity: 0.4; opacity: 0.44;
} }
.social-icon { .social {
width: 3rem; display: flex;
margin-left: 3rem;
background-repeat: no-repeat;
background-position: center;
}
.social-icon:first-of-type {
margin-left: auto; margin-left: auto;
} }
.social-icon.twitter { .social a {
background-image: url('./twitter.svg'); width: 3rem;
margin-left: 3rem;
background: var(--img) center center no-repeat;
} }
.social-icon.github { .dark .social a {
background-image: url('./github.svg');
}
.social-icon.instagram {
background-image: url('./instagram.svg');
}
.dark .social-icon {
filter: invert(1); filter: invert(1);
} }
@ -256,7 +248,6 @@ img {
[data-menu='true'] .menu { [data-menu='true'] .menu {
position: absolute; position: absolute;
inset: auto 0 0; inset: auto 0 0;
margin-right: 0;
border-bottom: 1px solid var(--fog); border-bottom: 1px solid var(--fog);
} }
} }
@ -265,23 +256,24 @@ img {
-------------------------------------------------- */ -------------------------------------------------- */
.main { .main {
max-width: var(--narrow); max-width: var(--narrow);
min-height: calc(100% - var(--header) - var(--footer));
padding-top: var(--y-gap); padding-top: var(--y-gap);
padding-bottom: var(--y-gap); padding-bottom: var(--y-gap);
} }
.page-title { .main-title {
margin-bottom: calc(var(--y-gap) - 1rem); margin-bottom: calc(var(--y-gap) - 1rem);
font-size: 4rem; font-size: 4rem;
font-weight: 400; font-weight: 400;
color: var(--air); color: var(--air);
} }
.page-nav { .main-nav {
display: flex; display: flex;
margin-top: 5rem; margin-top: 5rem;
} }
.page-nav a { .main-nav a {
line-height: 5.5rem; line-height: 5.5rem;
color: var(--white); color: var(--white);
background: var(--black); background: var(--black);
@ -289,7 +281,7 @@ img {
padding-inline: 2.5rem; padding-inline: 2.5rem;
} }
.page-nav .next { .main-nav .next {
margin-left: auto; margin-left: auto;
} }
@ -488,7 +480,8 @@ img {
.post-content p, .post-content p,
.post-content ul, .post-content ul,
.post-content ol, .post-content ol,
.post-content dl { .post-content dl,
.post-content details {
margin-bottom: 3rem; margin-bottom: 3rem;
} }
@ -656,10 +649,10 @@ img {
/* 404 /* 404
-------------------------------------------------- */ -------------------------------------------------- */
.title-404 { .title-404 {
position: absolute;
inset: var(--header) 0 calc(var(--footer) * 2);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 100%;
padding-bottom: 8rem;
font-size: 16rem; font-size: 16rem;
} }