hexo-theme-stellar/source/css/_custom.styl

94 lines
3.1 KiB
Stylus
Raw Normal View History

2021-02-19 23:33:19 +08:00
@require('_defines/const')
//
2022-12-10 18:43:55 +08:00
$color-theme = convert(hexo-config('style.color.theme'))
$color-accent = convert(hexo-config('style.color.accent'))
$color-link = convert(hexo-config('style.color.link'))
$color-button = convert(hexo-config('style.color.button'))
$color-hover = convert(hexo-config('style.color.hover'))
2021-02-19 23:33:19 +08:00
2022-12-10 15:49:59 +08:00
//
2022-12-10 18:43:55 +08:00
$color-background = convert(hexo-config('style.color.background'))
$color-block = convert(hexo-config('style.color.block'))
$color-code = convert(hexo-config('style.color.code'))
$color-text = convert(hexo-config('style.color.text'))
2022-12-09 23:56:58 +08:00
2021-02-19 23:33:19 +08:00
// @font-face
// font-family: 'Dosis'
2022-12-20 00:09:34 +08:00
// src: url('https://gcore.jsdelivr.net/gh/volantis-x/cdn-fonts@20.5.30/Dosis/Dosis-Medium.ttf')
2021-02-19 23:33:19 +08:00
// font-weight: normal
// font-style: normal
2021-03-05 21:37:28 +08:00
$ff-body = system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif
2022-12-15 22:09:01 +08:00
$ff-codeblock = Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif
$ff-code = $ff-codeblock
2021-02-19 23:33:19 +08:00
$ff-logo = $ff-body
2022-10-12 23:19:10 +08:00
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'))
2022-12-15 22:09:01 +08:00
if hexo-config('style.font-family.codeblock')
$ff-codeblock = convert(hexo-config('style.font-family.codeblock'))
2022-10-12 23:19:10 +08:00
if hexo-config('style.font-family.logo')
$ff-logo = convert(hexo-config('style.font-family.logo'))
2021-02-19 23:33:19 +08:00
// font size
2022-12-15 22:09:01 +08:00
$fs-root = convert(hexo-config('style.font-size.root'))
2021-03-05 21:37:28 +08:00
$fs-15 = .9375rem
$fs-14 = .875rem
$fs-13 = .8125rem
$fs-12 = .75rem
2023-12-06 13:22:07 +08:00
$fs-h1 = 2rem // 32px
$fs-h2 = 1.75rem // 28px
2021-02-19 23:33:19 +08:00
$fs-h3 = 1.375rem // 22px
$fs-h4 = 1.125rem // 18px
2021-03-05 21:37:28 +08:00
$fs-h5 = $fs-15
$fs-h6 = $fs-12
2022-12-15 22:09:01 +08:00
$fs-p = convert(hexo-config('style.font-size.body'))
$fs-code = convert(hexo-config('style.font-size.code'))
$fs-codeblock = convert(hexo-config('style.font-size.codeblock'))
2021-02-19 23:33:19 +08:00
2022-12-15 22:09:01 +08:00
$border-card = convert(hexo-config('style.border-radius.card'))
$border-block = convert(hexo-config('style.border-radius.block'))
2022-12-15 22:42:48 +08:00
$border-bar = convert(hexo-config('style.border-radius.bar'))
2022-12-15 22:09:01 +08:00
$border-image = convert(hexo-config('style.border-radius.image'))
2022-12-15 22:42:48 +08:00
$border-button = 4px
2021-02-19 23:33:19 +08:00
2021-03-05 21:37:28 +08:00
//
:root
2022-10-23 18:27:14 +08:00
--width-left: 288px
--width-main: 720px
2021-03-05 21:37:28 +08:00
--gap-l: 16px
2022-12-15 22:09:01 +08:00
--gap-p: 1rem // gap for paragraph
--gap-p-compact: 0.75rem
2021-03-05 21:37:28 +08:00
// desktop 2k or larger
@media screen and (min-width: $device-2k)
2021-07-26 22:26:46 +08:00
--gap-l: 32px
2022-10-23 18:27:14 +08:00
--width-left: 352px
--width-main: 780px
2021-03-05 21:37:28 +08:00
// desktop 4k or larger
@media screen and (min-width: $device-4k)
--width-main: 860px
--gap-l: 64px
2022-10-12 20:09:40 +08:00
// iPad
@media screen and (max-width: $device-tablet)
2022-10-23 18:27:14 +08:00
--width-left: 252px
2022-10-12 20:09:40 +08:00
// iPad
@media screen and (max-width: $device-mobile-max)
2022-10-23 18:27:14 +08:00
--width-left: 288px
2022-10-12 20:09:40 +08:00
2021-03-05 21:37:28 +08:00
2021-02-19 23:33:19 +08:00
// 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)
2024-01-03 13:28:04 +08:00
$boxshadow-card-float = 0 12px 16px -4px rgba(0, 0, 0, 0.2)
2021-07-09 21:18:14 +08:00
$boxshadow-button = 0 0 2px 0px rgba(0, 0, 0, 0.04), 0 0 8px 0px rgba(0, 0, 0, 0.04)
2024-01-03 13:28:04 +08:00
$boxshadow-block = 0 1px 4px 0px rgba(0, 0, 0, 0.02), 0 2px 8px 0px rgba(0, 0, 0, 0.02)