Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 代码高亮问题 #279 #272 #292

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 9 additions & 37 deletions source/css/_partial/article.styl
Original file line number Diff line number Diff line change
Expand Up @@ -26,59 +26,31 @@ article code::-webkit-scrollbar-thumb {
}

.highlight {
padding: 0 0.5em;
padding: 12px 14px;
background: #282c34;
color: #abb2bf;
margin: 25px 0;
border-radius: var(--radius);
overflow: auto;
line-height: 1.2;
}

.highlight .gutter {
border-right: 1px solid #35393b;
padding-right: 1em;
text-align: right;
}

article pre {
border-radius: var(--radius);
overflow: hidden;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 15px 6px 15px 0;
position: relative;
background: #282c34;
line-height: 1.3em;
.highlight .gutter pre {
font-family: sans-serif!important;
}

article pre::before {
// content: "";
background: #282c34;
height: 32px;
margin-bottom: 0;
display: block;
}

article pre:after {
// content: " ";
position: absolute;
border-radius: 50%;
background: #ff5f56;
width: 12px;
height: 12px;
top: 0;
left: 12px;
margin-top: 12px;
-webkit-box-shadow: 20px 0 #ffbd2e, 40px 0 #27c93f;
box-shadow: 20px 0 #ffbd2e, 40px 0 #27c93f;
article pre {
margin: 0;
}

article pre code {
position: relative;
border: none;
border-radius: 0;
font-size: 100%;
font-family: Consolas;
padding: 0;
padding: 0!important;
}

article pre code:after {
Expand Down
Loading