@require('_defines/const') // 通用主题色 $color-theme = convert(hexo-config('style.color.common.theme')) $color-accent = convert(hexo-config('style.color.common.accent')) $color-link = convert(hexo-config('style.color.common.link')) $color-button = convert(hexo-config('style.color.common.button')) $color-hover = convert(hexo-config('style.color.common.hover')) // 浅色 $light-background = convert(hexo-config('style.color.light.background')) $light-block = convert(hexo-config('style.color.light.block')) $light-card = convert(hexo-config('style.color.light.card')) $light-title = convert(hexo-config('style.color.light.title')) $light-text = convert(hexo-config('style.color.light.text')) $light-code = convert(hexo-config('style.color.light.code')) // 深色 $dark-background = convert(hexo-config('style.color.dark.background')) $dark-block = convert(hexo-config('style.color.dark.block')) $dark-card = convert(hexo-config('style.color.dark.card')) $dark-title = convert(hexo-config('style.color.dark.title')) $dark-text = convert(hexo-config('style.color.dark.text')) $dark-code = convert(hexo-config('style.color.dark.code')) // 移动端深色背景(OLED调成纯黑可以省电) $dark-background-mobile = convert(hexo-config('style.color.dark.background-mobile')) $dynamic-block = convert(hexo-config('style.color.dynamic.block')) // @font-face // font-family: 'Dosis' // src: url('https://fastly.jsdelivr.net/gh/volantis-x/cdn-fonts@20.5.30/Dosis/Dosis-Medium.ttf') // font-weight: normal // font-style: normal $ff-body = system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif $ff-code = Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif $ff-logo = $ff-body if hexo-config('style.font-family.body') $ff-body = convert(hexo-config('style.font-family.body')) if hexo-config('style.font-family.code') $ff-code = convert(hexo-config('style.font-family.code')) if hexo-config('style.font-family.logo') $ff-logo = convert(hexo-config('style.font-family.logo')) // font size $fs-root = convert(hexo-config('style.font-size')) $fs-15 = .9375rem $fs-14 = .875rem $fs-13 = .8125rem $fs-12 = .75rem $fs-h1 = 1.75rem // 32px $fs-h2 = 1.5rem // 24px $fs-h3 = 1.375rem // 22px $fs-h4 = 1.125rem // 18px $fs-h5 = $fs-15 $fs-h6 = $fs-12 $fs-p = $fs-15 $fs-code = $fs-13 $border-card = 12px $border-block = 6px $border-image = 6px // 可以动态变化的属性 :root --width-left: 288px --width-main: 720px --gap-l: 16px --gap-p: .75rem // gap for paragraph // desktop 2k or larger @media screen and (min-width: $device-2k) --gap-l: 32px --width-left: 352px --width-main: 780px // desktop 4k or larger @media screen and (min-width: $device-4k) --width-main: 860px --gap-l: 64px // iPad 竖屏 @media screen and (max-width: $device-tablet) --width-left: 252px // iPad 竖屏 @media screen and (max-width: $device-mobile-max) --width-left: 288px // shadow $boxshadow-card = 0 1px 2px 0px rgba(0, 0, 0, 0.1) $boxshadow-float = 0 4px 8px 0px rgba(0, 0, 0, 0.1) $boxshadow-card-float = 0 2px 4px 0px rgba(0, 0, 0, 0.1), 0 4px 8px 0px rgba(0, 0, 0, 0.1), 0 8px 16px 0px rgba(0, 0, 0, 0.1) $boxshadow-button = 0 0 2px 0px rgba(0, 0, 0, 0.04), 0 0 8px 0px rgba(0, 0, 0, 0.04) $boxshadow-block = 0 1px 4px 0px rgba(0, 0, 0, 0.02), 0 2px 8px 0px rgba(0, 0, 0, 0.02)