提交 6f9f3a5a 编写于 作者: EvanOne(文一)'s avatar EvanOne(文一)

refactor: Change the support unit of header & nav height

上级 d834e1a9
$header-height = convert(hexo-config('header.height') || '80vh')
if (hexo-config('header.height')) if (hexo-config('header.height'))
$header-height = unit( if (match('%', hexo-config('header.height')))
convert(hexo-config('header.height') || '80%'), 'vh') $header-height = unit(convert(hexo-config('header.height')), 'vh')
#header #header
display: flex display: flex
...@@ -27,8 +28,10 @@ $header-nav-color ...@@ -27,8 +28,10 @@ $header-nav-color
&::after &::after
color: $header-nav-link-hover-color color: $header-nav-link-hover-color
$header-nav-height = convert( $header-nav-height = convert(hexo-config('header.nav_height') || '50px')
hexo-config('header.nav_height') || '50px') if (hexo-config('header.nav_height'))
if (match('%', hexo-config('header.nav_height')))
$header-nav-height = unit(convert(hexo-config('header.nav_height')), 'vh')
.header-nav .header-nav
position: fixed position: fixed
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册