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

100 lines
3.3 KiB
Stylus
Raw Normal View History

2021-02-19 23:33:19 +08:00
@require('_defines/const')
//
2022-10-19 13:40:18 +08:00
$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'))
2021-02-19 23:33:19 +08:00
2021-04-02 20:24:16 +08:00
//
2022-10-19 13:40:18 +08:00
$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'))
2021-02-19 23:33:19 +08:00
2021-04-02 20:24:16 +08:00
//
2022-10-19 13:40:18 +08:00
$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'))
2021-02-19 23:33:19 +08:00
2021-04-02 20:24:16 +08:00
// OLED
2022-10-19 13:40:18 +08:00
$dark-background-mobile = convert(hexo-config('style.color.dark.background-mobile'))
2021-02-19 23:33:19 +08:00
// @font-face
// font-family: 'Dosis'
// src: url('https://fastly.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
2021-07-03 13:21:54 +08:00
$ff-code = Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif
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'))
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
$fs-root = convert(hexo-config('style.font-size'))
2021-03-05 21:37:28 +08:00
$fs-15 = .9375rem
$fs-14 = .875rem
$fs-13 = .8125rem
$fs-12 = .75rem
$fs-h1 = 1.75rem // 32px
2021-03-05 21:37:28 +08:00
$fs-h2 = 1.5rem // 24px
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
2021-07-26 22:26:46 +08:00
$fs-p = $fs-15
2021-03-05 21:37:28 +08:00
$fs-code = $fs-13
2021-02-19 23:33:19 +08:00
$border-card = 12px
2021-07-26 22:26:46 +08:00
$border-block = 6px
$border-image = 6px
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-01-04 23:34:21 +08:00
--gap-p: .75rem // gap for paragraph
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)
$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)
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)
2021-07-09 22:41:09 +08:00
$boxshadow-block = 0 1px 4px 0px rgba(0, 0, 0, 0.02), 0 2px 8px 0px rgba(0, 0, 0, 0.02)