Skip to content

Commit

Permalink
fix: 代码高亮问题 #279 #272 (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexmoe committed Oct 15, 2023
1 parent f3dd039 commit e9bb20f
Showing 1 changed file with 9 additions and 37 deletions.
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

0 comments on commit e9bb20f

Please sign in to comment.