Update codeblock style and add border-radius settings#194
Update codeblock style and add border-radius settings#194sli1989 merged 3 commits intotheme-next:masterfrom
Conversation
| margin-bottom: 1em; | ||
| margin: 0em; | ||
| padding: 0.5em; | ||
| background: #eee; |
There was a problem hiding this comment.
There was a problem hiding this comment.
Yeah. I think need to set 1 codeblock.rounded variable at the top of page. Here is examples:
hexo-theme-next/source/css/_variables/base.styl
Lines 337 to 340 in 52d3c02
hexo-theme-next/source/css/_schemes/Gemini/index.styl
Lines 22 to 24 in 52d3c02
use_seo good for example here.
There was a problem hiding this comment.
to set border-radius: ?+px? i don't know the css grammar. 😂
There was a problem hiding this comment.
Yep. By this variable we can set custom border radius too. See sidebar.offset in 3rd example.
i don't know the css grammar.
This actually like JS grammar. This is swig. Try it as in examples, it's not hard.
|
I have deleted the |
Demo with latest commit & border radius? |
|
The latest living demo has changed to test footer icon... Above feature hasn't merged. |
| pre { | ||
| @extend $code-block; | ||
| padding: 10px; | ||
| if hexo-config('codeblock.rounded') { border-radius: 5px;} |
|
So, merge icon and go see here? |
|
Live demo updated. There is no problem. |
|
So, yeah. It's good for now. |
* Update codeblock style and add border-radius settings * Add border radius as variable * Replace `$gainsboro` by `$code-background`.
* Update codeblock style and add border-radius settings * Add border radius as variable * Replace `$gainsboro` by `$code-background`.


PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number(s): N/A
What is the new behavior?
codeblock.border_radius=5, the codeblock would be loaded with rounded corner.How to use?
In NexT
_config.yml:Does this PR introduce a breaking change?