-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update codeblock style and add border-radius settings #194
Conversation
@@ -64,6 +66,10 @@ pre { | |||
color: $highlight-foreground; | |||
line-height: 1em; | |||
margin-bottom: 1em; | |||
margin: 0em; | |||
padding: 0.5em; | |||
background: #eee; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$code-background = $gainsboro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anything else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
// Note colors | |
// -------------------------------------------------- | |
// Read note light_bg_offset from NexT config and set in "lbg%" to use it as string variable. | |
hexo-config('note.light_bg_offset') is a 'unit' ? (lbg = unit(hexo-config('note.light_bg_offset'),"%")) : (lbg = 0) |
$sidebar-width = hexo-config('sidebar_width') is a 'unit' ? hexo-config('sidebar_width') : 240 |
hexo-theme-next/source/css/_schemes/Gemini/index.styl
Lines 22 to 24 in 52d3c02
// Read values from NexT config and set they as local variables to use as string variables (in any CSS section). | |
hexo-config('sidebar.offset') is a 'unit' ? (sboffset = unit(hexo-config('sidebar.offset'), px)) : (sboffset = 0) | |
use_seo = hexo-config('seo'); |
use_seo
good for example here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to set border-radius: ?+px
? i don't know the css grammar. 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I saw it..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah! It's good.
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;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here has deleted.
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?