1 Star 0 Fork 0

caorui/blog.plcent.com

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
codeblock.styl 2.13 KB
一键复制 编辑 原始数据 按行查看 历史
caorui 提交于 2025-10-04 00:15 +08:00 . 实现代码高亮展示语言信息
/* ---------------------------------
* Code Highlight
* --------------------------------- */
$codeblock-caption-bg ?= rgba(200, 200, 200, .15)
figure.highlight
padding: 0
width: 100%
position: relative
margin: 1em 0 1em !important
border-radius: $radius
&.folded
.highlight-body
height: 0
.lang
cursor: default
.copy
opacity: .7
pre, table tr:hover
color: inherit
background: transparent
table
width: auto
tr td
border: none
tr:not(:first-child) td
padding-top: 0
tr:not(:last-child) td
padding-bottom: 0
pre
padding: 0
overflow: visible
.line, code .hljs
line-height: 1.5rem
figcaption, .gutter
background: $codeblock-caption-bg
figcaption
margin: 0 !important
padding: .3em 0em .3em .75em
font-style: normal
font-size: .8em
*
color: inherit
span
font-weight: 500
font-family: $family-code
.level-left *:not(:last-child)
margin-right: .5em
.level-right *:not(:first-child)
margin-left: .5em
.fold
cursor: pointer
&.level
overflow: auto
.level-right
a
padding: 0em .75em
.highlight-body
overflow: auto
.gutter
text-align: right
.tag, .title, .number, .section
display: inherit
font: inherit
margin: inherit
padding: inherit
background: inherit
height: inherit
text-align: inherit
vertical-align: inherit
min-width: inherit
border-radius: inherit
figure.highlight.foldable
div.level-left
cursor: pointer // clicking the codeblock filename can toggle folding
/* ---------------------------------
* Fix Gist Snippet
* --------------------------------- */
.gist
table
tr:hover
background: transparent
td
border: none
.file
all: initial
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/caoruiy/blog.plcent.com.git
git@gitee.com:caoruiy/blog.plcent.com.git
caoruiy
blog.plcent.com
blog.plcent.com
master

搜索帮助