Hexo Inline Code Style

Modify the default Hexo inline code style.

Hexo uses highlighted red text for inline code style which is pretty ugly from my perspective. We could modify the default style and replace it with more concise and professional code style.

If you are using Icarus Theme, you can go to node_modules/hexo-theme-icarus/include/style/article.styl, and apply the changes.

1
2
3
4
5
6
7
8
9
code
padding: 0
background: transparent
overflow-wrap: break-word
&:not(pre > code)
background-color: #f0f0f0
color: #333333
padding: 3px 4px
border-radius: 5px
Author

Joe Chu

Posted on

2025-03-13

Updated on

2025-03-13

Licensed under

Comments